X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/21b765a5e880c966a965fc40922ca6257bc465c6..852d25c6fea13f6ffce0e48a17c50817d439c9c0:/configure.ac?ds=sidebyside diff --git a/configure.ac b/configure.ac index 58638b4..752343f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,56 @@ +dnl Copyright © 2009-2012, 2015, 2019 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]) -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 -Wno-portability foreign subdir-objects]) +AM_SILENT_RULES([yes]) +DX_AUTOMAKE_COMPAT AC_PROG_CC_C99 +gl_EARLY + +LT_CONFIG_LTDL_DIR([libltdl]) +LT_INIT([dlopen]) +LTDL_INIT([nonrecursive]) + +gl_INIT + +m4_include([lib/gnulib.mk]) + +CHECK_GLIB_2([], [gobject]) + +AC_ARG_WITH([modlib], + [AS_HELP_STRING([--with-modlib], + [specify which module decoding library to use - one of modplug, none or auto. [default=auto]] + )], + [with_modlib=$withval], + [with_modlib=auto]) + +use_modlib=none +AS_CASE([$with_modlib], + [no|none], [:], + [modplug], [DX_LIB_LIBMODPLUG([use_modlib=modplug])], + [auto], [DX_LIB_LIBMODPLUG([use_modlib=modplug], [:])], + [AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])]) + +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]) -LT_INIT +GOB2_CHECK([2.0.0]) AC_CONFIG_FILES([ Makefile + libuobject.pc ]) AC_OUTPUT