1 |
# -*- Autoconf -*-
|
2 |
# Process this file with autoconf to produce a configure script.
|
3 |
|
4 |
AC_PREREQ(2.57)
|
5 |
AC_INIT(gpx2shp, 0.69, kogame at gmail.com)
|
6 |
AM_INIT_AUTOMAKE(gpx2shp, 0.69)
|
7 |
AC_CONFIG_SRCDIR(src/main.c)
|
8 |
AM_CONFIG_HEADER(src/config.h)
|
9 |
|
10 |
# Checks for programs.
|
11 |
AC_PROG_CC
|
12 |
AC_PROG_MAKE_SET
|
13 |
|
14 |
# Ask GCC to give us heaps of warnings
|
15 |
if eval "test x$GCC = xyes"; then
|
16 |
CFLAGS="$CFLAGS -W -Wall -Wcast-align -Wcast-qual"
|
17 |
CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes"
|
18 |
CFLAGS="$CFLAGS -Wstrict-prototypes -Wpointer-arith -Wreturn-type"
|
19 |
AC_SUBST(CFLAGS)
|
20 |
fi
|
21 |
|
22 |
AC_ARG_ENABLE(coverage,
|
23 |
[ --enable-coverage compile with coverage testing enabled],
|
24 |
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage")
|
25 |
|
26 |
# Checks for libraries.
|
27 |
AC_CHECK_LIB(proj, pj_param)
|
28 |
AC_CHECK_LIB(proj, pj_init, [], [ echo "Error you need lib proj4" && exit -1])
|
29 |
AC_CHECK_LIB(expat, XML_SetUserData)
|
30 |
AC_CHECK_LIB(m, cos)
|
31 |
|
32 |
# Checks for header files.
|
33 |
AC_HEADER_STDC
|
34 |
AC_CHECK_HEADERS(limits.h stdlib.h string.h unistd.h)
|
35 |
|
36 |
# Checks for typedefs, structures, and compiler characteristics.
|
37 |
AC_C_CONST
|
38 |
AC_STRUCT_TM
|
39 |
|
40 |
# Checks for library functions.
|
41 |
AC_FUNC_MALLOC
|
42 |
AC_FUNC_MKTIME
|
43 |
AC_FUNC_REALLOC
|
44 |
AC_CHECK_FUNCS(memset sqrt)
|
45 |
|
46 |
AC_CONFIG_FILES(Makefile src/Makefile man/Makefile)
|
47 |
AC_OUTPUT
|