]> git.draconx.ca Git - upkg.git/blobdiff - configure.ac
Add libltdl.
[upkg.git] / configure.ac
index 58638b4b42e7caa7f76e05e67c8fb64ddfd1ed5e..f86b8dd1d234db4073b67eff58206c0a34ec1e50 100644 (file)
@@ -1,16 +1,36 @@
 AC_PREREQ(2.62)
 AC_INIT([upkg],[0.1],[nbowler@draconx.ca])
-AC_CONFIG_SRCDIR([pack.c])
+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