File: configure.ac

package info (click to toggle)
osm-gps-map 0.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 716 kB
  • sloc: ansic: 4,734; makefile: 248; python: 203; xml: 35; sh: 16
file content (73 lines) | stat: -rw-r--r-- 1,961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
AC_PREREQ([2.62])
AC_INIT([python-osmgpsmap],
        [0.7.3],
        [http://github.com/nzjrs/osm-gps-map/issues],
        [python-osmgpsmap])
AM_INIT_AUTOMAKE([1.10])

AC_CONFIG_SRCDIR([osmgpsmap.defs])
AC_CONFIG_MACRO_DIR([m4])

AM_MAINTAINER_MODE
AC_PROG_MAKE_SET

AC_PROG_CC
AM_PROG_CC_C_O

AM_PROG_LIBTOOL

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_ARG_ENABLE(more-warnings,
	      [  --disable-more-warnings  Inhibit compiler warnings],
	      set_more_warnings=no)

if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
	CFLAGS="$CFLAGS \
		-Wall -Wstrict-prototypes -Wmissing-declarations \
		-Wmissing-prototypes -Wnested-externs -Wpointer-arith"
fi


AM_PATH_PYTHON()
AM_CHECK_PYTHON_HEADERS(,AC_MSG_ERROR([install python-devel]))

PKG_CHECK_MODULES(PYGTK, [pygtk-2.0 >= 2.10.0 pygobject-2.0 >= 2.14.0])

AC_MSG_CHECKING([for pygtk defs])
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)
AC_MSG_RESULT($PYGTK_DEFSDIR)

#codegen was moved from pygtk to pygobject starting with 2.14
#but we accept both so that we can build against older pygobject/pygtk
#on maemo
AC_MSG_CHECKING([for codegen])
PKG_CHECK_MODULES(DUMMY, [pygobject-2.0 >= 2.16.0],
       CODEGENDIR=`$PKG_CONFIG --variable codegendir pygobject-2.0`,
       CODEGENDIR=`$PKG_CONFIG --variable codegendir pygtk-2.0`)
AC_SUBST([CODEGENDIR])
AC_MSG_RESULT($CODEGENDIR)

if test -f ../src/libosmgpsmap.la; then
	#Because we are building against a non installed lib, the pkgconfig
	#file cannot tell us to also include/link gtk/soup, so we must manually do it
	PKG_CHECK_MODULES(GTK, [gtk+-2.0])
	PKG_CHECK_MODULES(SOUP24, [libsoup-2.4])

	#and we must link to the local lib
	OSMGPSMAP_CFLAGS="-I\$(top_srcdir)/../src/"
	OSMGPSMAP_LIBS="-L\$(top_builddir)/../src/.libs/ -losmgpsmap"
else
	PKG_CHECK_MODULES(OSMGPSMAP, osmgpsmap = 0.7.3)
fi

AC_OUTPUT([Makefile])

echo
echo $PACKAGE v$VERSION

echo
echo "Now type make to compile"
echo