diff options
author | Niklas Hambüchen <mail@nh2.me> | 2019-07-02T20·28+0200 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2019-07-03T02·32+0200 |
commit | 20129bd83d57316cc0b69bec7abeec43011c56d5 (patch) | |
tree | c59c9db714a41184aad2347e764f9ea00ba3bd0b | |
parent | fe068eca00d6a2dd2ea9ee08924dc3898c37fb6c (diff) |
autoconf: Fix AC_STRUCT_DIRENT_D_TYPE being used before AC_PROG_CC.
That was incorrect, because checking the dirent type already requires a working compiler. It had the effect that setting e.g. `: ${CFLAGS=""}` before `AC_PROG_CC` as per `AC_PROG_CC`'s documentation would have no effect, because `AC_STRUCT_DIRENT_D_TYPE` would automatically set CFLASGS. (In a followup commit `: ${CFLAGS=""}` will be used, so it's important to get this working first.)
-rw-r--r-- | configure.ac | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index c12f9d5ff952..3a486fab8e71 100644 --- a/configure.ac +++ b/configure.ac @@ -50,14 +50,6 @@ AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier ('cpu-os')]) test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var -# Solaris-specific stuff. -AC_STRUCT_DIRENT_D_TYPE -if test "$sys_name" = sunos; then - # Solaris requires -lsocket -lnsl for network functions - LIBS="-lsocket -lnsl $LIBS" -fi - - CFLAGS= CXXFLAGS= AC_PROG_CC @@ -71,6 +63,14 @@ AC_CHECK_TOOL([AR], [ar]) AC_SYS_LARGEFILE +# Solaris-specific stuff. +AC_STRUCT_DIRENT_D_TYPE +if test "$sys_name" = sunos; then + # Solaris requires -lsocket -lnsl for network functions + LIBS="-lsocket -lnsl $LIBS" +fi + + # Check for pubsetbuf. AC_MSG_CHECKING([for pubsetbuf]) AC_LANG_PUSH(C++) |