X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/be5a5b39da53dd58f645d8e4574a775206cc9751..cc8b577edeb9d85647019d1acb9f875cccd164c4:/configure.in diff --git a/configure.in b/configure.in index 34f7836e0d..3e89bea0c2 100644 --- a/configure.in +++ b/configure.in @@ -1135,6 +1135,12 @@ dnl see the `changequote' comment above. machine=powermac opsys=darwin # Define CPP as follows to make autoconf work correctly. CPP="${CC-cc} -E -no-cpp-precomp" + # Use fink packages if available. + if test -d /sw/include && test -d /sw/lib; then + GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" + CPP="${CPP} ${GCC_TEST_OPTIONS}" + NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} + fi ;; ## AMD x86-64 Linux-based GNU system @@ -1267,6 +1273,25 @@ then ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi +dnl We need -znocombreloc if we're using a relatively recent GNU ld. +dnl If we can link with the flag, it shouldn't do any harm anyhow. +dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.) +dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' +dnl if not built to support GNU ld. + +late_LDFLAGS=$LDFLAGS +if test $GCC = yes; then + LDFLAGS="$LDFLAGS -Wl,-znocombreloc" +else + LDFLAGS="$LDFLAGS -znocombreloc" +fi + +AC_MSG_CHECKING([For -znocombreloc]) +AC_LINK_IFELSE([main(){return 0;}], + [AC_MSG_RESULT(yes)], + LDFLAGS=$late_LDFLAGS + [AC_MSG_RESULT(no)]) + dnl checks for Unix variants AC_AIX @@ -1507,6 +1532,12 @@ if test $emacs_cv_struct_exception != yes; then AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) fi +AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT +#if HAVE_SYS_SOCKET_H +#include +#endif]) + dnl checks for structure members AC_STRUCT_TM AC_STRUCT_TIMEZONE @@ -1516,7 +1547,14 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff, [#include ]) AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr, - struct ifreq.ifr_addr], , ,[#include ]) + struct ifreq.ifr_addr], , , + [AC_INCLUDES_DEFAULT +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif]) dnl checks for compiler characteristics @@ -1845,7 +1883,7 @@ dnl This function defintion taken from Gnome 2.0 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN(PKG_CHECK_MODULES, [ +AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no if test -z "$PKG_CONFIG"; then @@ -1893,7 +1931,7 @@ AC_DEFUN(PKG_CHECK_MODULES, [ if test $succeeded = yes; then ifelse([$3], , :, [$3]) else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) fi ]) @@ -2510,7 +2548,7 @@ dnl Fixme: Not used. Should this be HAVE_SOCKETS? [Define to 1 if you have inet sockets.]) fi -AC_CHECK_HEADERS(sys/ioctl.h net/if.h) +AC_CHECK_HEADERS(sys/ioctl.h) if test -f /usr/lpp/X11/bin/smt.exp; then AC_DEFINE(HAVE_AIX_SMT_EXP, 1,