Contents of /trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 110 - (show annotations)
Fri Mar 6 13:06:08 2009 UTC (15 years, 2 months ago) by harbaum
File size: 3842 byte(s)
Initial autoconf integration
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # OSM2Go autoconf script
5 #
6 # Copyright (C) 2008 Till Harbaum <till@harbaum.org>
7 #
8 # This file is part of OSM2Go.
9 #
10 # OSM2Go is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
14 #
15 # OSM2Go is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with OSM2Go. If not, see <http://www.gnu.org/licenses/>.
22
23 AC_PREREQ(2.61)
24 AC_INIT([OSM2Go],[0.8.13],[osm2go-users@garage.maemo.org])
25 AC_CONFIG_SRCDIR([src/main.c])
26 # AC_CONFIG_HEADER([src/config.h])
27
28 PACKAGE="osm2go"
29 AC_SUBST(PACKAGE)
30
31 # Checks for programs.
32 AC_PROG_CC
33 AC_PROG_INSTALL
34 AC_PROG_LN_S
35 AC_PROG_MAKE_SET
36
37 # Checks for libraries.
38
39 # Checks for header files.
40 #AC_HEADER_STDC
41 #AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h sys/time.h unistd.h])
42
43 # Checks for typedefs, structures, and compiler characteristics.
44 #AC_C_CONST
45 #AC_C_INLINE
46 #AC_TYPE_SIZE_T
47 #AC_HEADER_TIME
48 #AC_STRUCT_TM
49 #AC_HEADER_STDBOOL
50
51 # Checks for library functions.
52 #AC_FUNC_MALLOC
53 #AC_FUNC_MKTIME
54 #AC_FUNC_STRFTIME
55 #AC_FUNC_STRTOD
56 #AC_CHECK_FUNCS([gettimeofday localtime_r memset pow setlocale sqrt strcasecmp strchr strcspn strdup strerror strrchr strstr strtoul tzset])
57
58 # check for libcurl
59 PKG_CHECK_MODULES([libcurl], [libcurl], [], [AC_MSG_ERROR([libcurl missing])])
60 CFLAGS="$CFLAGS $libcurl_CFLAGS"
61 LIBS="$LIBS $libcurl_LIBS"
62
63 # check for goocanvas
64 PKG_CHECK_MODULES([goocanvas], [goocanvas], [], [AC_MSG_ERROR([goocanvas missing])])
65 CFLAGS="$CFLAGS -DUSE_GOOCANVAS $goocanvas_CFLAGS"
66 LIBS="$LIBS $goocanvas_LIBS"
67
68 # check for gnome-vfs-module-2.0
69 PKG_CHECK_MODULES([gnome_vfs_module], [gnome-vfs-module-2.0], [], [AC_MSG_ERROR([gnome-vfs-module-2.0 missing])])
70 CFLAGS="$CFLAGS $gnome_vfs_module_CFLAGS"
71 LIBS="$LIBS $gnome_vfs_module_LIBS"
72
73 # check for libxml-2.0
74 PKG_CHECK_MODULES([libxml2], [libxml-2.0], [], [AC_MSG_ERROR([libxml-2.0 missing])])
75 CFLAGS="$CFLAGS $libxml2_CFLAGS"
76 LIBS="$LIBS $libxml2_LIBS"
77
78 # check for maemo
79 AC_MSG_CHECKING([for Maemo])
80 PKG_CHECK_EXISTS(maemo-version, [
81 MAEMO="yes"
82 AC_MSG_RESULT(yes)
83
84 # gthread-2.0 gpsbt
85 PKG_CHECK_MODULES([hildon], [hildon-1], [], [AC_MSG_ERROR([hildon-1 missing])])
86 CFLAGS="$CFLAGS -DUSE_hildon $hildon_CFLAGS"
87 LIBS="$LIBS $hildon_LIBS"
88
89 PKG_CHECK_MODULES([osso], [libosso], [], [AC_MSG_ERROR([libosso missing])])
90 CFLAGS="$CFLAGS $osso_CFLAGS"
91 LIBS="$LIBS $osso_LIBS"
92
93 PKG_CHECK_MODULES([hildon_fm_2], [hildon-fm-2], [], [AC_MSG_ERROR([hildon-fm-2 missing])])
94 CFLAGS="$CFLAGS $hildon_fm_2_CFLAGS"
95 LIBS="$LIBS $hildon_fm_2_LIBS"
96
97 PKG_CHECK_MODULES([gpsbt], [gpsbt], [], [AC_MSG_ERROR([gpsbt missing])])
98 CFLAGS="$CFLAGS $gpsbt_CFLAGS"
99 LIBS="$LIBS $gpsbt_LIBS"
100
101 # maemo uses dbus for ipc with maemo mapper
102 EXTRA_OBJS="dbus.o"
103 AC_SUBST(EXTRA_OBJS)
104
105 INSTALL_PLATTFORM="install-maemo"
106 AC_SUBST(INSTALL_PLATTFORM)
107
108 ], [
109 AC_MSG_RESULT(no)
110
111 # check for gtk+-2.0
112 PKG_CHECK_MODULES([gtk], [gtk+-2.0], [], [AC_MSG_ERROR([gtk+-2.0 missing!])])
113 CFLAGS="$CFLAGS $gtk_CFLAGS"
114 LIBS="$LIBS $gtk_LIBS"
115
116 # non-maemo device use gnome to call the web browser
117 PKG_CHECK_MODULES([gnome2], [libgnome-2.0], [], [AC_MSG_ERROR([libgnome-2.0 missing])])
118 CFLAGS="$CFLAGS $gnome2_CFLAGS"
119 LIBS="$LIBS $gnome2_LIBS"
120
121 INSTALL_PLATTFORM="install-debian"
122 AC_SUBST(INSTALL_PLATTFORM)
123 ])
124
125
126 AC_CONFIG_FILES([Makefile src/Makefile data/Makefile])
127
128 AC_OUTPUT