AC_INIT(README) rand=0 random=0 if test "$OPENWINHOME" = "" ; then ow=/usr/openwin else ow=$OPENWINHOME fi # Solaris special handling ... if uname -sr | grep '^SunOS 5' >/dev/null ; then LIBS="$LIBS -lnsl -lelf -R/usr/ucblib -L/usr/ucblib -lucb" fi AC_PROG_CC # test "$CC" = "gcc" && DEFS="$DEFS -Wall -g" test "$CC" = "gcc" && DEFS="$DEFS -g" AC_PROG_INSTALL AC_PROG_RANLIB AC_STDC_HEADERS AC_HAVE_HEADERS(stdlib.h malloc.h unistd.h) AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") AC_RETSIGTYPE if test -z "$x_includes" ; then AC_FIND_X fi # if we can't find xmkmf (OpenWin 2 and HP have this feature), then see if we # can guess about where X lives ... test -z "$x_includes" && test -d $ow && x_includes=${ow}/include test -z "$x_libraries" && test -d $ow && x_libraries=${ow}/lib test -z "$x_includes" && test -d /usr/include/X11R5 && x_includes=/usr/include/X11R5 test -z "$x_libraries" && test -d /usr/lib/X11R5 && x_libraries=/usr/lib/X11R5 test -n "$x_includes" && DEFS="$DEFS -I${x_includes}" test -n "$x_libraries" && LIBS="$LIBS -L${x_libraries}" AC_HAVE_LIBRARY(audio, [LIBS="$LIBS -laudio"]) LIBS="$LIBS -lX11" AC_FUNC_CHECK(AuCloseServer, [DEFS="$DEFS -DNETAUDIO"]) AC_FUNC_CHECK(ACloseAudio, [DEFS="$DEFS -DHPAUDIO"]) AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"]) AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"]) AC_HAVE_LIBRARY(dnet_stub, [LIBS="$LIBS -ldnet_stub"]) if uname -srv | grep '^AIX 2 3' >/dev/null ; then : else AC_HAVE_LIBRARY(bsd, [LIBS="$LIBS -lbsd"]) fi AC_HAVE_LIBRARY(m, [LIBS="$LIBS -lm"]) AC_REPLACE_FUNCS(strdup) if test "$REAL_DELTA_T" != "no" ; then AC_FUNC_CHECK(gettimeofday, [DEFS="$DEFS -DREAL_DELTA_T"]) fi AC_FUNC_CHECK(setsid, [DEFS="$DEFS -DHAVE_SETSID"]) AC_FUNC_CHECK(rand, [rand=1]) if test "$rand" = "1" ; then DEFS="$DEFS -DHAVE_RAND" else AC_FUNC_CHECK(random, [random=1]) if test "$random" = "1" ; then DEFS="$DEFS -DHAVE_RANDOM" else echo "Hmm. Your system does not support either random() or rand()." echo "ACM needs one of the random number generators to operate." exit 1 fi fi AC_FUNC_CHECK(copysign, [DEFS="$DEFS -DHAVE_COPYSIGN"]) AC_OUTPUT(Makefile src/Makefile V/Makefile V/lib/Makefile V/test/Makefile objects/Makefile)