]> git.draconx.ca Git - upkg.git/blob - configure.ac
upkg: Add a simple man page.
[upkg.git] / configure.ac
1 dnl Copyright (C) 2009 Nick Bowler
2 dnl Copying and distribution of this file, with or without modification,
3 dnl are permitted in any medium without royalty provided the copyright
4 dnl notice and this notice are preserved.  This file is offered as-is,
5 dnl without any warranty.
6
7 AC_PREREQ(2.62)
8 AC_INIT([upkg],[0.1],[nbowler@draconx.ca])
9 AC_CONFIG_SRCDIR([src/libupkg.c])
10 AC_CONFIG_HEADER([config.h])
11 AC_CONFIG_MACRO_DIR([m4])
12
13 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15
16 AC_PROG_CC_C99
17 gl_EARLY
18
19 LT_CONFIG_LTDL_DIR([libltdl])
20 LT_INIT([dlopen])
21 LTDL_INIT([recursive])
22
23 AM_CONDITIONAL([BUNDLED_LIBLTDL], [test x$LTDLDEPS != x])
24
25 gl_INIT
26
27 CHECK_GLIB_2([], [gobject])
28
29 AC_ARG_WITH([modlib],
30         [AS_HELP_STRING([--with-modlib],
31                 [specify which module decoding library to use - one of modplug, none or auto. [default=auto]]
32         )],
33         [with_modlib=$withval],
34         [with_modlib=auto])
35
36 CHECK_LIBMODPLUG([have_libmodplug=yes], [have_libmodplug=no])
37 AC_MSG_CHECKING([which module library to use])
38 case $with_modlib in
39 none)
40         use_modlib=none
41 ;;
42 no)
43         use_modlib=none
44 ;;
45 modplug)
46         if test x$have_libmodplug = xyes; then
47                 use_modlib=modplug
48         else
49                 use_modlib=none
50         fi
51 ;;
52 auto)
53         if test x$have_libmodplug = xyes; then
54                 use_modlib=modplug
55         else
56                 use_modlib=none
57         fi
58 ;;
59 *)
60         AC_MSG_ERROR([Invalid argument to --with-modlib: $with_modlib])
61 ;;
62 esac
63 AC_MSG_RESULT([$use_modlib])
64
65 AM_CONDITIONAL([USE_LIBMODPLUG], [test x$use_modlib = xmodplug])
66 AM_CONDITIONAL([USE_DUMMYMOD],   [test x$use_modlib = xnone])
67
68 AC_CONFIG_FILES([
69         Makefile
70         libltdl/Makefile
71         lib/Makefile
72         src/Makefile
73         libuobject.pc
74 ])
75 AC_OUTPUT