ref: 88f098306645a93fe6e78829816be410219290fb
parent: 1230a94ae89ae83290fc6497a148ccf4abb76e20
author: cbagwell <cbagwell>
date: Sat Jan 2 17:32:41 EST 2010
Don't make first call to AC_CHECK_HEADERS conditional. Configure can get very confused then.
--- a/configure.ac
+++ b/configure.ac
@@ -42,28 +42,6 @@
using_libltdl=$with_libltdl
fi
-using_win32_ltdl="no"
-if test "$using_libltdl" != "no"; then
- case $target in
- *mingw*)
- AC_DEFINE([HAVE_WIN32_LTDL_H], 1, [Define to 1 to use internal win32 ltdl])
- LIBLTDL=""
- using_win32_ltdl="yes"
- ;;
- *)
- AC_CHECK_HEADERS(ltdl.h,
- AC_CHECK_LIB(ltdl, lt_dlinit, LIBLTDL="$LIBLTDL -lltdl",
- using_libltdl=no), using_libltdl=no)
- ;;
- esac
-fi
-if test "$using_libltdl" = yes; then
- AC_DEFINE([HAVE_LIBLTDL], 1, [Define to 1 if you have libltdl])
-fi
-AM_CONDITIONAL(HAVE_LIBLTDL, test x$using_libltdl = xyes -a x$using_win32_ltdl = xno)
-AM_CONDITIONAL(HAVE_WIN32_LTDL, test x$using_win32_ltdl = xyes)
-AC_SUBST(LIBLTDL)
-
AC_LIBTOOL_DLOPEN
case $target in
*cygwin* | *mingw*)
@@ -202,6 +180,28 @@
fi
AC_SUBST(LIBTOOLFLAGS)
+dnl Check if ltdl should be enabled.
+using_win32_ltdl="no"
+if test "$using_libltdl" != "no"; then
+ case $target in
+ *mingw*)
+ AC_DEFINE([HAVE_WIN32_LTDL_H], 1, [Define to 1 to use internal win32 ltdl])
+ LIBLTDL=""
+ using_win32_ltdl="yes"
+ ;;
+ *)
+ AC_CHECK_HEADERS(ltdl.h,
+ AC_CHECK_LIB(ltdl, lt_dlinit, LIBLTDL="$LIBLTDL -lltdl",
+ using_libltdl=no), using_libltdl=no)
+ ;;
+ esac
+fi
+if test "$using_libltdl" = yes; then
+ AC_DEFINE([HAVE_LIBLTDL], 1, [Define to 1 if you have libltdl])
+fi
+AM_CONDITIONAL(HAVE_LIBLTDL, test x$using_libltdl = xyes -a x$using_win32_ltdl = xno)
+AM_CONDITIONAL(HAVE_WIN32_LTDL, test x$using_win32_ltdl = xyes)
+AC_SUBST(LIBLTDL)
dnl Check for GOMP library