]> git.street.me.uk Git - andy/viking.git/blame - configure.ac
Preparing 0.1.2
[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)
07f39a64 5AC_INIT(viking, 0.1.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
16AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h unistd.h])
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
25AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
26
dad55b79 27# Expat
fa1b5a5f
GB
28AM_WITH_EXPAT
29
30AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
31if test $GDK_PIXBUF_CSOURCE != "yes"
32then
33 AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found])
34fi
35
36# Checks for libraries.
37AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
dad55b79 38
734652bf
EB
39# Options
40AC_ARG_ENABLE(alphabetized-trw, AC_HELP_STRING([--enable-alphabetized-trw],
41 [enable alphabetized track & waypoints (default is enable)]),
42 [ac_cv_enable_alpha_trw=$enableval],
43 [ac_cv_enable_alpha_trw=yes])
44AC_CACHE_CHECK([whether to enable alphabetized track & waypoint],
45 [ac_cv_enable_alpha_trw], [ac_cv_enable_alpha_trw=yes])
46case $ac_cv_enable_alpha_trw in
47 yes)
48 AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW])
49 ;;
50esac
51
cdcaf41c
QT
52AC_ARG_ENABLE(google, AC_HELP_STRING([--enable-google],
53 [enable Google stuff (default is enable)]),
54 [ac_cv_enable_google=$enableval],
55 [ac_cv_enable_google=yes])
56AC_CACHE_CHECK([whether to enable Google stuff],
57 [ac_cv_enable_google], [ac_cv_enable_google=yes])
58case $ac_cv_enable_google in
59 yes)
60 AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF])
61 ;;
62esac
63AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
64
65AC_ARG_ENABLE(terraserver, AC_HELP_STRING([--enable-terraserver],
66 [enable Terraserver stuff (default is enable)]),
67 [ac_cv_enable_terraserver=$enableval],
68 [ac_cv_enable_terraserver=yes])
69AC_CACHE_CHECK([whether to enable Terraserver stuff],
70 [ac_cv_enable_terraserver], [ac_cv_enable_terraserver=yes])
71case $ac_cv_enable_terraserver in
72 yes)
73 AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF])
74 ;;
75esac
76AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes])
77
78AC_ARG_ENABLE(expedia, AC_HELP_STRING([--enable-expedia],
79 [enable Expedia stuff (default is enable)]),
80 [ac_cv_enable_expedia=$enableval],
81 [ac_cv_enable_expedia=yes])
82AC_CACHE_CHECK([whether to enable Expedia stuff],
83 [ac_cv_enable_expedia], [ac_cv_enable_expedia=yes])
84case $ac_cv_enable_expedia in
85 yes)
86 AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF])
87 ;;
88esac
89AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes])
90
1bc9b120
GB
91AC_ARG_WITH(mapcache,
92 [AC_HELP_STRING([--with-mapcache],
93 [specify the size of the map cache (default is 50331648)])],
94 [if test "x$withval" = "xno"; then
95 VIK_CONFIG_MAPCACHE_SIZE=0;
96 elif test "x$withval" = "xyes"; then
97 AC_MSG_ERROR([Please, set a value for size of the map cache])
98 else
99 VIK_CONFIG_MAPCACHE_SIZE=${withval}
100 fi],
101 [VIK_CONFIG_MAPCACHE_SIZE=50331648])
102AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
103 [Size of the map cache])
104
734652bf 105# Configuration
9903c388 106AC_CONFIG_FILES([Makefile
0912fc7e 107 src/Makefile
dad55b79 108 src/icons/Makefile
9d3e06a4 109 test/Makefile
0912fc7e
EB
110 doc/Makefile
111 doc/dev/Makefile])
9903c388 112AC_OUTPUT