r144: Move first use of AC_CHECK_HEADERS so it is always executed. Tidy up indendation.
authorPaul Green <paulg@samba.org>
Sat, 10 Apr 2004 14:26:19 +0000 (14:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:10 +0000 (10:51 -0500)
(This used to be commit 3d045d46e4b129057d30c78cd513ecca8da5107a)

source3/configure.in

index 56ba1239bc872e2dad8adf66986772c8cd448d83..5be6d822ef0e21585f4e6acf0f3d57a94d948e80 100644 (file)
@@ -369,7 +369,8 @@ fi
 
 #
 # Config CPPFLAG settings for strange OS's that must be set
-# before other tests.
+# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
+# case statement; its first reference must be unconditional.
 #
 case "$host_os" in
 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
@@ -581,27 +582,23 @@ main() {
 # is so horribly broken....
 #
     *darwin*)
-               AC_DEFINE(BROKEN_UNICODE_COMPOSE_CHARACTERS, 1, [Does this system use unicode compose characters])
+       AC_DEFINE(BROKEN_UNICODE_COMPOSE_CHARACTERS, 1, [Does this system use unicode compose characters])
 # Add Fink directories for various packages, like dlcompat.
 # Note: iconv does that explicitly below, but other packages
 # don't.
-               CPPFLAGS="$CPPFLAGS -I/sw/include"
-               LDFLAGS="$LDFLAGS -L/sw/lib"
+       CPPFLAGS="$CPPFLAGS -I/sw/include"
+       LDFLAGS="$LDFLAGS -L/sw/lib"
 
 # If we have dlsym_prepend_underscore (from Fink's dlcompat),
 # use that instead of plain dlsym.
 
-               AC_CHECK_LIB(dl,dlopen)
-               AC_CHECK_FUNCS(dlsym_prepend_underscore,[CPPFLAGS="$CPPFLAGS -Ddlsym=dlsym_prepend_underscore"])
+       AC_CHECK_LIB(dl,dlopen)
+       AC_CHECK_FUNCS(dlsym_prepend_underscore,[CPPFLAGS="$CPPFLAGS -Ddlsym=dlsym_prepend_underscore"])
 
-#Add a system specific charset module.
+# Add a system specific charset module.
 
-               default_shared_modules="$default_shared_modules charset_macosxfs"
-               old_CPPFLAGS="$CPPFLAGS"
-               CPPFLAGS="-Iinclude $CPPFLAGS" 
-               AC_CHECK_HEADERS([CoreFoundation/CFStringEncodingConverter.h], [], [AC_CHECK_HEADERS([CFStringEncodingConverter.h])])
-               CPPFLAGS="$old_CPPFLAGS"
-               ;;
+       default_shared_modules="$default_shared_modules charset_macosxfs"
+       ;;
     *hurd*)
         AC_MSG_CHECKING([for LFS support])
         old_CPPFLAGS="$CPPFLAGS"
@@ -642,6 +639,12 @@ AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h)
 AC_CHECK_HEADERS(sys/syslog.h syslog.h execinfo.h)
 AC_CHECK_HEADERS(langinfo.h locale.h)
 
+# Look for Darwin headers
+old_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-Iinclude $CPPFLAGS"
+AC_CHECK_HEADERS([CoreFoundation/CFStringEncodingConverter.h], [], [AC_CHECK_HEADERS([CFStringEncodingConverter.h])])
+CPPFLAGS="$old_CPPFLAGS"
+
 # In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
 # subdirectory of headers.
 AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h)