source: subversion/applications/utils/mod_mapnik_wms/configure.in @ 26141

Last change on this file since 26141 was 22430, checked in by frederik, 10 years ago

initial release of mod_mapnik_wms, an apache2 module for running a mapnik-based wms. documentation & mailing list announcement to follow in a few days

File size: 2.7 KB
Line 
1# Process this file with autoconf to produce a configure script.
2
3AC_INIT(mod_mapnik_wms.c,0.1)
4AM_INIT_AUTOMAKE()
5AC_CONFIG_HEADERS(config.h)
6
7AC_PROG_CXX
8AC_PROG_CXXCPP
9AC_LANG_CPLUSPLUS
10AC_CANONICAL_HOST
11AC_PROG_INSTALL
12AC_PROG_LIBTOOL
13
14AC_HEADER_STDC
15
16
17# this will look for apxs command - put it in $APXS, fail on failure
18AX_WITH_APXS()
19# find apr-config binary
20AC_ARG_WITH(apr_config, AC_HELP_STRING([[--with-apr-config=FILE]], [Path to apr-config program]),
21    [ apr_config="$withval" ],
22    [AC_PATH_PROGS(apr_config,
23        [apr-config apr-0-config apr-1-config],
24        [no],
25        [$PATH:/usr/sbin/:/usr/local/apache2/bin]
26    )]
27)
28
29if test "$apr_config" = "no"; then
30   AC_MSG_ERROR(Could not find the apr-config program.  You can specify a location with the --with-apr-config=FILE option.  It may be named apr-0-config or apr-1-config and can be found in your apache2 bin directory.)
31fi
32$apr_config --cppflags &> /dev/null
33if test "$?" != "0"; then
34  AC_MSG_ERROR($apr_config is not a valid apr-config program)
35fi
36
37APACHE_CFLAGS="-I`${APXS} -q INCLUDEDIR` -I`${apr_config} --includedir`"
38AC_SUBST(APACHE_CFLAGS)
39
40
41AX_PATH_BDB([3], [], [
42    AC_MSG_ERROR([No C++ BDB library found])
43  ])
44AC_SUBST([BDB_LIBS])
45AC_SUBST([BDB_CPPFLAGS])
46
47
48AC_ARG_WITH(mapnik-headers,
49            [AC_HELP_STRING(
50              [--with-mapnik-headers],
51              [Path to mapnik header files])
52            ],
53            [CPPFLAGS="-I$withval"])
54
55AC_ARG_WITH(mapnik-libdir,
56            [AC_HELP_STRING(
57              [--with-mapnik-libdir],
58              [Path to mapnik libraries])
59            ],
60            [LDFLAGS="-L$withval"])
61
62AC_ARG_WITH(freetype,dnl
63[  --with-freetype=DIR     where to find the freetype 2.x library],
64  [if test "$withval" != no; then
65     if test "$withval" != yes; then
66       FREETYPE_DIR=$withval
67     fi
68   fi])
69
70if test -n "$FREETYPE_DIR"; then
71    AC_PATH_PROG(FREETYPE_CONFIG,freetype-config,,[$FREETYPE_DIR/bin:$PATH])
72else
73    AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
74fi
75
76if test -n "$FREETYPE_CONFIG"; then
77    if test -n "$FREETYPE_DIR"; then
78      libft_INCLUDES="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include"
79    else
80      libft_INCLUDES=`$FREETYPE_CONFIG --cflags`
81    fi
82    libft_LDFLAGS=`$FREETYPE_CONFIG --libs`
83    libft_LDFLAGS=`echo " $libft_LDFLAGS" |sed 's/ -l[[^ ]][[^ ]]*//g'`
84else
85    AC_MSG_ERROR(You must have freetype-config to build mod_mapnik_wms.)
86fi
87CPPFLAGS="$libft_INCLUDES $CPPFLAGS"
88LDFLAGS="$libft_LDFLAGS $LDFLAGS"
89
90AC_CHECK_HEADERS(mapnik/map.hpp, ,
91        AC_MSG_ERROR(You must have mapnik.hpp to build mod_mapnik_wms.))
92
93AC_CHECK_HEADERS(gd.h, ,
94        AC_MSG_ERROR(You must have gd.h to build mod_mapnik_wms.))
95
96AC_SUBST(CPPFLAGS)
97AC_SUBST(LDFLAGS)
98AC_SUBST(LIBS)
99
100AC_OUTPUT(Makefile)
101
Note: See TracBrowser for help on using the repository browser.