dnl Additional Autoconf definitions. dnl dnl This is wrong in Autoconf 1.3. (Fix from jloup@chorus.fr.) dnl define(AC_TEST_CPP, [AC_REQUIRE([AC_PROG_CPP])cat > conftest.c </dev/null 2>&1"` if test -z "$err"; then ifelse([$2], , :, [$2]) ifelse([$3], , , [else $3 ])dnl fi rm -f conftest*])dnl dnl dnl Need to link with more libraries to use X under ISC. define(AC_ISC_WLIBS, [echo checking for ISC X window libraries if test -n "$ISC"; then wlibs="$wlibs -lnsl_s -linet" echo "(adding -lnsl_s -linet to wlibs)" fi AC_SUBST(wlibs)dnl ])dnl dnl dnl Look for the X11 include files in various places, if they're dnl not in the compiler's path. Substitute for `xincludedir' and dnl `xlibdir'. Perhaps we need different checks for Xt and Xaw? define(AC_X11_LOCATION, [echo checking for X11 headers and libraries dir="" AC_TEST_CPP([#include ], :, if test -r /usr/local/[[include]]/X11/Intrinsic.h; then dir=/usr/local/[[include]] elif test -r /usr/openwin/[[include]]/X11/Box.h; then dir=/usr/openwin/[[include]] elif test -r /usr/openwin/share/[[include]]/X11/Box.h; then dir=/usr/openwin/share/[[include]] elif test -r /usr/[[include]]/X11R4/X11/Intrinsic.h; then dir=/usr/[[include]]/X11R4 elif test -r /usr/[[include]]/X11R5/X11/Intrinsic.h; then dir=/usr/[[include]]/X11R5 elif test -r /usr/lpp/X11/Xamples/[[include]]/X11/Intrinsic.h; then dir=/usr/lpp/X11/Xamples/[[include]] elif test -r /usr/X11/[[include]]/X11/Intrinsic.h; then dir=/usr/X11/[[include]] elif test -r /usr/X11R5/[[include]]/X11/Intrinsic.h; then dir=/usr/X11R5/[[include]] elif test -r /usr/[[include]]/X11/Intrinsic.h; then dir= # everyone's cc searches /usr/include, right? else no_x=t fi ) dnl Can't use AC_SUBST inside AC_TEST_CPP. if test -n "$dir"; then xincludedir=-I$dir echo "(using $xincludedir)" elif test -n "$no_x"; then # Not all programs may use this symbol, but it won't hurt to define it. xincludedir=-DX_DISPLAY_MISSING fi AC_SUBST(xincludedir) # # Now check for the libraries. Amazing how every single X vendor puts # these in a different place, and all because MIT thought they should go # in /usr/lib. dir1="" if test -r /usr/local/lib/libXt.a; then dir1=/usr/local/lib elif test -r /usr/openwin/lib/libXt.a; then dir1=/usr/openwin/lib elif test -r /usr/lib/X11R4/libXt.sl; then dir1=/usr/lib/X11R4 elif test -r /usr/lib/X11R4/libXt.a; then dir1=/usr/lib/X11R4 elif test -r /usr/lib/X11R5/libXt.a; then dir1=/usr/lib/X11R5 elif test -r /usr/lpp/X11/Xamples/lib/Xt/libXt.a; then dir1=/usr/lpp/X11/Xamples/lib/Xt elif test -r /usr/X11/lib/libXt.a; then dir1=/usr/X11/lib elif test -r /usr/X11R5/lib/libXt.a; then dir1=/usr/X11R5/lib fi dir2="" if test -r /usr/lpp/X11/Xamples/lib/Xmu/libXmu.a; then dir2=/usr/lpp/X11/Xamples/lib/Xmu fi test -n "$dir1" && xlibdir=-L$dir1 test -n "$dir2" && xlibdir="$xlibdir -L$dir2" test -n "$xlibdir" && echo "(using $xlibdir)" AC_SUBST(xlibdir)dnl ])dnl dnl dnl define(AC_PROG_GCC_G, dnl [AC_REQUIRE([AC_PROG_CC])dnl dnl if test -n "$GCC" dnl then CC="$CC -g" dnl fi dnl ])dnl