2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(viking, modular.1)
7 dnl AC_CONFIG_SRCDIR([src/main.c])
8 AC_CONFIG_HEADERS([src/config.h])
10 # Checks for programs.
14 # Checks for header files.
16 AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h unistd.h])
18 # Checks for typedefs, structures, and compiler characteristics.
22 # Checks for library functions.
25 AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
30 AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
31 if test $GDK_PIXBUF_CSOURCE != "yes"
33 AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found])
36 # Checks for libraries.
37 AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
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
48 AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW])
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
60 AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF])
63 AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
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
73 AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF])
76 AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes])
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
86 AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF])
89 AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes])
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])
99 VIK_CONFIG_MAPCACHE_SIZE=${withval}
101 [VIK_CONFIG_MAPCACHE_SIZE=50331648])
102 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
103 [Size of the map cache])
106 AC_CONFIG_FILES([Makefile