-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
131 lines (109 loc) · 3 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(mumpot, 0.6)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_GNU_SOURCE
AC_USE_SYSTEM_EXTENSIONS
AC_HEADER_STDC
AM_PROG_LEX
AC_PROG_YACC
AM_GNU_GETTEXT_VERSION
AM_GNU_GETTEXT
AC_ARG_WITH(oldgtk,[--with-oldgtk Use gtk1.x],try_gtk1=yes,try_gtk1=no)
use_gtk1=no
osm_upload=yes
AC_ARG_ENABLE(osmupload,[--disable-osmupload Disable code to do osm uploads],osm_upload=$enableval,osm_upload=yes)
PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
PKG_CHECK_MODULES(PROJ, proj)
if test $osm_upload = yes ; then
PKG_CHECK_MODULES(LIBCURL,libcurl, osm_upload=yes, osm_upload=no)
fi
if test $osm_upload = yes ; then
AC_DEFINE(ENABLE_OSM_UPLOAD,1,[enable osm upload code])
fi
AM_CONDITIONAL(OSM_UPLOAD, test $osm_upload = yes)
use_gtk2=no
if test x$try_gtk1 = xno ; then
AM_PATH_GTK_2_0(2.0.0,use_gtk2=yes, use_gtk=no)
fi
if test x$use_gtk2 = xno ; then
if test x$try_gtk1 = xno ; then
AC_MSG_ERROR(Cannot find GTK2.0)
fi
AM_PATH_GTK(1.2.0, ,
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
fi
if test x$use_gtk2 = xyes ;then
AC_DEFINE(USE_GTK2,1,[use gtk2])
fi
BZ2=no
AC_CHECK_HEADERS(bzlib.h)
AC_CHECK_LIB(bz2, BZ2_bzRead, LIBS="-lbz2 $LIBS" ; BZ2=yes)
LIBPAPER=no
AC_CHECK_HEADERS(paper.h)
AC_CHECK_LIB(paper, paperfirst, LIBS="-lpaper $LIBS" ; LIBPAPER=yes)
GETTEXT_PACKAGE=mumpot
AC_SUBST(GETTEXT_PACKAGE)
BTLIBS="-lbluetooth"
case "$host_alias" in
*mingw*)
LIBS="-lwsock32 $LIBS";
BTLIBS="" ;;
esac
AC_SUBST(BTLIBS)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [package data dir])
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[package data dir])
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [package data dir])
fi
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [packaage source dir])
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
echo Summary:
if test x$use_gtk2 = xyes ; then
echo "Using GTK 2"
else
echo "Using GTK 1.2"
fi
if test x$osm_upload = xyes ; then
echo "OSM upload using curl is possible"
else
echo "OSM upload disabled"
fi
if test x$LIBPAPER = xyes ; then
echo "Using paper sizes from libpaper"
else
echo "Using own papersize table"
fi
echo "Support for .bz2 decompression of osm files: $BZ2"
changequote([,])dnl
AC_OUTPUT([
Makefile
src/Makefile
doc/Makefile
intl/Makefile
po/Makefile.in
config-examples/Makefile
config-examples/mumpot-tah
config-examples/mumpot-mapnik
config-examples/mumpot-cyclemap
config-examples/mumpot-maplint15
])