# Our config tool sucks... if this script decides to modify the # LIBS variable it won't be used by any of the other TestCompiles. # So unless we protect ourselves with the found_dbm variable # we'd end up having to do the work twice... and we'd end up putting # two -ldbm -ldbm into the LIBS variable. if [ "x$found_dbm" = "x" ]; then if ./helpers/TestCompile func dbm_open; then found_dbm=1 else found_dbm=0 case "$PLAT" in *-linux*) # many systems don't have -ldbm DBM_LIB="" if ./helpers/TestCompile lib dbm dbm_open; then DBM_LIB="-ldbm" elif ./helpers/TestCompile lib ndbm dbm_open; then DBM_LIB="-lndbm" fi if [ "x$DBM_LIB" != "x" ]; then LIBS="$LIBS $DBM_LIB" found_dbm=1 fi ;; *) if [ "x$DBM_LIB" != "x" ]; then oldLIBS="$LIBS" LIBS="$LIBS $DBM_LIB" if ./helpers/TestCompile func dbm_open; then found_dbm=1 else found_dbm=0 LIBS="$oldLIBS" fi fi ;; esac if [ "x$found_dbm" = "x1" ]; then echo " + using $DBM_LIB for DBM support" fi fi fi