]> git.street.me.uk Git - andy/viking.git/blame - configure.ac
Fix half-drawn problem for gps layer
[andy/viking.git] / configure.ac
CommitLineData
9903c388
EB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
13c9d849 5AC_INIT(viking, 0.9.2)
9903c388
EB
6AM_INIT_AUTOMAKE()
7dnl AC_CONFIG_SRCDIR([src/main.c])
8fe95819 8AC_CONFIG_HEADERS([src/config.h])
9903c388
EB
9
10# Checks for programs.
11AC_PROG_CC
12AC_PROG_MAKE_SET
13
9903c388
EB
14# Checks for header files.
15AC_HEADER_STDC
5868323c 16AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h unistd.h math.h])
9903c388
EB
17
18# Checks for typedefs, structures, and compiler characteristics.
19AC_C_CONST
20AC_TYPE_MODE_T
21
22# Checks for library functions.
23AC_FUNC_STAT
24AC_FUNC_STRTOD
eb93fa95 25AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir mkdtemp pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
9903c388 26
dad55b79 27# Expat
fa1b5a5f
GB
28AM_WITH_EXPAT
29
3292ba8b 30# Curl
f901dcdf 31LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found])])
3292ba8b 32
fa1b5a5f
GB
33AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
34if test $GDK_PIXBUF_CSOURCE != "yes"
35then
36 AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found])
37fi
38
39# Checks for libraries.
40AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
dad55b79 41
734652bf
EB
42# Options
43AC_ARG_ENABLE(alphabetized-trw, AC_HELP_STRING([--enable-alphabetized-trw],
44 [enable alphabetized track & waypoints (default is enable)]),
45 [ac_cv_enable_alpha_trw=$enableval],
46 [ac_cv_enable_alpha_trw=yes])
47AC_CACHE_CHECK([whether to enable alphabetized track & waypoint],
48 [ac_cv_enable_alpha_trw], [ac_cv_enable_alpha_trw=yes])
49case $ac_cv_enable_alpha_trw in
50 yes)
51 AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW])
52 ;;
53esac
54
cdcaf41c
QT
55AC_ARG_ENABLE(google, AC_HELP_STRING([--enable-google],
56 [enable Google stuff (default is enable)]),
57 [ac_cv_enable_google=$enableval],
58 [ac_cv_enable_google=yes])
59AC_CACHE_CHECK([whether to enable Google stuff],
60 [ac_cv_enable_google], [ac_cv_enable_google=yes])
61case $ac_cv_enable_google in
62 yes)
63 AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF])
64 ;;
65esac
66AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
67
36c78d6d
QT
68AC_ARG_ENABLE(oldgoogle, AC_HELP_STRING([--enable-old-google],
69 [enable old Google stuff (default is disable)]),
70 [ac_cv_enable_google=$enableval],
71 [ac_cv_enable_google=no])
72AC_CACHE_CHECK([whether to enable Old Google stuff],
73 [ac_cv_enable_old_google], [ac_cv_enable_old_google=yes])
74case $ac_cv_enable_google in
75 yes)
76 AC_DEFINE(VIK_CONFIG_OLD_GOOGLE, [], [OLD GOOGLE STUFF])
77 ;;
78esac
79AM_CONDITIONAL([OLDGOOGLE], [test x$ac_cv_enable_old_google = xyes])
80
cdcaf41c
QT
81AC_ARG_ENABLE(terraserver, AC_HELP_STRING([--enable-terraserver],
82 [enable Terraserver stuff (default is enable)]),
83 [ac_cv_enable_terraserver=$enableval],
84 [ac_cv_enable_terraserver=yes])
85AC_CACHE_CHECK([whether to enable Terraserver stuff],
86 [ac_cv_enable_terraserver], [ac_cv_enable_terraserver=yes])
87case $ac_cv_enable_terraserver in
88 yes)
89 AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF])
90 ;;
91esac
92AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes])
93
94AC_ARG_ENABLE(expedia, AC_HELP_STRING([--enable-expedia],
06f31fd5 95 [enable Expedia stuff (default is disable)]),
cdcaf41c 96 [ac_cv_enable_expedia=$enableval],
06f31fd5 97 [ac_cv_enable_expedia=no])
cdcaf41c
QT
98AC_CACHE_CHECK([whether to enable Expedia stuff],
99 [ac_cv_enable_expedia], [ac_cv_enable_expedia=yes])
100case $ac_cv_enable_expedia in
101 yes)
102 AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF])
103 ;;
104esac
105AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes])
106
ca9eb04a
GB
107# OpenStreetMap http://www.openstreetmap.org/
108AC_ARG_ENABLE(openstreetmap, AC_HELP_STRING([--enable-openstreetmap],
109 [enable OpenStreetMap stuff (default is enable)]),
110 [ac_cv_enable_openstreetmap=$enableval],
111 [ac_cv_enable_openstreetmap=yes])
112AC_CACHE_CHECK([whether to enable OpenStreetMap stuff],
113 [ac_cv_enable_openstreetmap], [ac_cv_enable_openstreetmap=yes])
114case $ac_cv_enable_openstreetmap in
115 yes)
116 AC_DEFINE(VIK_CONFIG_OPENSTREETMAP, [], [OPENSTREETMAP STUFF])
117 ;;
118esac
119AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes])
120
1ef9e637
QT
121AC_ARG_ENABLE(geocaches, AC_HELP_STRING([--enable-geocaches],
122 [enable Geocaches Acquire (default is disable). WARNING: Broken, do not enable]),
123 [ac_cv_enable_geocaches=$enableval],
124 [ac_cv_enable_geocaches=no])
125AC_CACHE_CHECK([whether to enable Geocaches Acquire],
126 [ac_cv_enable_geocaches], [ac_cv_enable_geocaches=yes])
127case $ac_cv_enable_geocaches in
128 yes)
129 AC_DEFINE(VIK_CONFIG_GEOCACHES, [], [GEOCACHES STUFF])
130 ;;
131esac
132AM_CONDITIONAL([GEOCACHES], [test x$ac_cv_enable_geocaches = xyes])
133
8c721f83
EB
134
135AC_ARG_ENABLE(dem24k, AC_HELP_STRING([--enable-dem24k],
136 [enable USGS 24k DEM (default is disable) download source. Requires dem24k.pl script in path.]),
137 [ac_cv_enable_dem24k=$enableval],
138 [ac_cv_enable_dem24k=no])
139AC_CACHE_CHECK([whether to enable USGS DEM 24k download source],
140 [ac_cv_enable_dem24k], [ac_cv_enable_dem24k=yes])
141case $ac_cv_enable_dem24k in
142 yes)
143 AC_DEFINE(VIK_CONFIG_DEM24K, [], [DEM24K STUFF])
144 ;;
145esac
146AM_CONDITIONAL([DEM24K], [test x$ac_cv_enable_dem24k = xyes])
147
1bc9b120
GB
148AC_ARG_WITH(mapcache,
149 [AC_HELP_STRING([--with-mapcache],
150 [specify the size of the map cache (default is 50331648)])],
151 [if test "x$withval" = "xno"; then
152 VIK_CONFIG_MAPCACHE_SIZE=0;
153 elif test "x$withval" = "xyes"; then
154 AC_MSG_ERROR([Please, set a value for size of the map cache])
155 else
156 VIK_CONFIG_MAPCACHE_SIZE=${withval}
157 fi],
158 [VIK_CONFIG_MAPCACHE_SIZE=50331648])
159AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
160 [Size of the map cache])
161
734652bf 162# Configuration
9903c388 163AC_CONFIG_FILES([Makefile
0912fc7e 164 src/Makefile
dad55b79 165 src/icons/Makefile
9d3e06a4 166 test/Makefile
0912fc7e
EB
167 doc/Makefile
168 doc/dev/Makefile])
af2740eb
QT
169AC_OUTPUT([
170 viking.spec
171 ])