Fix a google version number change
[viking/guyou.git] / configure.ac
blob21c9e773d01840076786b0bc9ad700c4cd2a9f4e
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
5 AC_INIT(viking, 0.1.1)
6 AM_INIT_AUTOMAKE()
7 dnl AC_CONFIG_SRCDIR([src/main.c])
8 AC_CONFIG_HEADERS([src/config.h])
10 # Checks for programs.
11 AC_PROG_CC
12 AC_PROG_MAKE_SET
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])
18 # Checks for typedefs, structures, and compiler characteristics.
19 AC_C_CONST
20 AC_TYPE_MODE_T
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])
27 # Expat
28 AM_WITH_EXPAT
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])
36 # Checks for libraries.
37 AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
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
52 AC_ARG_WITH(mapcache,
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])
59              else
60                 VIK_CONFIG_MAPCACHE_SIZE=${withval}
61              fi],
62              [VIK_CONFIG_MAPCACHE_SIZE=50331648])
63 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
64                    [Size of the map cache])
66 # Configuration
67 AC_CONFIG_FILES([Makefile
68                  src/Makefile
69                  src/icons/Makefile
70                  test/Makefile
71                  doc/Makefile
72                  doc/dev/Makefile])
73 AC_OUTPUT