2 # Process this file with autoconf to produce a configure script.
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])
53 [AC_HELP_STRING([--with-mapcache],
54 [specify the size of the map cache (default is 50331648)])],
55 [if test "x$withval" = "xno"; then
56 VIK_CONFIG_MAPCACHE_SIZE=0;
57 elif test "x$withval" = "xyes"; then
58 AC_MSG_ERROR([Please, set a value for size of the map cache])
60 VIK_CONFIG_MAPCACHE_SIZE=${withval}
62 [VIK_CONFIG_MAPCACHE_SIZE=50331648])
63 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
64 [Size of the map cache])
67 AC_CONFIG_FILES([Makefile