import from branch_1_1:
[freeradius.git] / configure.in
index 29cf7ff..b187377 100644 (file)
@@ -75,6 +75,12 @@ fi
 dnl libltdl is installable
 AC_LIBLTDL_INSTALLABLE
 
+dnl tell Makefile to build ltdl if needed
+if test x"$enable_ltdl_install" = x"yes"; then
+  LTDL_SUBDIRS=libltdl
+fi
+AC_SUBST(LTDL_SUBDIRS)
+
 dnl use system-wide libtool, if it exists
 AC_ARG_WITH(system-libtool,
 [  --with-system-libtool              try to use libtool installed in your system [default=use our own]],
@@ -227,14 +233,6 @@ AC_ARG_WITH(snmp,
   esac ]
 )
 
-dnl AC_ARG_ENABLE(ltdl-install,
-dnl [  --disable-ltdl-install  do not install libltdl])
-dnl if test x"${enable_ltdl_install+set}" != xset; then
-dnl   enable_ltdl_install=yes
-dnl   ac_configure_args="$ac_configure_args --enable-ltdl-install"
-dnl fi
-dnl AC_CONFIG_SUBDIRS(libltdl)
-
 dnl #
 dnl #  Allow the user to specify a list of modules to be linked
 dnl #  statically to the server.
@@ -1024,13 +1022,6 @@ dnl # AC_SUBST(top_builddir)
 AC_SUBST(LIBLTDL)
 AC_SUBST(INCLTDL)
 
-dnl #
-dnl #  Work around stupid autoconf crap
-dnl #
-if test "x$INCLTDL" != "x";then
-  INCLTDL='-I${top_builddir}/''libltdl'
-fi
-
 dnl import libtool stuff
 
 dnl #############################################################
@@ -1075,7 +1066,7 @@ dnl #
 dnl #  Don't change the variable name here.  Autoconf goes bonkers
 dnl #  if you do.
 dnl #
-AC_CONFIG_SUBDIRS($mysubdirs)
+AC_CONFIG_SUBDIRS($LTDL_SUBDIRS $mysubdirs)
 AC_SUBST(MODULES)
 
 dnl #############################################################