2 AC_INIT([upkg],[0.1],[nbowler@draconx.ca])
3 AC_CONFIG_SRCDIR([src/libupkg.c])
4 AC_CONFIG_HEADER([config.h])
5 AC_CONFIG_MACRO_DIR([m4])
7 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
13 LT_CONFIG_LTDL_DIR([libltdl])
15 LTDL_INIT([recursive])
17 AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x])
21 AC_ARG_WITH([gobject],
22 [AS_HELP_STRING([--with-gobject],
23 [build tools requiring libgobject [default=yes]]
29 if test x$with_gobject = xyes; then
30 AM_PATH_GLIB_2_0(, [have_gobject=yes], [have_gobject=no], [gobject])
34 [AS_HELP_STRING([--with-modlib],
35 [specify which module decoding library to use - one of modplug, none or auto. [default=auto]]
37 [with_modlib=$withval],
40 CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
41 AC_MSG_CHECKING([which module library to use])
50 if test x$have_libmodplug = xyes; then
57 if test x$have_libmodplug = xyes; then
64 AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])
67 AC_MSG_RESULT([$use_modlib])
69 AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug])
70 AM_CONDITIONAL([USE_DUMMYMOD], [test x$use_modlib = xnone])
72 AM_CONDITIONAL([BUILD_UPKG], [test x$have_gobject = xyes])