X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/d82c61e8b0ff6b7660ec0288c50e6f3e6547ed4a..f8b626c27a45abf36ee0f3d65e8ef5d19b6ede98:/configure.ac diff --git a/configure.ac b/configure.ac index 808965b..5de7569 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,9 @@ +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. + AC_PREREQ(2.62) AC_INIT([upkg],[0.1],[nbowler@draconx.ca]) AC_CONFIG_SRCDIR([src/libupkg.c]) @@ -5,6 +11,7 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC_C99 gl_EARLY @@ -17,17 +24,7 @@ AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x]) gl_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 +CHECK_GLIB_2([], [gobject]) AC_ARG_WITH([modlib], [AS_HELP_STRING([--with-modlib], @@ -36,23 +33,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 @@ -63,17 +53,17 @@ 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]) -AM_CONDITIONAL([BUILD_UPKG], [test x$have_gobject = xyes]) - AC_CONFIG_FILES([ Makefile libltdl/Makefile lib/Makefile src/Makefile + libuobject.pc ]) AC_OUTPUT