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>
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 <sys/param.h>
+#endif
#include <stdio.h>
#include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
LIBS=$ol_LIBS
#! /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.
#
-{ 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.
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 ;;
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
LIBS="$save_LIBS"
- if test have_uuid = yes ; then
+ if test $have_uuid = yes ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_UUID_GENERATE 1
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
#include <stdio.h>
#include <fetch.h>
int
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
-OL_MSVC
-
dnl ----------------------------------------------------------------
dnl Perl
ol_link_perl=no
fi
AC_PROG_CPP
+OL_MSVC
dnl ----------------------------------------------------------------
dnl Checks for Windows NT
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()])
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()])