]> git.draconx.ca Git - upkg.git/blobdiff - configure.ac
libupkg: Make decodeindex test accept an empty string.
[upkg.git] / configure.ac
index 88441157f3797a3cef6e5d29b4584c97d4142a52..48ccbb228db67b2f970c691bf23a0693661c26ac 100644 (file)
@@ -1,8 +1,8 @@
-dnl Copyright (C) 2009 Nick Bowler
-dnl Copying and distribution of this file, with or without modification,
-dnl are permitted in any medium without royalty provided the copyright
-dnl notice and this notice are preserved.  This file is offered as-is,
-dnl without any warranty.
+dnl Copyright © 2009-2011 Nick Bowler
+dnl
+dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+dnl This is free software: you are free to do what the fuck you want to.
+dnl There is NO WARRANTY, to the extent permitted by law.
 
 AC_PREREQ(2.62)
 AC_INIT([upkg],[0.1],[nbowler@draconx.ca])
@@ -18,12 +18,14 @@ gl_EARLY
 
 LT_CONFIG_LTDL_DIR([libltdl])
 LT_INIT([dlopen])
-LTDL_INIT([recursive])
+LTDL_INIT([nonrecursive])
 
 AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x])
 
 gl_INIT
 
+m4_include([lib/gnulib.mk])
+
 CHECK_GLIB_2([], [gobject])
 
 AC_ARG_WITH([modlib],
@@ -33,23 +35,16 @@ AC_ARG_WITH([modlib],
        [with_modlib=$withval],
        [with_modlib=auto])
 
-CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
-AC_MSG_CHECKING([which module library to use])
 case $with_modlib in
-none)
-       use_modlib=none
-;;
-no)
+no|none)
        use_modlib=none
 ;;
 modplug)
-       if test x$have_libmodplug = xyes; then
-               use_modlib=modplug
-       else
-               use_modlib=none
-       fi
+       DX_CHECK_LIBMODPLUG([use_modlib=modplug], [])
 ;;
 auto)
+       DX_CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
+
        if test x$have_libmodplug = xyes; then
                use_modlib=modplug
        else
@@ -60,16 +55,16 @@ auto)
        AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])
 ;;
 esac
+AC_MSG_CHECKING([which module library to use])
 AC_MSG_RESULT([$use_modlib])
 
 AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug])
 AM_CONDITIONAL([USE_DUMMYMOD],   [test x$use_modlib = xnone])
 
+GOB2_CHECK([2.0.0])
+
 AC_CONFIG_FILES([
        Makefile
-       libltdl/Makefile
-       lib/Makefile
-       src/Makefile
        libuobject.pc
 ])
 AC_OUTPUT