Contents of /trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (hide annotations)
Mon Apr 27 11:29:55 2009 UTC (15 years ago) by harbaum
File size: 4866 byte(s)
More error 417 fixes and dialog size framework
1 harbaum 110 # -*- 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 harbaum 167 AC_INIT([OSM2Go],[0.7.1],[osm2go-users@garage.maemo.org])
25 harbaum 110 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     PKG_CHECK_MODULES([hildon], [hildon-1], [], [AC_MSG_ERROR([hildon-1 missing])])
85 harbaum 112 CFLAGS="$CFLAGS -DUSE_HILDON $hildon_CFLAGS"
86 harbaum 110 LIBS="$LIBS $hildon_LIBS"
87    
88     PKG_CHECK_MODULES([osso], [libosso], [], [AC_MSG_ERROR([libosso missing])])
89     CFLAGS="$CFLAGS $osso_CFLAGS"
90     LIBS="$LIBS $osso_LIBS"
91    
92     PKG_CHECK_MODULES([hildon_fm_2], [hildon-fm-2], [], [AC_MSG_ERROR([hildon-fm-2 missing])])
93     CFLAGS="$CFLAGS $hildon_fm_2_CFLAGS"
94     LIBS="$LIBS $hildon_fm_2_LIBS"
95    
96 harbaum 165 # prefer gpsbt over liblocation as we got complaints regarding liblocation
97     # stability
98     PKG_CHECK_EXISTS(gpsbt, [
99     PKG_CHECK_MODULES([gpsbt], [gpsbt], [], [])
100     CFLAGS="$CFLAGS -DENABLE_GPSBT $gpsbt_CFLAGS"
101     LIBS="$LIBS $gpsbt_LIBS"
102 harbaum 118 ], [
103 harbaum 165 AC_MSG_NOTICE([gpsbt not found, trying liblocation])
104 harbaum 110
105 harbaum 165 PKG_CHECK_EXISTS(liblocation, [
106     PKG_CHECK_MODULES([liblocation], [liblocation], [], [])
107     CFLAGS="$CFLAGS -DENABLE_LIBLOCATION $liblocation_CFLAGS"
108     LIBS="$LIBS $liblocation_LIBS"
109     ], [
110     AC_MSG_NOTICE([WARNING: No liblocation nor gpsbt found, disabling gps auto start!])
111     ])
112     ])
113 harbaum 118
114     PKG_CHECK_EXISTS(tablet-browser-interface, [
115 harbaum 112 CFLAGS="$CFLAGS -DENABLE_BROWSER_INTERFACE"
116 harbaum 118 ], [AC_MSG_NOTICE([WARNING: No tablet-browser-interface found, disabling microb interface!])])
117 harbaum 112
118 harbaum 124 PKG_CHECK_EXISTS(maemo-version, [
119     VERSION=`pkg-config --modversion maemo-version`
120     AC_MSG_NOTICE([Configuring for Maemo $VERSION])
121     CFLAGS="$CFLAGS -DMAEMO_VERSION=\\\"$VERSION\\\""
122     MAJOR=`echo $VERSION | cut -b1 -`
123     CFLAGS="$CFLAGS -DMAEMO_VERSION_MAJOR=$MAJOR"
124     ], [
125 harbaum 126 AC_MSG_ERROR([maemo-version not found])
126 harbaum 124 ])
127    
128 harbaum 110 # maemo uses dbus for ipc with maemo mapper
129     EXTRA_OBJS="dbus.o"
130     AC_SUBST(EXTRA_OBJS)
131    
132     INSTALL_PLATTFORM="install-maemo"
133     AC_SUBST(INSTALL_PLATTFORM)
134    
135     ], [
136     AC_MSG_RESULT(no)
137    
138     # check for gtk+-2.0
139     PKG_CHECK_MODULES([gtk], [gtk+-2.0], [], [AC_MSG_ERROR([gtk+-2.0 missing!])])
140     CFLAGS="$CFLAGS $gtk_CFLAGS"
141     LIBS="$LIBS $gtk_LIBS"
142    
143     # non-maemo device use gnome to call the web browser
144     PKG_CHECK_MODULES([gnome2], [libgnome-2.0], [], [AC_MSG_ERROR([libgnome-2.0 missing])])
145 harbaum 143 CFLAGS="$CFLAGS $gnome2_CFLAGS -DENABLE_BROWSER_INTERFACE"
146     LIBS="$LIBS $gnome2_LIBS"
147 harbaum 110
148     INSTALL_PLATTFORM="install-debian"
149     AC_SUBST(INSTALL_PLATTFORM)
150     ])
151    
152    
153     AC_CONFIG_FILES([Makefile src/Makefile data/Makefile])
154    
155     AC_OUTPUT