]> git.street.me.uk Git - andy/viking.git/blame - configure.ac
Guilhem's autotools support/alphabetized trw option
[andy/viking.git] / configure.ac
CommitLineData
9903c388
EB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(viking, 0.1.1)
6AM_INIT_AUTOMAKE()
7dnl AC_CONFIG_SRCDIR([src/main.c])
734652bf 8dnl AC_CONFIG_HEADERS([config.h])
9903c388
EB
9
10# Checks for programs.
11AC_PROG_CC
12AC_PROG_MAKE_SET
13
14# Checks for libraries.
15AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread)
16
17# Checks for header files.
18AC_HEADER_STDC
19AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h unistd.h])
20
21# Checks for typedefs, structures, and compiler characteristics.
22AC_C_CONST
23AC_TYPE_MODE_T
24
25# Checks for library functions.
26AC_FUNC_STAT
27AC_FUNC_STRTOD
28AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
29
734652bf
EB
30# Options
31AC_ARG_ENABLE(alphabetized-trw, AC_HELP_STRING([--enable-alphabetized-trw],
32 [enable alphabetized track & waypoints (default is enable)]),
33 [ac_cv_enable_alpha_trw=$enableval],
34 [ac_cv_enable_alpha_trw=yes])
35AC_CACHE_CHECK([whether to enable alphabetized track & waypoint],
36 [ac_cv_enable_alpha_trw], [ac_cv_enable_alpha_trw=yes])
37case $ac_cv_enable_alpha_trw in
38 yes)
39 AC_DEFINE(VIK_CONFIG_ALPHABETIZED_TRW, [], [NO ALPHABETIZED TRW])
40 ;;
41esac
42
43# Configuration
9903c388
EB
44AC_CONFIG_FILES([Makefile
45 src/Makefile])
46AC_OUTPUT