Ticket #298: diff-calltracing

File diff-calltracing, 1.7 KB (added by Gerritv, 12 years ago)

add --enable-calltracing

Line 
1Index: navit/Makefile.am
2===================================================================
3--- navit/Makefile.am   (revision 2042)
4+++ navit/Makefile.am   (working copy)
5@@ -35,7 +35,10 @@
6        navit_nls.h
7 
8 navit_SOURCES = start.c
9-navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
10+if USE_CALLTRACING
11+  navit_SOURCES += instrument.c
12+endif
13+navit_LDADD = libnavit.la @NAVIT_LIBS@ @OSSO_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
14 
15 osm2navit_CPPFLAGS = $(AM_CPPFLAGS) @ZLIB_CFLAGS@ @POSTGRESQL_CFLAGS@
16 osm2navit_SOURCES = osm2navit.c
17Index: configure.in
18===================================================================
19--- configure.in        (revision 2042)
20+++ configure.in        (working copy)
21@@ -53,6 +53,7 @@
22 vehicle_gpsd=yes; vehicle_gpsd_reason=default
23 vehicle_gypsy=yes; vehicle_gypsy_reason=default
24 vehicle_wince=no; vehicle_wince_reason=default
25+calltracing=no;calltracing_reason=default;
26 
27 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
28        [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
29@@ -668,6 +676,15 @@
30                ,
31 )
32 
33+## Add Call tracing
34+## if enabled, adds instrument.c to navit
35+# calltracing
36+AC_ARG_ENABLE(calltracing, [--enable-calltracing   enable calltracing], [ calltracing=$enableval ])
37+if test "x${calltracing}" = "xyes"; then
38+       CFLAGS="$CFLAGS -finstrument-functions"
39+fi
40+AM_CONDITIONAL(USE_CALLTRACING, test "x${calltracing}" = "xyes")
41+
42 PACKAGE=navit
43 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
44 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
45@@ -948,6 +971,7 @@
46 else
47        nls_libs="$LIBINTL"
48 fi
49+echo "CallTracing:         $calltracing ($calltracing_reason)"
50 echo "Plugins:             $plugins ($plugins_reason)"
51 echo "Postgresql:          $postgresql ($postgresql_reason)"
52 echo "Samplemap:           $samplemap ($samplemap_reason)"