]> git.draconx.ca Git - upkg.git/blob - configure.ac
uobject: Split uobject stuff into its own library.
[upkg.git] / configure.ac
1 AC_PREREQ(2.62)
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])
6
7 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9
10 AC_PROG_CC_C99
11 gl_EARLY
12
13 LT_CONFIG_LTDL_DIR([libltdl])
14 LT_INIT([dlopen])
15 LTDL_INIT([recursive])
16
17 AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x])
18
19 gl_INIT
20
21 CHECK_GLIB_2([], [gobject])
22
23 AC_ARG_WITH([modlib],
24         [AS_HELP_STRING([--with-modlib],
25                 [specify which module decoding library to use - one of modplug, none or auto. [default=auto]]
26         )],
27         [with_modlib=$withval],
28         [with_modlib=auto])
29
30 CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
31 AC_MSG_CHECKING([which module library to use])
32 case $with_modlib in
33 none)
34         use_modlib=none
35 ;;
36 no)
37         use_modlib=none
38 ;;
39 modplug)
40         if test x$have_libmodplug = xyes; then
41                 use_modlib=modplug
42         else
43                 use_modlib=none
44         fi
45 ;;
46 auto)
47         if test x$have_libmodplug = xyes; then
48                 use_modlib=modplug
49         else
50                 use_modlib=none
51         fi
52 ;;
53 *)
54         AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])
55 ;;
56 esac
57 AC_MSG_RESULT([$use_modlib])
58
59 AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug])
60 AM_CONDITIONAL([USE_DUMMYMOD],   [test x$use_modlib = xnone])
61
62 AC_CONFIG_FILES([
63         Makefile
64         libltdl/Makefile
65         lib/Makefile
66         src/Makefile
67 ])
68 AC_OUTPUT