]>
Commit | Line | Data |
---|---|---|
9903c388 EB |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
4 | AC_PREREQ(2.59) | |
07f39a64 | 5 | AC_INIT(viking, 0.1.2) |
9903c388 EB |
6 | AM_INIT_AUTOMAKE() |
7 | dnl AC_CONFIG_SRCDIR([src/main.c]) | |
8fe95819 | 8 | AC_CONFIG_HEADERS([src/config.h]) |
9903c388 EB |
9 | |
10 | # Checks for programs. | |
11 | AC_PROG_CC | |
12 | AC_PROG_MAKE_SET | |
13 | ||
9903c388 EB |
14 | # Checks for header files. |
15 | AC_HEADER_STDC | |
16 | AC_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. | |
19 | AC_C_CONST | |
20 | AC_TYPE_MODE_T | |
21 | ||
22 | # Checks for library functions. | |
23 | AC_FUNC_STAT | |
24 | AC_FUNC_STRTOD | |
25 | AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul]) | |
26 | ||
dad55b79 | 27 | # Expat |
fa1b5a5f GB |
28 | AM_WITH_EXPAT |
29 | ||
30 | AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes]) | |
31 | if test $GDK_PIXBUF_CSOURCE != "yes" | |
32 | then | |
33 | AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found]) | |
34 | fi | |
35 | ||
36 | # Checks for libraries. | |
37 | AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread) | |
dad55b79 | 38 | |
734652bf EB |
39 | # Options |
40 | AC_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]) | |
44 | AC_CACHE_CHECK([whether to enable alphabetized track & waypoint], | |
45 | [ac_cv_enable_alpha_trw], [ac_cv_enable_alpha_trw=yes]) | |
46 | case $ac_cv_enable_alpha_trw in | |
47 | yes) | |
48 | AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW]) | |
49 | ;; | |
50 | esac | |
51 | ||
cdcaf41c QT |
52 | AC_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]) | |
56 | AC_CACHE_CHECK([whether to enable Google stuff], | |
57 | [ac_cv_enable_google], [ac_cv_enable_google=yes]) | |
58 | case $ac_cv_enable_google in | |
59 | yes) | |
60 | AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF]) | |
61 | ;; | |
62 | esac | |
63 | AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes]) | |
64 | ||
65 | AC_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]) | |
69 | AC_CACHE_CHECK([whether to enable Terraserver stuff], | |
70 | [ac_cv_enable_terraserver], [ac_cv_enable_terraserver=yes]) | |
71 | case $ac_cv_enable_terraserver in | |
72 | yes) | |
73 | AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF]) | |
74 | ;; | |
75 | esac | |
76 | AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes]) | |
77 | ||
78 | AC_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]) | |
82 | AC_CACHE_CHECK([whether to enable Expedia stuff], | |
83 | [ac_cv_enable_expedia], [ac_cv_enable_expedia=yes]) | |
84 | case $ac_cv_enable_expedia in | |
85 | yes) | |
86 | AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF]) | |
87 | ;; | |
88 | esac | |
89 | AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes]) | |
90 | ||
1bc9b120 GB |
91 | AC_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]) | |
102 | AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE}, | |
103 | [Size of the map cache]) | |
104 | ||
734652bf | 105 | # Configuration |
9903c388 | 106 | AC_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]) | |
af2740eb QT |
112 | AC_OUTPUT([ |
113 | viking.spec | |
114 | ]) |