From 32ab9ff4acde534ae317e49a8eea9f45d19e63c0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 17 Jan 2009 01:50:21 +0000 Subject: [PATCH] uuid fixes --- build/openldap.m4 | 4 +- configure | 99 ++++++++++++++++++++++++----------------------- configure.in | 7 ++-- 3 files changed, 56 insertions(+), 54 deletions(-) diff --git a/build/openldap.m4 b/build/openldap.m4 index c173c15eff..5420ff384d 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -123,7 +123,7 @@ dnl -------------------------------------------------------------------- dnl Check for MSVC AC_DEFUN([OL_MSVC], [AC_REQUIRE_CPP()dnl -AC_CACHE_CHECK([for Microsoft Visual C++], ol_cv_msvc, +AC_CACHE_CHECK([whether we are using MS Visual C++], ol_cv_msvc, [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #ifndef _MSC_VER #include <__FOO__/generate_error.h> @@ -921,7 +921,9 @@ AC_DEFUN([OL_LIB_FETCH], LIBS="-lfetch -lcom_err $LIBS" AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #include ]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])]) LIBS=$ol_LIBS diff --git a/configure b/configure index 2ca0da5145..29c1205a61 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.685 2009/01/17 00:15:31 kurt Exp . +# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.686 2009/01/17 00:20:21 kurt Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -12386,52 +12386,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -{ echo "$as_me:$LINENO: checking for Microsoft Visual C++" >&5 -echo $ECHO_N "checking for Microsoft Visual C++... $ECHO_C" >&6; } -if test "${ol_cv_msvc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifndef _MSC_VER -#include <__FOO__/generate_error.h> -#endif - -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ol_cv_msvc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ol_cv_msvc=no -fi - -rm -f conftest.err conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ol_cv_msvc" >&5 -echo "${ECHO_T}$ol_cv_msvc" >&6; } - ol_link_perl=no if test $ol_enable_perl != no ; then # Extract the first word of "perl", so it can be a program name with args. @@ -12726,6 +12680,51 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking whether we are using MS Visual C++" >&5 +echo $ECHO_N "checking whether we are using MS Visual C++... $ECHO_C" >&6; } +if test "${ol_cv_msvc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef _MSC_VER +#include <__FOO__/generate_error.h> +#endif + +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ol_cv_msvc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ol_cv_msvc=no +fi + +rm -f conftest.err conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ol_cv_msvc" >&5 +echo "${ECHO_T}$ol_cv_msvc" >&6; } case $host_os in *mingw32* ) ac_cv_mingw32=yes ;; @@ -17868,7 +17867,7 @@ fi LIBS="$save_LIBS" - if test have_uuid = yes ; then + if test $have_uuid = yes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_UUID_TO_STR 1 @@ -18115,7 +18114,7 @@ fi LIBS="$save_LIBS" - if test have_uuid = yes ; then + if test $have_uuid = yes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_UUID_GENERATE 1 @@ -31210,7 +31209,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #include int diff --git a/configure.in b/configure.in index 62c17b76d7..d0cea1b722 100644 --- a/configure.in +++ b/configure.in @@ -665,8 +665,6 @@ AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL -OL_MSVC - dnl ---------------------------------------------------------------- dnl Perl ol_link_perl=no @@ -693,6 +691,7 @@ if test $ol_enable_perl != no ; then fi AC_PROG_CPP +OL_MSVC dnl ---------------------------------------------------------------- dnl Checks for Windows NT @@ -1015,7 +1014,7 @@ if test $ac_cv_header_sys_uuid_h = yes ; then AC_SEARCH_LIBS([uuid_to_str], [uuid], [have_uuid=yes], :) LIBS="$save_LIBS" - if test have_uuid = yes ; then + if test $have_uuid = yes ; then AC_DEFINE(HAVE_UUID_TO_STR,1, [define if you have uuid_to_str()]) @@ -1032,7 +1031,7 @@ if test $have_uuid = no ; then AC_SEARCH_LIBS([uuid_generate], [uuid], [have_uuid=yes], :) LIBS="$save_LIBS" - if test have_uuid = yes ; then + if test $have_uuid = yes ; then AC_DEFINE(HAVE_UUID_GENERATE,1, [define if you have uuid_generate()])