]> git.sur5r.net Git - openldap/blobdiff - configure.in
really really minor cleanup
[openldap] / configure.in
index 425c8e52b6e931b5e601f1868821b7b0af62d4ad..aa2b1fe72ef478b4d4aad9901ba1751312397dab 100644 (file)
@@ -852,10 +852,13 @@ AC_CHECK_HEADERS( \
        termios.h               \
        unistd.h                \
        utime.h                 \
-       winsock.h               \
-       winsock2.h              \
 )
 
+dnl Only check Winsock on MinGW
+if test "$ac_cv_mingw32" = yes ; then
+       AC_CHECK_HEADERS( winsock.h winsock2.h )
+fi
+
 AC_CHECK_HEADERS( resolv.h, [], [],
 [$ac_includes_default
 #include <netinet/in.h>
@@ -887,9 +890,7 @@ fi
 dnl The following is INTENTIONALLY scripted out because shell does not
 dnl support variable names with the '@' character, which is what
 dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
-dnl
-dnl Skip Winsock tests on Cygwin
-if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
+if test "$ac_cv_header_winsock_h" = yes; then
 AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
@@ -2333,7 +2334,7 @@ fi
 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
        AC_CHECK_HEADERS(gmp.h)
        AC_CHECK_LIB(gmp, __gmpz_add_ui)
-       if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp = yes ; then
+       if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
                AC_DEFINE(USE_MP_GMP,1,[define to use GMP for MP])
                ol_with_mp=gmp
        elif test $ol_with_mp = gmp ; then
@@ -2561,6 +2562,20 @@ fi
 AC_DEFINE(SLAPD_MOD_STATIC,1,[statically linked module])
 AC_DEFINE(SLAPD_MOD_DYNAMIC,2,[dynamically linked module])
 
+dnl back-monitor goes first (well, after back-config)
+if test "$ol_enable_monitor" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_MONITOR=$ol_enable_monitor
+       if test "$ol_enable_monitor" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       AC_DEFINE_UNQUOTED(SLAPD_MONITOR,$MFLAG,[define to support cn=Monitor backend])
+fi
+
 if test "$ol_enable_bdb" != no ; then
        BUILD_SLAPD=yes
        BUILD_BDB=$ol_enable_bdb
@@ -2627,19 +2642,6 @@ if test "$ol_enable_meta" != no ; then
        AC_DEFINE_UNQUOTED(SLAPD_META,$MFLAG,[define to support LDAP Metadirectory backend])
 fi
 
-if test "$ol_enable_monitor" != no ; then
-       BUILD_SLAPD=yes
-       BUILD_MONITOR=$ol_enable_monitor
-       if test "$ol_enable_monitor" = mod ; then
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
-               MFLAG=SLAPD_MOD_DYNAMIC
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
-               MFLAG=SLAPD_MOD_STATIC
-       fi
-       AC_DEFINE_UNQUOTED(SLAPD_MONITOR,$MFLAG,[define to support cn=Monitor backend])
-fi
-
 if test "$ol_enable_null" != no ; then
        BUILD_SLAPD=yes
        BUILD_NULL=$ol_enable_null