mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Add support for BeOS, which doesn't have libm.
This commit is contained in:
43
src/configure
vendored
43
src/configure
vendored
@@ -1304,6 +1304,48 @@ done
|
||||
|
||||
fi
|
||||
fi
|
||||
echo $ac_n "checking for rand in -lm""... $ac_c" 1>&6
|
||||
echo "configure:1309: checking for rand in -lm" >&5
|
||||
ac_lib_var=`echo m'_'rand | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1317 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char rand();
|
||||
|
||||
int main() {
|
||||
rand()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
GPERF_LIBM="-lm"
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
GPERF_LIBM=""
|
||||
fi
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -1444,6 +1486,7 @@ s%@CXXCPP@%$CXXCPP%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@GPERF_LIBM@%$GPERF_LIBM%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user