]> git.draconx.ca Git - upkg.git/blobdiff - configure.ac
Add libltdl.
[upkg.git] / configure.ac
index debf262d9d3f17ed199054266d429148981a5fbd..f86b8dd1d234db4073b67eff58206c0a34ec1e50 100644 (file)
@@ -4,14 +4,33 @@ AC_CONFIG_SRCDIR([src/libupkg.c])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
 
 AC_PROG_CC_C99
 
-LT_INIT
+AC_ARG_WITH([gobject],
+       [AS_HELP_STRING([--with-gobject],
+               [build tools requiring libgobject [default=yes]]
+       )],
+       [],
+       [with_gobject=yes])
+
+have_gobject=no
+if test x$with_gobject = xyes; then
+AM_PATH_GLIB_2_0(, [have_gobject=yes], [have_gobject=no], [gobject])
+fi
+
+AM_CONDITIONAL([BUILD_UPKG], [test x$have_gobject = xyes])
+
+LT_CONFIG_LTDL_DIR([libltdl])
+LT_INIT([dlopen])
+LTDL_INIT([recursive])
+
+AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x])
 
 AC_CONFIG_FILES([
        Makefile
+       libltdl/Makefile
        src/Makefile
 ])
 AC_OUTPUT