This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.in
1303 lines (1193 loc) · 50.4 KB
/
configure.in
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AC_INIT(zanavi, 1.0.0)
AC_CONFIG_MACRO_DIR([m4])
SOURCE_MODE=svn
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_SUBST(SOURCE_MODE)
AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"])
if test "x${SOURCE_MODE}" = "xsvn" ; then
USE_MAINTAINER_MODE=yes
else
USE_MAINTAINER_MODE=no
fi
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is enabled by default (reason of inclusion of this function)
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval)
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
AM_MAINTAINER_MODE
plugins=yes; plugins_reason=default
postgresql=yes; postgresql_reason=default
samplemap=yes; samplemap_reason=default
binding_dbus=yes; binding_dbus_reason=default
binding_dbus_use_system_bus=no
binding_python=yes; binding_python_reason=default
font_freetype=yes; font_freetype_reason=default
fontconfig=yes; fontconfig_reason=default
fribidi=yes; fribidi_reason=default
gui_gtk=no; gui_gtk_reason=default
gui_win32=no; gui_win32_reason=default
gui_internal=yes; gui_internal_reason=default
gui_qml=no; gui_qml_reason=default
graphics=yes; graphics_reason=default
graphics_gd=no; graphics_gd_reason=default
graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
graphics_null=yes; graphics_null_reason=default
graphics_opengl=yes; graphics_opengl_reason=default
graphics_sdl=yes; graphics_sdl_reason=default
graphics_win32=no; graphics_win32_reason=default
maptool=yes; maptool_reason=default
map_binfile=yes; map_binfile_reason=default
map_filter=yes; map_filter_reason=default
map_mg=yes; map_mg_reason=default
map_shapefile=yes; map_shapefile_reason=default
map_textfile=yes; map_textfile_reason=default
map_csv=yes; map_csv_reason=default
osd_core=yes; osd_core_reason=default
plugin_pedestrian=no; plugin_pedestrian_reason=default
routing=yes; routing_reason=default
speech_android=no; speech_android_reason=default
speech_cmdline=yes; speech_cmdline_reason=default
speech_dbus=no; speech_dbus_reason=default
speech_espeak=no; speech_espeak_reason=default
speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
vehicle_demo=yes; vehicle_demo_reason=default
vehicle_file=yes; vehicle_file_reason=default
vehicle_gpsd=yes; vehicle_gpsd_reason=default
vehicle_gpsd_dbus=no; vehicle_gpsd_dbus_reason=default
vehicle_gypsy=yes; vehicle_gypsy_reason=default
vehicle_null=no; vehicle_null_reason=default
vehicle_wince=no; vehicle_wince_reason=default
vehicle_iphone=no; vehicle_iphone_reason=default
vehicle_android=no; vehicle_android_reason=default
graphics_android=no; graphics_android_reason=default
vehicle_maemo=no; vehicle_maemo_reason=default
vehicle_webos=no; vehicle_webos_reason=default
shared_libnavit=no
LIBNAVIT=navit
bin_navit=yes
AC_CANONICAL_HOST
win32=no
win32ce=no
case $host_os in
wince|mingw32ce|cegcc)
win32=yes
win32ce=yes
AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
gui_win32=yes; gui_win32_reason="host_os is wince"
graphics_win32=yes; graphics_win32_reason="host_os is wince"
vehicle_wince=yes; vehcile_wince_reason="host_os is wince"
speech_espeak=yes; speech_espeak_reason="host_os is wince"
support_libpng=yes
maptool=no; maptool_reason="host_os is wince"
;;
mingw32)
win32=yes
AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
AC_DEFINE(HAVE_API_WIN32, 1, [Have Windows API])
gui_win32=yes; gui_win32_reason="host_os is mingw32"
graphics_win32=yes; graphics_win32_reason="host_os is mingw32"
speech_espeak=yes; speech_espeak_reason="host_os is mingw32"
support_libpng=yes
;;
linux*_android)
android=yes
shared_libnavit=yes
bin_navit=no
AC_DEFINE(HAVE_API_ANDROID, 1, [Have Android API])
echo "void dl_unwind_find_exidx(void) {}" >crt0.c
$CC -c crt0.c
$AR r libg.a crt0.o
vehicle_android=yes; vehicle_android_reason="host_os is android"
graphics_android=yes; graphics_android_reason="host_os is android"
speech_android=yes; speech_android_reason="host_os is android"
MODULE_LDFLAGS="-module -Xcompiler -nostdlib -Xcompiler -Wl,-rpath -Xcompiler -Wl,/data/data/com.zoffcc.applications.zanavi/lib"
MODULE_LIBADD="-llog"
LIBNAVIT=_data_data_com.zoffcc.applications.zanavi_lib_navit
NAVIT_MODULE_LDFLAGS="$MODULE_LDFLAGS -L\$(top_builddir)/navit -l$LIBNAVIT"
;;
esac
if test "x$win32" = "xyes"
then
NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
NAVIT_SOCKET_LDFLAGS="$MODULE_LDFLAGS -lws2_32"
fi
AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
AM_CONDITIONAL(SUPPORT_WIN32CE, [test "x$win32ce" = "xyes"])
AM_CONDITIONAL(SUPPORT_ANDROID, [test "x$android" = "xyes"])
if test "x$support_libpng" = "xyes"
then
NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/libpng"
NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/libpng -lsupport_libpng"
fi
AM_CONDITIONAL(SUPPORT_LIBPNG, [test "x$support_libpng" = "xyes"])
AC_SUBST(MODULE_LDFLAGS)
AC_SUBST(MODULE_LIBADD)
AC_SUBST(NAVIT_MODULE_LDFLAGS)
AC_SUBST(NAVIT_SOCKET_LDFLAGS)
LIBS="$LIBS -lm"
if test "$win32" == "no" -a "$host_os" != "cygwin"; then
LIBS="$LIBS -rdynamic"
fi
m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
[AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
AC_USE_SYSTEM_EXTENSIONS
m4_ifdef([AC_PROG_OBJC],[AC_PROG_OBJC])
AC_PROG_CC
m4_ifdef([AC_PROG_OBJC],[AC_PROG_OBJC],[AC_SUBST([OBJC],["$CC"])
AC_SUBST([OBJCFLAGS],["$CFLAGS"])])
m4_ifndef([AC_PROG_OBJC],[_AM_DEPENDENCIES(OBJC)])
if eval "test x`uname` = xDarwin"; then
CFLAGS="$CFLAGS -I/opt/local/include -L/opt/local/lib"
fi
if eval "test x$GCC = xyes"; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
fi
AM_PROG_CC_C_O
AC_PROG_CXX
if eval "test x$GXX = xyes"; then
CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
fi
PKG_CHECK_EXISTS
if test "x${cross_compiling}" = "xyes"; then
samplemap="no";samplemap_reason="not supported for cross compiling"
binding_python="no";binding_python_reason="not supported for cross compiling"
postgresql="no";postgresql_reason="not supported for cross compiling"
AC_MSG_CHECKING([for a C compiler for build tools])
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
else
CC_FOR_BUILD=$CC
fi
CCLD_FOR_BUILD="$CC_FOR_BUILD"
AC_SUBST(cross_compiling)
AM_CONDITIONAL(CROSS_COMPILING, test "x${cross_compiling}" = "xyes")
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CCLD_FOR_BUILD)
# Endianness
# defines WORDS_BIGENDIAN for big-endian systems
AC_C_BIGENDIAN
AC_ARG_ENABLE(variant, [ --enable-variant=something set variant], NAVIT_VARIANT=$enableval)
AC_SUBST(NAVIT_VARIANT)
AC_ARG_ENABLE(cache-size, [ --enable-cache-size=size in bytes set cache size], AC_DEFINE_UNQUOTED(CACHE_SIZE,[${enableval}], [Size of Cache in Bytes]))
AC_ARG_ENABLE(avoid-unaligned, [ --enable-avoid-unaligned avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
AC_ARG_ENABLE(avoid-float, [ --enable-avoid-float avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
AC_ARG_ENABLE(transformation-roll, [ --enable-transformation-roll add support for specifying roll angle in transformation], ENABLE_ROLL=$enableval, ENABLE_ROLL=no)
test x"${ENABLE_ROLL}" = xyes && AC_DEFINE(ENABLE_ROLL,[],Define to add support for specifying roll angle in transformation)
AC_ARG_ENABLE(hildon, [ --disable-hildon build without maemo/hildon support], enable_hildon=$enableval, enable_hildon=yes)
if test "x${enable_hildon}" = "xyes" ; then
PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, , [
AC_MSG_RESULT(no)
enable_hildon=no
])
PKG_CHECK_MODULES(GPSBT, gpsbt, [
AC_DEFINE(HAVE_GPSBT, 1, [Have the gpsbt library])
AC_SUBST(GPSBT_CFLAGS)
AC_SUBST(GPSBT_LIBS)
], [
AC_MSG_RESULT(no)
])
if test x"${enable_hildon}" = xyes ; then
AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
AC_SUBST(HILDON_CFLAGS)
AC_SUBST(HILDON_LIBS)
fi
fi
AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
AC_ARG_ENABLE(osso, [ --disable-osso build without maemo/osso support], enable_osso=$enableval, enable_osso=yes)
if test "x${enable_osso}" = "xyes" ; then
PKG_CHECK_MODULES(LIBOSSO, libosso, , [
AC_MSG_RESULT(no)
enable_osso=no
])
if test x"${enable_osso}" = xyes ; then
AC_DEFINE(USE_OSSO, 1, [Build with maemo/osso support])
AC_SUBST(LIBOSSO_CFLAGS)
AC_SUBST(LIBOSSO_LIBS)
fi
fi
echo ${enable_osso}
AM_CONDITIONAL(USE_OSSO, test "x${enable_osso}" = "xyes")
AC_ARG_ENABLE(garmin, [ --disable-garmin disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
# samplemap
AC_PATH_PROG(_PATH_BZCAT,[bzcat])
if test "x${_PATH_BZCAT}" = "x" ; then
samplemap=no; samplemap_reason="bzcat missing"
fi
AC_ARG_ENABLE(maptool, [ --disable-maptool don't build maptool], maptool=$enableval;maptool_reason="configure parameter")
AM_CONDITIONAL(MAPTOOL, [test "x$maptool" = "xyes"])
if test "x$maptool" != "xyes"; then
samplemap=no; samplemap_reason="maptool disabled"
fi
AC_ARG_ENABLE(samplemap, [ --disable-samplemap don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
AC_ARG_ENABLE(fastmath, [ --disable-fastmath don't build with fastmath], fastmath=$enableval, fastmath=yes)
AM_CONDITIONAL(FASTMATH, [test "x$fastmath" = "xyes"])
if test x"$fastmath" = xyes; then
if eval "test x$GCC = xyes"; then
CFLAGS="$CFLAGS -ffast-math"
fi
fi
X_CFLAGS="-I$x_includes"
AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
# glib
AC_ARG_ENABLE(glib, [ --disable-glib don't build with external glib], glib=$enableval, glib=yes)
if test "x${glib}" = "xyes" -a "x${GLIB_CFLAGS}" = "x" -a "x${GLIB_LIBS}" = "x"; then
PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
fi
if test "x${glib}" = "xyes"; then
AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
else
GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
if test "x${win32}" != "xyes" -a "x${android}" != "xyes"; then
GLIB_LIBS="$GLIB_LIBS -lpthread"
fi
fi
# gmodule
AC_ARG_ENABLE(gmodule, [ --disable-gmodule don't build with gmodule], gmodule=$enableval, gmodule=yes)
if test x"${gmodule}" = "xyes"; then
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
fi
if test "x${gmodule}" = "xyes"; then
AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
else
AC_CHECK_LIB(dl, dlopen,
[plugins_reason="default, via dlopen";GMODULE_LIBS="-ldl";AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have dlopen])],
[plugins="no"; plugins_reason="package gmodule and dlopen missing"]
)
fi
# libcrypto
AC_CHECK_LIB(crypto, AES_encrypt, [CRYPTO_LIBS="-lcrypto";AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define to 1 if you have libcrypto])])
AC_SUBST(CRYPTO_LIBS)
# plugins
AC_ARG_ENABLE(plugins, [ --disable-plugins disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
AC_ARG_ENABLE(shared-libnavit, [ --enable-shared-libnavit], [ shared_libnavit=$enableval])
if test "x${plugins}" = "xyes"; then
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_DEFINE(
[USE_PLUGINS],
[],
Define to 1 if you have plugins.
)
if test "x${win32}" = "xyes"; then
shared_libnavit=yes
NAVIT_MODULE_LDFLAGS="-no-undefined -L\$(top_builddir)/navit -l$LIBNAVIT -L\$(top_builddir)/intl -lintl"
fi
else
if test "x${shared_libnavit}" = "xyes"; then
AC_ENABLE_SHARED
AC_DISABLE_STATIC
else
AC_DISABLE_SHARED
AC_ENABLE_STATIC
fi
fi
AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
AM_CONDITIONAL(SHARED_LIBNAVIT, [test "x$shared_libnavit" = "xyes"])
AM_CONDITIONAL(BIN_NAVIT, [test "x$bin_navit" = "xyes"])
AC_PROG_LIBTOOL
AC_SUBST(LIBNAVIT)
AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
if test "x${ZLIB_CFLAGS}" = "x" -a "x${ZLIB_LIBS}" = "x"; then
AC_CHECK_HEADER(
zlib.h,
AC_DEFINE(
[HAVE_ZLIB],
[],
Define to 1 if you have the <zlib.h> header file.
)
ZLIB_LIBS="-lz"
zlib=yes,
ZLIB_CFLAGS="-I\$(top_srcdir)/navit/support/zlib"
ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
zlib=no
)
else
zlib=yes
fi
AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
AC_CHECK_HEADER(sys/socket.h, AC_DEFINE([HAVE_SOCKET],[],Define to 1 if you have sockets))
AC_CHECK_HEADER(winsock2.h, AC_DEFINE([HAVE_WINSOCK],[],Define to 1 if you have Windows sockets))
# gtk
PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
if test "x$gtk2_pkgconfig" = "xyes"; then
AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
fi
# fsync
AC_MSG_CHECKING(for fsync)
AC_TRY_LINK([#include <unistd.h>], [fsync(0);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_FSYNC, 1, [Define to 1 if you have the `fsync' function.]),AC_MSG_RESULT(no))
# system
AC_MSG_CHECKING(for system)
AC_TRY_LINK([#include <stdlib.h>], [system("/bin/true");],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYSTEM, 1, [Define to 1 if you have the `system' function.]),speech_cmdline=no; speech_cmdline_reason="not supported without system()"; AC_MSG_RESULT(no))
AC_MSG_CHECKING(for CreateProcess)
AC_TRY_LINK([#include <windows.h>], [CreateProcess(NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CREATEPROCESS, 1, [Define to 1 if you have the `CreateProcess' function.]) speech_cmdline=yes; speech_cmdline_reason="CreateProcess exists", AC_MSG_RESULT(no))
AC_ARG_ENABLE(graphics-sdl, [ --disable-graphics-sdl don't create graphics sdl], graphics_sdl=$enableval;graphics_sdl_reason="configure parameter")
if test "x${graphics_sdl}" = "xyes" ; then
PKG_CHECK_MODULES(SDL,
[sdl],
[graphics_sdl="yes"
graphics_sdl_reason="sdl present"] ,
[graphics_sdl="no"
graphics_sdl_reason="sdl not available"]
)
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
fi
if test "x${graphics_sdl}" = "xyes" ; then
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$SDL_CFLAGS $CPPFLAGS"
AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,graphics_sdl="no";graphics_sdl_reason="SDL_image.h missing")
AC_SUBST(SDL_IMAGE_LIBS)
CPPFLAGS=$save_CPPFLAGS
fi
if test "x${graphics_sdl}" = "xyes" ; then
AC_DEFINE(GRAPHICS_SDL, 1, [Build with graphics sdl])
fi
AM_CONDITIONAL(GRAPHICS_SDL, test "x${graphics_sdl}" = "xyes")
AC_ARG_ENABLE(postgresql, [ --disable-postgresql don't add postgresql support to maptool], postgresql=$enableval;postgresql_reason="configure parameter")
if test "x${postgresql}" = "xyes" ; then
if test -z "$PG_CONFIG"; then
AC_PATH_PROG([PG_CONFIG], [pg_config], [])
fi
AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
if test ! -x "$PG_CONFIG"; then
if test "x${PG_CONFIG}" = "x" ; then
postgresql_reason="$PG_CONFIG not executable"
else
postgresql_reason="pg_config missing"
fi
postgresql=no
AC_MSG_RESULT([no])
else
POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
AC_DEFINE(HAVE_POSTGRESQL, 1, [Postgresql libraries available])
AC_SUBST(POSTGRESQL_CFLAGS)
AC_SUBST(POSTGRESQL_LIBS)
AC_MSG_RESULT([yes])
fi
fi
AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
# font
# freetype
AC_ARG_ENABLE(font-freetype, [ --disable-font-freetype don't add freetype support], font_freetype=$enableval;font_freetype_reason="configure parameter")
if test "x${font_freetype}" = "xyes" -a "x${FREETYPE2_CFLAGS}" = "x" -a "x${FREETYPE2_LIBS}" = "x"; then
PKG_CHECK_MODULES(FREETYPE2, [freetype2], , [font_freetype=no;font_freetype_reason="Package freetype2 missing"])
else
fribidi=no
fi
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
AM_CONDITIONAL(FONT_FREETYPE, test "x${font_freetype}" = "xyes")
AC_ARG_WITH(freetype-fonts, [ --with-freetype-fonts specify what fonts to use], AC_DEFINE_UNQUOTED(FREETYPE_FONTS,[${withval}],[Freetype fonts to use]))
AC_ARG_ENABLE(fontconfig, [ --disable-fontconfig don't' add fontconfig support], fontconfig=$enableval;fontconfig_reason="configure parameter")
if test "x${fontconfig}" = "xyes"; then
PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig=yes], [fontconfig=no])
fi
if test "x$fontconfig" = "xyes"; then
AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig])
fi
AC_SUBST(FONTCONFIG_CFLAGS)
AC_SUBST(FONTCONFIG_LIBS)
AM_CONDITIONAL(FONTS, test "x${font_freetype}" = "xyes" -a "x$fontconfig" != "xyes")
# fribidi
AC_ARG_ENABLE(fribidi, [ --disable-fribidi dont build with fribidi], fribidi=$enableval;fribidi_reason="configure parameter", fribidi=yes)
if test x"${fribidi}" = "xyes"; then
PKG_CHECK_MODULES(FRIBIDI2, [fribidi >= 0.19.0], [fribidi=yes;oldfribidi=no],
[ PKG_CHECK_MODULES([FRIBIDI], [fribidi],
[fribidi=yes;oldfribidi=yes;fribid_reason="using old version"], [fribidi=no;fribidi_reason="FriBidi library not found"])
])
fi
if test x"${fribidi}" = "xyes"; then
AC_DEFINE(USE_FRIBIDI, 1, [Build with fribidi support])
fi
if test x"${oldfribidi}" = "xyes"; then
AC_DEFINE(FRIBIDIOLD, 1, [Build with fribidi support for older versions of fribidi])
fi
AC_SUBST(FRIBIDI2_CFLAGS)
AC_SUBST(FRIBIDI2_LIBS)
AC_SUBST(FRIBIDI_CFLAGS)
AC_SUBST(FRIBIDI_LIBS)
PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
if test "x$imlib2_pkgconfig" = "xyes"; then
AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
fi
AC_SUBST(IMLIB2_CFLAGS)
AC_SUBST(IMLIB2_LIBS)
AC_ARG_ENABLE(graphics-opengl, [ --disable-graphics-opengl disable graphics type OpenGL], graphics_opengl=$enableval;graphics_opengl_reason="configure parameter")
if test "x${graphics_opengl}" = "xyes" ; then
AC_CHECK_HEADER(
GL/gl.h,
AC_DEFINE(
[HAVE_OPENGL],
[],
Define to 1 if you have the <GL/gl.h> header file.
)
OPENGL_LIBS="$X_LIBS -lGL -lglut -lfreeimage"
opengl=yes,
AC_MSG_WARN([*** no GL/gl.h -- opengl graphics support disabled];graphics_opengl=no;graphics_opengl_reason="GL/gl.h header missing")
)
AC_CHECK_HEADER(
GL/glut.h,
AC_DEFINE(
[HAVE_GLUT],
[],
Define to 1 if you have the <GL/glut.h> header file.
)
glut=yes,
AC_MSG_WARN([*** no GL/glut.h -- opengl graphics support disabled]);graphics_opengl=no;graphics_opengl_reason="GL/glut.h header missing"
)
AC_CHECK_HEADER(
GL/freeglut.h,
AC_DEFINE(
[HAVE_FREEGLUT],
[],
Define to 1 if you have the <GL/freeglut.h> header file.
)
freeglut=yes,
AC_MSG_WARN([*** no GL/freeglut.h -- opengl support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
)
AC_SUBST(OPENGL_CFLAGS)
AC_SUBST(OPENGL_LIBS)
AC_CHECK_HEADER(
GL/glc.h,
AC_DEFINE(
[HAVE_GLC],
[],
Define to 1 if you have the <GL/glc.h> header file.
)
GLC_LIBS="-lGLC"
glc=yes,
AC_MSG_WARN([*** no GL/glc.h -- opengl graphics support disabled]);graphics_opengl=no;graphics_opengl_reason="GL/glc.h header missing"
)
AC_CHECK_HEADER(
FreeImage.h,
AC_DEFINE(
[HAVE_FREEIMAGE],
[],
Define to 1 if you have the <FreeImage.h> header file.
)
FREEIMAGE_LIBS="-lfreeimage"
freeimage=yes,
AC_MSG_WARN([*** no FreeImage.h -- opengl support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
)
AC_SUBST(FREEIMAGE_LIBS)
AC_SUBST(GLC_CFLAGS)
AC_SUBST(GLC_LIBS)
fi
AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$freeglut" = "xyes" -a "x$opengl" = "xyes" -a "x$freeimage" = "xyes" -a "x$glc" = "xyes" ])
system_shapefile=no
AC_CHECK_HEADERS(
[shapefil.h libshp/shapefil.h],
AC_DEFINE(
[HAVE_SYS_SHAPEFILELIB],
[1],
Define to 1 if you have the <libshp/shapefil.h> header file.
)
SHAPEFILE_LIBS="-lshp"
system_shapefile=yes
)
AC_SUBST(SHAPEFILE_CFLAGS)
AC_SUBST(SHAPEFILE_LIBS)
AM_CONDITIONAL(HAVE_SYSTEM_SHAPEFILELIB, [test "x$system_shapefile" = "xyes" ])
if test x"${system_shapefile}" = xno
then
AC_MSG_WARN([*** no libshp/shapefil.h -- using included copy])
fi
if test x"${USE_GARMIN}" = xyes
then
# check for libgarmin
PKG_CHECK_MODULES(LIBGARMIN, libgarmin, use_libgarmin=yes, use_libgarmin=no)
AC_SUBST(LIBGARMIN_CFLAGS)
AC_SUBST(LIBGARMIN_LIBS)
fi
AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
## binding
# python
AC_ARG_ENABLE(binding-python, [ --disable-binding-python don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
if test "x${binding_python}" = "xyes"; then
AC_PATH_PROG(_PATH_PYTHON,[python])
dnl Libraries and flags for embedded Python.
dnl FIXME: I wish there was a less icky way to get this.
if test "x${_PATH_PYTHON}" != "x" ; then
AC_MSG_CHECKING(for Python linkage)
AC_PATH_PROG([PYTHONCONFIG], [python-config], [])
if test "x${PYTHONCONFIG}" = "x" ; then
py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
py_lib=`$_PATH_PYTHON -c 'import sys; print sys.lib'`
py_libdir="${py_prefix}/${py_lib}/python${py_ver}"
PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
AC_MSG_RESULT($py_libdir)
else
binding_python="no"
binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
fi
else
PYTHON_CFLAGS="`${PYTHONCONFIG} --cflags`"
PYTHON_LIBS="`${PYTHONCONFIG} --ldflags`"
fi
else
binding_python="no"
binding_python_reason="python executable missing"
fi
fi
if test "x${binding_python}" = xyes ; then
AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
fi
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
# dbus
AC_ARG_ENABLE(binding-dbus, [ --disable-binding-dbus don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
AC_ARG_ENABLE(binding-dbus-use-system-bus, [ --enable-binding-dbus-use-system-bus use system bus for dbus binding], binding_dbus_use_system_bus=$enableval)
if test "x${binding_dbus}" = "xyes" ; then
PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
fi
if test "x${binding_dbus}" = "xyes" ; then
AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
vehicle_gpsd_dbus="yes"
vehicle_gpsd_dbus_reason="dbus binding present"
speech_dbus="yes"
speech_dbus_reason="dbus binding present"
fi
if test "x${binding_dbus_use_system_bus}" = "xyes" ; then
AC_DEFINE(DBUS_USE_SYSTEM_BUS, 1, [Use system bus instead of session bus for binding dbus])
fi
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
AM_CONDITIONAL(VEHICLE_GPSD_DBUS, test "x${vehicle_gpsd_dbus}" = "xyes")
AM_CONDITIONAL(SPEECH_DBUS, test "x${speech_dbus}" = "xyes")
AC_ARG_WITH(dbus-service-dir, [ --with-dbus-service-dir specify where the dbus service dir resides], DBUS_SERVICE_DIR=$withval, DBUS_SERVICE_DIR="$datarootdir/dbus-1/services")
AC_SUBST(DBUS_SERVICE_DIR)
# svg
AC_ARG_ENABLE(svg, [ --disable-svg disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
AC_ARG_ENABLE(svg2png, [ --disable-svg2png disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
AC_ARG_ENABLE(svg2png-scaling, [ --enable-svg2png-scaling enable conversion of svgs to pngs with specified sizes], SVG2PNG_SCALES=$enableval, SVG2PNG_SCALES="8 16 32 48 96 192 384")
AC_ARG_ENABLE(svg2png-scaling-flag, [ --enable-svg2png-scaling-flag enable conversion of flag svgs to pngs with specified sizes], SVG2PNG_SCALES_FLAG=$enableval, SVG2PNG_SCALES_FLAG="8 16 32 48 96 192 384")
AC_ARG_ENABLE(svg2png-scaling-nav, [ --enable-svg2png-scaling-nav enable conversion of nav svgs to pngs with specified sizes], SVG2PNG_SCALES_NAV=$enableval, SVG2PNG_SCALES_NAV="8 16 32 48 96 192 384")
AC_ARG_WITH(svg2png-use-convert, [ --with-svg2png-use-convert use imagemagick's convert for png creation], SVG2PNG_CONVERTER="convert")
AC_ARG_WITH(svg2png-use-rsvg-convert, [ --with-svg2png-use-rsvg-convert use librsvg's rsvg-convert for png creation], SVG2PNG_CONVERTER="rsvg-convert")
AC_ARG_WITH(svg2png-use-inkscape, [ --with-svg2png-use-inkscape use inkscapes internal convert routines for png creation], SVG2PNG_CONVERTER="inkscape")
AC_ARG_WITH(svg2png-use-ksvgtopng4, [ --with-svg2png-use-ksvgtopng4 use kde4's ksvgtopng4 for png creation], SVG2PNG_CONVERTER="ksvgtopng4")
AC_ARG_WITH(svg2png-use-ksvgtopng, [ --with-svg2png-use-ksvgtopng use kde3's convert for png creation], SVG2PNG_CONVERTER="ksvgtopng")
if test "x${enable_svg2png}" = "xyes" ; then
if test "x${SVG2PNG_CONVERTER}" = "x"; then
SVG2PNG_CONVERTER="rsvg-convert ksvgtopng ksvgtopng4 inkscape convert"
fi
AC_PATH_PROGS([SVG2PNG], ${SVG2PNG_CONVERTER}, [none])
if test "x${SVG2PNG}" = "xnone"; then
enable_svg2png="no"
fi
fi
AC_SUBST(SVG2PNG)
AC_SUBST(SVG2PNG_SCALES)
AC_SUBST(SVG2PNG_SCALES_FLAG)
AC_SUBST(SVG2PNG_SCALES_NAV)
AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x")
AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x")
AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
# XSLTS
AC_ARG_WITH(xslts, [ --with-xslts enable processing of navit.xml with given xslt scripts], XSLTS=$withval, XSLTS="")
AC_SUBST(XSLTS)
AC_ARG_WITH(saxon, [ --with-saxon specify the saxon xslt processor], SAXON=$withval, SAXON="saxon")
AC_SUBST(SAXON)
# Android Permissions
AC_ARG_WITH(android-permissions, [ --with-android-permissions Set additional android permissions], ANDROID_PERMISSIONS=$withval, ANDROID_PERMISSIONS="")
AC_SUBST(ANDROID_PERMISSIONS)
# Android Project
AC_ARG_WITH(android-project, [ --with-android-project Set android project], ANDROID_PROJECT=$withval, ANDROID_PROJECT="3")
AC_SUBST(ANDROID_PROJECT)
# NLS
AC_ARG_ENABLE(nls,
[ --disable-nls disable Native Language Support ( gettext/libintl )],
enable_nls=$enableval, enable_nls=yes)
INTLIBS=""
MOFILES=""
POFILES=""
POIFILES=""
LINGUAS=""
xgettext_glade=no
if test "x$enable_nls" = "xyes"; then
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],[INTLIBS="-lintl" HAVEGETTEXT="yes"])
AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
if test "$XGETTEXT" != ""; then
if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
echo "xgettext isn't GNU version"
XGETTEXT=""
else
if echo '<test/>' | $XGETTEXT -L Glade - ; then
xgettext_glade=yes
fi
fi
fi
if test "$XGETTEXT" != "" ; then
PO=""
if test "$LINGUAS" = ""; then
ling=` (cd $srcdir/po; /bin/ls *.po) `
for l in $ling; do
lcode=`basename $l .po`
LINGUAS="$LINGUAS$lcode "
done
fi
AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
else
LINGUAS=""
PO=""
echo "xgettext doesn't exist; will not build i18n support"
enable_nls=no
fi
for lang in $LINGUAS; do
MOFILES="$MOFILES $lang.mo"
done
for lang in $LINGUAS; do
POFILES="$POFILES $lang.po"
done
for lang in $LINGUAS; do
POIFILES="$POIFILES $lang.po"
done
AC_SUBST(INTLIBS)
AC_SUBST(MOFILES)
AC_SUBST(POFILES)
AC_SUBST(POIFILES)
AM_GNU_GETTEXT_VERSION
AM_GNU_GETTEXT(no-libtool, need-ngettext, \$(top_builddir)/intl/)
if test "x${shared_libnavit}" = "xyes" -a "x${win32ce}" = "xyes"; then
INTLLIBS="\$(top_builddir)/intl/libintl.la"
LIBINTL=$INTLLIBS
LTLIBINTL=$INTLLIBS
fi
AC_SUBST(LIBINTL)
AC_SUBST(LTLIBINTL)
if test x"$LIBINTL" != "x" ;then
CFLAGS="$CFLAGS -I\$(top_builddir)/intl/"
fi
fi
AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
AM_CONDITIONAL(XGETTEXT_GLADE, [test "x$xgettext_glade" = "xyes"])
AC_CHECK_HEADER(
byteswap.h,
AC_DEFINE(
[HAVE_BYTESWAP_H],
[1],
[Define to 1 if you have byteswap.h],
)
,
)
PACKAGE=navit
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_CHECK_HEADER(wordexp.h,wordexp_h=yes,wordexp_h=no;NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/wordexp";WORDEXP_LIBS="-L\$(top_builddir)/navit/support/wordexp -lsupport_wordexp")
AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
support_libc=no
AC_ARG_ENABLE(support_libc, [ --enable-support-libc enable builtin mini libc ], support_libc=$enableval)
AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
if test "x$support_libc" = "xyes"; then
CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
LIBC_LIBS="-L\$(top_builddir)/navit/support/libc -lsupport_libc"
fi
## graphics
AC_ARG_ENABLE(graphics, [ --disable-graphics disable graphics], graphics=$enableval;graphics_reason="configure parameter")
AM_CONDITIONAL(GRAPHICS, test "x${graphics}" = "xyes")
if test "x$graphics" = "xyes"; then
AC_DEFINE([USE_GRAPHICS],[1],Define to 1 if you want to use graphics.)
fi
# gd
# android
AC_ARG_ENABLE(graphics-android, [ --disable-graphics-android disable graphics type android], graphics_android=$enableval;graphics_android_reason="configure parameter")
AM_CONDITIONAL(GRAPHICS_ANDROID, test "x${graphics_android}" = "xyes")
# gd
AC_ARG_ENABLE(graphics-gd, [ --enable-graphics-gd enable graphics type gd], graphics_gd=$enableval;graphics_gd_reason="configure parameter")
if test "x${graphics_gd}" = "xyes" ; then
if test -z "$GDLIB_CONFIG"; then
AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config], [])
fi
AC_MSG_CHECKING([for gdlib with $GDLIB_CONFIG])
if test ! -x "$GDLIB_CONFIG"; then
if test "x${GDLIB_CONFIG}" = "x" ; then
graphics_gd_reason="$GDLIB_CONFIG not executable"
else
graphics_gd_reason="gdlib-config missing"
fi
graphics_gd=no
AC_MSG_RESULT([no])
else
if test "x${GD_CFLAGS}" = "x" ; then
GD_CFLAGS="-I`$GDLIB_CONFIG --includedir`"
fi
if test "x${GD_LIBS}" = "x" ; then
GD_LIBS="-L`$GDLIB_CONFIG --libdir` -lgd `$GDLIB_CONFIG --libs`"
fi
AC_SUBST(GD_CFLAGS)
AC_SUBST(GD_LIBS)
AC_MSG_RESULT([yes])
fi
fi
AM_CONDITIONAL(GRAPHICS_GD, test "x${graphics_gd}" = "xyes")
AC_CHECK_HEADER(
sys/shm.h,
AC_DEFINE(
[HAVE_SHMEM],
[],
Define to 1 if you have shared memory
)
)
AC_CHECK_HEADER(
X11/xpm.h,
AC_DEFINE(
[HAVE_XPM],
[],
Define to 1 if you have xpm header
)
)
AC_CHECK_HEADER(
getopt.h,
AC_DEFINE(
[HAVE_GETOPT_H],
[],
Define to 1 if you have the getopt header
)
)
if test "x${graphics_gd}" = "xyes" ; then
save_CPPFLAGS=$CPPFLAGS
save_LIBS=$LIBS
LIBS="$GD_LIBS $LIBS"
CPPFLAGS="$GD_CFLAGS $CPPFLAGS"
AC_TRY_LINK([#include <gd.h>], [gdImageCreateFromPng(0);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_GRAPHICS_GD_PNG, 1, [Define to 1 if you have png support in gd.]),AC_MSG_RESULT(no))
CPPFLAGS=$save_CPPFLAGS
LIBS=$save_LIBS
fi
# gtk_drawing_area
AC_ARG_ENABLE(graphics-gtk-drawing-area, [ --disable-graphics-gtk-drawing-area disable graphics type gtk_drawing_area], graphics_gtk_drawing_area=$enableval;graphics_gtk_drawing_area_reason="configure parameter")
AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
# null
AC_ARG_ENABLE(graphics-null, [ --disable-graphics-null disable graphics type null], graphics_null=$enableval;graphics_null_reason="configure parameter")
AM_CONDITIONAL(GRAPHICS_NULL, test "x${graphics_null}" = "xyes")
# win32
AC_ARG_ENABLE(graphics-win32, [ --disable-graphics-win32 disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
# qt_qpainter
AC_ARG_ENABLE(graphics-qt-qpainter, [ --disable-graphics-qt-qpainter disable graphics type qt-qpainter], graphics_qt_qpainter=$enableval;graphics_qt_qpainter_reason="configure parameter")
if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore],graphics_qt_qpainter=yes,graphics_qt_qpainter=no;graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
if test "x${graphics_qt_qpainter}" = "xno"; then
PKG_CHECK_MODULES(QT_GUI, [qt-mt],graphics_qt_qpainter=yes;graphics_qt_qpainter_reason="Package qt-mt present",graphics_qt_qpainter=no)
fi
fi
if test "x${graphics_qt_qpainter}" = "xyes" ; then
PKG_CHECK_MODULES(QT_SVG, [QtSvg], have_qt_svg=yes, have_qt_svg=no)
if test "x${have_qt_svg}" = "xyes"; then
AC_DEFINE([HAVE_QT_SVG],[],Define to 1 if qt supports svg)
fi
fi
if test "x${graphics_qt_qpainter}" = "xyes" ; then
AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
fi
AC_SUBST(QT_GUI_CFLAGS)
AC_SUBST(QT_GUI_LIBS)
AC_SUBST(QT_SVG_CFLAGS)
AC_SUBST(QT_SVG_LIBS)
AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
MOC=`$PKG_CONFIG QtGui --variable=moc_location`
if test "x${MOC}" = "x"; then
AC_CHECK_PROG(MOC, moc, moc)
fi
AC_SUBST(MOC)
## map
# binfile
AC_ARG_ENABLE(map-binfile, [ --disable-map-binfile disable map binfile], map_binfile=$enableval;map_binfile_reason="configure parameter")
AM_CONDITIONAL(MAP_BINFILE, test "x${map_binfile}" = "xyes")
# filter
AC_ARG_ENABLE(map-filter, [ --disable-map-filter disable map filter], map_filter=$enableval;map_filter_reason="configure parameter")
AM_CONDITIONAL(MAP_FILTER, test "x${map_filter}" = "xyes")
# mg
AC_ARG_ENABLE(map-mg, [ --disable-map-mg disable map mg], map_mg=$enableval;map_mg_reason="configure parameter")
AM_CONDITIONAL(MAP_MG, test "x${map_mg}" = "xyes")
# shapefile
AC_ARG_ENABLE(map-shapefile, [ --disable-map-shapefile disable map shapefile], map_shapefile=$enableval;map_shapefile_reason="configure parameter")
AM_CONDITIONAL(MAP_SHAPEFILE, test "x${map_shapefile}" = "xyes")
# textfile
AC_ARG_ENABLE(map-textfile, [ --disable-map-textfile disable map textfile], map_textfile=$enableval;map_textfile_reason="configure parameter")
AM_CONDITIONAL(MAP_TEXTFILE, test "x${map_textfile}" = "xyes")
# csv
AC_ARG_ENABLE(map-csv, [ --disable-map-csv disable map csv], map_csv=$enableval;map_csv_reason="configure parameter")
AM_CONDITIONAL(MAP_CSV, test "x${map_csv}" = "xyes")
## osd
# core
AC_ARG_ENABLE(osd-core, [ --disable-osd-core disable osd core], osd_core=$enableval;osd_core_reason="configure parameter")
AM_CONDITIONAL(OSD_CORE, test "x${osd_core}" = "xyes")
## gui
# gtk
AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk disable gui type gtk ], gui_gtk=$enableval)
AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
# internal
AC_ARG_ENABLE(gui-internal, [ --disable-gui-internal disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
# win32
AC_ARG_ENABLE(gui-win32, [ --disable-gui-win32 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
# qml
AC_ARG_ENABLE(gui-qml, [ --disable-gui-qml disable gui type QML], gui_qml=$enableval;gui_qml_reason="configure parameter")
if test "x${gui_qml}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,gui_qml=no;gui_qml_reason="Packages QtGui and/or QtCore are missing")
fi
if test "x${gui_qml}" = "xyes" -a "x${QT_XML_CFLAGS}" = "x" -a "x${QT_XML_LIBS}" = "x"; then
PKG_CHECK_MODULES(QT_XML, [QtXml], ,gui_qml=no;gui_qml_reason="Package QtXml is missing")
fi
if test "x${gui_qml}" = "xyes" -a "x${QT_DECLARATIVE_CFLAGS}" = "x" -a "x${QT_DECLARATIVE_LIBS}" = "x"; then
PKG_CHECK_MODULES(QT_DECLARATIVE, [QtDeclarative >= 4.6.0 ], ,gui_qml=no;gui_qml_reason="Packages QtDeclarative is missing")
fi
if test "x${gui_qml}" = "xyes" ; then
AC_DEFINE(USE_GUI_QML, 1, [Build with gui qml])
fi
AC_SUBST(QT_GUI_CFLAGS)
AC_SUBST(QT_GUI_LIBS)
AC_SUBST(QT_DECLARATIVE_CFLAGS)
AC_SUBST(QT_DECLARATIVE_LIBS)
AC_SUBST(QT_XML_CFLAGS)
AC_SUBST(QT_XML_LIBS)
AM_CONDITIONAL(GUI_QML, test "x${gui_qml}" = "xyes")
## plugins
# pedestrian
AC_ARG_ENABLE(plugin-pedestrian, [ --enable-plugin-pedestrian enable pedestrian plugin], plugin_pedestrian=$enableval;plugin_pedestrian_reason="configure parameter")
AM_CONDITIONAL(PLUGIN_PEDESTRIAN, test "x${plugin_pedestrian}" = "xyes")
## routing
AC_ARG_ENABLE(routing, [ --disable-routing disable routing], routing=$enableval;routing_reason="configure parameter")
AM_CONDITIONAL(ROUTING, test "x${routing}" = "xyes")
if test "x$routing" = "xyes"; then
AC_DEFINE([USE_ROUTING],[1],Define to 1 if you want to have routing.)
fi
## speech
# android
AC_ARG_ENABLE(speech-android, [ --disable-speech-android disable speech type android], speech_android=$enableval;speech_android_reason="configure parameter")
AM_CONDITIONAL(SPEECH_ANDROID, test "x${speech_android}" = "xyes")
# cmdline
AC_ARG_ENABLE(speech-cmdline, [ --disable-speech-cmdline disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
# espeak
AC_ARG_ENABLE(speech-espeak, [ --disable-speech-espeak disable speech type espeak], speech_espeak=$enableval;speech_espeak_reason="configure parameter")
AM_CONDITIONAL(SPEECH_ESPEAK, test "x${speech_espeak}" = "xyes")
# speech-dispatcher