root/libswish3/tags/10Feb2008/configure.ac

Revision 2009, 1.7 kB (checked in by karpet, 8 months ago)

rename some vars for clarity

Line 
1 AC_INIT([libswish3], [0.1.0],
2         [Peter Karman <peter@peknet.com>],
3         [libswish3])
4 AM_INIT_AUTOMAKE
5 AM_CONFIG_HEADER(src/acconfig.h)
6 AC_PROG_CC
7 AC_PROG_INSTALL
8 AC_CONFIG_FILES([
9                 Makefile
10                 src/Makefile
11                 src/libswish3/Makefile
12                 doc/Makefile
13                 libswish3.pc
14                 libswish3-config
15                 ])
16                
17 dnl libxml2 required to build
18
19 LIBXML_REQUIRED_VERSION=2.6.0
20 XML2_CONFIG_PATH=$PATH
21 AC_PATH_PROG(XML2_CONFIG, xml2-config,"no", $XML2_CONFIG_PATH)               
22 if test "$XML2_CONFIG" = "no"; then
23     withval="no"
24 else
25     withval=`$XML2_CONFIG --prefix`
26 fi
27
28 if test "$withval" = "no"; then
29     AC_MSG_RESULT([libxml2 required])
30 else
31
32     AC_SUBST(LIBXML_REQUIRED_VERSION)
33     AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED_VERSION)
34
35     AC_DEFUN([VERSION_TO_NUMBER],
36     [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
37
38     vers=VERSION_TO_NUMBER($XML2_CONFIG --version)
39     XML2_VERSION=`$XML2_CONFIG --version`
40
41     if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION);then
42         AC_MSG_RESULT(found version $XML2_VERSION)
43     else
44         AC_MSG_ERROR(You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libswish3)
45     fi
46
47
48     AC_DEFINE(HAVE_LIBXML2,[],[Libxml2 support included])
49
50 fi
51
52 dnl Check pod2man for creating man pages
53 AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [false])
54 if test "$POD2MAN" = "false"; then
55     dnl disable building of man pages?
56     AC_MSG_WARN([pod2man was not found - needed for building man pages])
57 fi
58
59                
60 AC_PROG_LIBTOOL
61 AC_PROG_MAKE_SET
62 AC_OUTPUT
Note: See TracBrowser for help on using the browser.