2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(viking, 0.1.1pre2)
7 dnl AC_CONFIG_SRCDIR([src/main.c])
8 AC_CONFIG_HEADERS([config.h])
10 # Checks for programs.
14 AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
15 if test $GDK_PIXBUF_CSOURCE != "yes"
17 AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found])
20 # Checks for libraries.
21 AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
23 # Checks for header files.
25 AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h unistd.h])
27 # Checks for typedefs, structures, and compiler characteristics.
31 # Checks for library functions.
34 AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
39 AC_ARG_ENABLE(alphabetized-trw, AC_HELP_STRING([--enable-alphabetized-trw],
40 [enable alphabetized track & waypoints (default is enable)]),
41 [ac_cv_enable_alpha_trw=$enableval],
42 [ac_cv_enable_alpha_trw=yes])
43 AC_CACHE_CHECK([whether to enable alphabetized track & waypoint],
44 [ac_cv_enable_alpha_trw], [ac_cv_enable_alpha_trw=yes])
45 case $ac_cv_enable_alpha_trw in
47 AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW])
52 [AC_HELP_STRING([--with-mapcache],
53 [specify the size of the map cache (default is 50331648)])],
54 [if test "x$withval" = "xno"; then
55 VIK_CONFIG_MAPCACHE_SIZE=0;
56 elif test "x$withval" = "xyes"; then
57 AC_MSG_ERROR([Please, set a value for size of the map cache])
59 VIK_CONFIG_MAPCACHE_SIZE=${withval}
61 [VIK_CONFIG_MAPCACHE_SIZE=50331648])
62 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
63 [Size of the map cache])
66 AC_CONFIG_FILES([Makefile