mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 21:19:24 +00:00
Add support for BeOS, which doesn't have libm.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2000-12-18 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
|
||||||
|
|
||||||
|
* src/configure.in: Add check for rand() in libm. Needed for BeOS.
|
||||||
|
* src/Makefile.in (LIBS): Use @GPERF_LIBM@ instead of hardwiring -lm.
|
||||||
|
|
||||||
2000-11-20 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
|
2000-11-20 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
|
||||||
|
|
||||||
* doc/help2man: Update to version 1.23.
|
* doc/help2man: Update to version 1.23.
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ VPATH = $(srcdir)
|
|||||||
|
|
||||||
OBJECTS = new.o options.o iterator.o main.o gen-perf.o key-list.o list-node.o \
|
OBJECTS = new.o options.o iterator.o main.o gen-perf.o key-list.o list-node.o \
|
||||||
hash-table.o bool-array.o read-line.o trace.o vectors.o version.o
|
hash-table.o bool-array.o read-line.o trace.o vectors.o version.o
|
||||||
LIBS = ../lib/libgp.a -lm
|
LIBS = ../lib/libgp.a @GPERF_LIBM@
|
||||||
CPPFLAGS = -I. -I$(srcdir)/../lib
|
CPPFLAGS = -I. -I$(srcdir)/../lib
|
||||||
|
|
||||||
TARGETPROG = gperf
|
TARGETPROG = gperf
|
||||||
|
|||||||
43
src/configure
vendored
43
src/configure
vendored
@@ -1304,6 +1304,48 @@ done
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
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
|
trap '' 1 2 15
|
||||||
cat > confcache <<\EOF
|
cat > confcache <<\EOF
|
||||||
# This file is a shell script that caches the results of configure
|
# 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@%$INSTALL%g
|
||||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||||
|
s%@GPERF_LIBM@%$GPERF_LIBM%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ AC_CHECK_FUNCS(setrlimit)
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
dnl
|
dnl
|
||||||
|
dnl checks for libraries
|
||||||
|
dnl
|
||||||
|
AC_CHECK_LIB(m, rand, GPERF_LIBM="-lm", GPERF_LIBM="")
|
||||||
|
AC_SUBST(GPERF_LIBM)
|
||||||
|
dnl
|
||||||
dnl That's it.
|
dnl That's it.
|
||||||
dnl
|
dnl
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|
||||||
|
|||||||
Reference in New Issue
Block a user