-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
1238 lines (1068 loc) · 40.7 KB
/
configure.ac
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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
# Rationale: (i) placate simple version comparison software such as
# `dpkg --compare-versions'. (ii) We don't always know what the next
# version is going to be called until about the time we release it
# (whereas we always know what the previous version was called).
#
# Pre-releases are named "M.NNpreX" where X starts at 0 for the first alpha.
AC_INIT([inkscape], [0.92.2],
[http://bugs.launchpad.net/inkscape/+filebug],
[inkscape],
[http://inkscape.org/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_HOST
# We need version 1.9 of Automake or higher since we no longer distribute the
# obsolete mkinstalldirs script
AM_INIT_AUTOMAKE([-Wall dist-zip dist-bzip2 tar-pax 1.9])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
prefix=/opt/inkscape
PATH="/opt/lsb/bin:$PATH"
CC=lsbcc
CXX=lsbc++
export CC CXX
])
AC_LANG(C++)
AC_PROG_CXX
AC_PROG_OBJCXX
AC_PROG_OBJC
AC_PROG_CC
AM_PROG_AS
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT
AC_HEADER_STDC
INK_BZR_SNAPSHOT_BUILD
dnl If automake 1.11 shave the output to look nice
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
dnl *********************************************************
dnl Configure a strict set of build rules to prevent usage of
dnl deprecated features in external libraries and code that
dnl triggers compiler warnings.
dnl *********************************************************
AC_ARG_ENABLE(strict-build,
[AS_HELP_STRING([--enable-strict-build], [Enable strict build configuration [[default=yes]]. Usage of most deprecated symbols is forbidden by default. Set the argument to "high" to introduce very strict checking that will cause the build to fail on many systems.])],
[enable_strict_build=$enableval],
[enable_strict_build=yes])
if test "x$enable_strict_build" = "xno"; then
AC_MSG_WARN([Strict build options disabled])
elif test "x$enable_strict_build" = "xhigh"; then
AC_MSG_WARN([Strictest build options enabled. This will cause build failure on most systems])
else
AC_MSG_RESULT([Strict build options enabled])
fi
dnl These next few lines are needed only while libcroco is in our source tree.
AM_PROG_CC_C_O
if test "$GCC" = "yes"; then
# Enable some warnings from gcc.
AC_LANG_PUSH(C)
####
# Generic cpp flags...
# What is just plain "-W" ?
# Fortify source requires -O2 or higher, which is handled with newer autoconf
CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
# Enable format and format security warnings
CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
# Enable all default warnings
CPPFLAGS="-Wall $CPPFLAGS"
# Permit only top-level Glib headers to be used.
#
# TODO: This is already used in Glib >= 2.32 so this flag can be
# dropped when all targeted distros use higher Glib versions.
CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
# Ensure that private GTK+ fields are not accessible. This strictly
# enforced in Gtk+ 3, so it is important to check this in Gtk+ 2 builds
CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
# Unfortunately, we cannot (yet) build with -Werror, so we have to manually
# change a ton of warnings into errors.
# After some more work on fixing warning-inducing code, we can change this set into
# it's complement and use -Wno-error=...
# Test for -Werror=... (introduced some time post-4.0)
AC_MSG_CHECKING([compiler support for -Werror=...])
ink_svd_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Werror=format-security -Wswitch -Werror=return-type $CPPFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
CPPFLAGS="$ink_svd_CPPFLAGS"
fi
# Uncomment for SVG2 stuff
CPPFLAGS="-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2 $CPPFLAGS"
# Uncomment for LPE Tool and All LPEs
# CPPFLAGS="-DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS $CPPFLAGS"
####
# C-specific flags...
# -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
# by gcc 2.95.
AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
ink_svd_CFLAGS="$CFLAGS"
CFLAGS="-Wno-pointer-sign $CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
CFLAGS="$ink_svd_CFLAGS"
fi
# This Automake variable is only used to suppress warnings in our internal
# fork of GDL. Once we get rid of our GDL fork, we can delete this test
AC_MSG_CHECKING([compiler support for -Wno-unused-but-set-variable])
ink_svd_CFLAGS="$CFLAGS"
CFLAGS="-Wno-unused-but-set-variable $CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
CFLAGS="$ink_svd_CFLAGS"
AM_CONDITIONAL(CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED, test "$ink_opt_ok" = "yes")
####
# Linker flags...
# Have linker produce read-only relocations, if it knows how
AC_MSG_CHECKING([linker tolerates -z relro])
ink_svd_LDFLAGS="$LDFLAGS"
LDFLAGS="-Wl,-z,relro $LDFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
LDFLAGS="$ink_svd_LDFLAGS"
fi
AC_LANG_POP
# C++-specific flags are defined further below. Look for CXXFLAGS...
fi
# Test whether GCC emits a spurious warning when using boost::optional
# If yes, turn off strict aliasing warnings to reduce noise
# and allow the legitimate warnings to stand out
AC_MSG_CHECKING([for overzealous strict aliasing warnings])
ignore_strict_aliasing=no
CXXFLAGS_SAVE=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <boost/optional.hpp>
boost::optional<int> x;
int func() {
return *x;
}
])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
AC_MSG_RESULT($ignore_strict_aliasing)
CXXFLAGS=$CXXFLAGS_SAVE
if test "x$ignore_strict_aliasing" = "xyes"; then
CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
fi
dnl ******************************
dnl Gettext stuff
dnl ******************************
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE="AC_PACKAGE_NAME"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
fi
dnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
dnl ******************************
dnl Check for OpenMP
dnl ******************************
AC_OPENMP
if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
openmp_ok=yes
dnl We have it, now set up the flags
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
fi
dnl ********************
dnl Check for libpotrace
dnl ********************
AC_CHECK_LIB(potrace, potrace_trace, [AC_CHECK_HEADER(potracelib.h, potrace_ok=yes, potrace_ok=no)], potrace_ok=no)
if test "x$potrace_ok" = "xyes"; then
LIBS="-lpotrace $LIBS"
AC_DEFINE(HAVE_POTRACE, 1, [Use Potrace])
fi
AM_CONDITIONAL(HAVE_POTRACE, test "x$potrace_ok" = "xyes")
dnl ******************************
dnl Check for libexif
dnl ******************************
PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
if test "x$exif_ok" = "xyes"; then
AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
fi
AC_SUBST(EXIF_LIBS)
AC_SUBST(EXIF_CFLAGS)
dnl ******************************
dnl Check for libjpeg
dnl ******************************
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
if test "x$jpeg_ok" = "xyes"; then
LIBS="-ljpeg $LIBS"
AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
fi
dnl This check is to get a FIONREAD definition on Solaris 8
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_FUNCS([mallinfo], [
AC_CHECK_MEMBERS([struct mallinfo.usmblks,
struct mallinfo.fsmblks,
struct mallinfo.uordblks,
struct mallinfo.fordblks,
struct mallinfo.hblkhd],,,
[#include <malloc.h>])
])
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
if test "x$FREETYPE_CONFIG" = "xno"; then
AC_MSG_ERROR([Cannot find freetype-config])
fi
FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
dnl ******************************
dnl Win32
dnl ******************************
AC_MSG_CHECKING([for Win32 platform])
case "$host" in
*-*-mingw*)
platform_win32=yes
WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
AC_SUBST(WIN32_CFLAGS)
dnl TODO - switch to a linker/libtool/feature check, not OS check:
dnl ******************************
dnl MacOS X
dnl ******************************
AC_MSG_CHECKING([for OSX platform])
if test "x$build_vendor" = "xapple" ; then
platform_osx=yes
else
platform_osx=no
fi
AC_MSG_RESULT([$platform_osx])
AC_MSG_CHECKING([for Solaris platform])
case "$host" in
*-solaris2.*)
platform_solaris=yes
solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
;;
*)
platform_solaris=no
;;
esac
AC_MSG_RESULT([$platform_solaris])
AM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
dnl ******************************
dnl gnome vfs checking
dnl ******************************
AC_ARG_WITH(gnome-vfs,
AS_HELP_STRING([--with-gnome-vfs],[use gnome vfs for loading files]),
[with_gnome_vfs=$withval], [with_gnome_vfs=auto])
if test "x$with_gnome_vfs" = "xno"; then
dnl Asked to ignore gnome-vfs
gnome_vfs=no
else
dnl Have to test gnome-vfs presence
PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
if test "x$gnome_vfs" != "xyes"; then
dnl No gnome-vfs found
if test "x$with_gnome_vfs" = "xyes"; then
dnl Gnome-VFS was explicitly asked for, so stop
AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
else
# gnome-vfs is no, tell us for the log file
AC_MSG_RESULT($gnome_vfs)
fi
fi
fi
AM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
if test "x$gnome_vfs" = "xyes"; then
AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
fi
AC_SUBST(GNOME_VFS_CFLAGS)
AC_SUBST(GNOME_VFS_LIBS)
dnl ******************************
dnl libinkjar checking
dnl ******************************
AC_ARG_WITH(inkjar,
AS_HELP_STRING([--without-inkjar],[disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
if test "x$with_ij" = "xyes"; then
AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
AC_C_BIGENDIAN
AC_CHECK_HEADERS(zlib.h)
ij=yes
else
ij=no
fi
AM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
dnl ******************************
dnl LittleCms checking
dnl ******************************
AC_ARG_ENABLE(lcms,
AS_HELP_STRING([--enable-lcms],[enable LittleCms for color management]),
[enable_lcms=$enableval], [enable_lcms=yes])
if test "x$enable_lcms" = "xno"; then
# Asked to ignore LittleCms
lcms=no
have_lcms2=no
else
# Have to test LittleCms presence
PKG_CHECK_MODULES(LCMS2, lcms2, have_lcms2="yes", have_lcms2="no")
if test "x${have_lcms2}" = "xyes"; then
LIBS="$LIBS $LCMS2_LIBS"
AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version 2.x])
AC_SUBST(LCMS2_CFLAGS)
AC_SUBST(LCMS2_LIBS)
else
PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
if test "x$lcms" = "xyes"; then
LIBS="$LIBS $LCMS_LIBS"
AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version 1.x])
AC_SUBST(LCMS_CFLAGS)
AC_SUBST(LCMS_LIBS)
else
# No lcms found. LittleCms was explicitly asked for, so stop
AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
fi
fi
fi
dnl ******************************
dnl Libpoppler checking
dnl ******************************
AC_ARG_ENABLE(poppler-cairo,
AS_HELP_STRING([--enable-poppler-cairo],[Enable libpoppler-cairo for rendering PDF preview]),
[enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
POPPLER_CFLAGS=""
PKG_CHECK_MODULES(POPPLER, poppler >= 0.20.0, poppler=yes, poppler=no)
if test "x$poppler" = "xyes"; then
dnl Working libpoppler
dnl Have to test libpoppler-glib presence
PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.20.0, poppler_glib=yes, poppler_glib=no)
if test "x$poppler_glib" = "xyes"; then
dnl Working libpoppler-glib found
dnl Check whether the Cairo SVG backend is available
PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
if test "x$cairo_svg" = "xyes"; then
POPPLER_LIBS="$POPPLER_LIBS $POPPLER_GLIB_LIBS "
fi
fi
if test "x$enable_poppler_cairo" = "xyes"; then
dnl Have to test libpoppler-cairo presence for PDF preview
dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.20.0, poppler_cairo=yes, poppler_cairo=no)
if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
"x$cairo_svg" = "xno"
then
POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
fi
fi
fi
if test "x$poppler" = "xyes"; then
LIBS="$LIBS $POPPLER_LIBS"
AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
fi
if test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
fi
if test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
fi
AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
ink_svd_CPPFLAGS=$CPPFLAGS
ink_svd_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
LIBS="$LIBS $POPPLER_LIBS"
PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_COLOR_SPACE_API, poppler >= 0.26.0, popplernewercolorspaceapi=yes, popplernewercolorspaceapi=no)
if test "x$popplernewercolorspaceapi" = "xyes"; then
AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
fi
PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no)
if test "x$popplernewernewcolorspaceapi" = "xyes"; then
AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0])
fi
PKG_CHECK_MODULES(POPPLER_NEW_OBJECT_API, poppler >= 0.58.0, popplernewobjectapi=yes, popplernewobjectapi=no)
if test "x$popplernewobjectapi" = "xyes"; then
AC_DEFINE(POPPLER_NEW_OBJECT_API, 1, [Use new object API from Poppler >= 0.58.0])
fi
CPPFLAGS=$ink_svd_CPPFLAGS
LIBS=$ink_svd_LIBS
dnl ******************************
dnl Check for libwpg for extension
dnl ******************************
AC_ARG_ENABLE(wpg,
AS_HELP_STRING([--disable-wpg], [compile without support for WordPerfect Graphics]),
enable_wpg=$enableval,enable_wpg=yes)
with_libwpg=no
if test "x$enable_wpg" = "xyes"; then
dnl **************************************************************
dnl Try using librevenge framework first. Fall back to old libs
dnl if unavailable.
dnl TODO: Drop subsequent tests once this is widespread in distros
dnl **************************************************************
PKG_CHECK_MODULES(LIBWPG03, libwpg-0.3 librevenge-0.0 librevenge-stream-0.0, with_libwpg03=yes, with_libwpg03=no)
if test "x$with_libwpg03" = "xyes"; then
AC_DEFINE(WITH_LIBWPG03,1,[Build using libwpg 0.3.x])
with_libwpg=yes
AC_SUBST(LIBWPG_LIBS, $LIBWPG03_LIBS)
AC_SUBST(LIBWPG_CFLAGS, $LIBWPG03_CFLAGS)
else
PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
if test "x$with_libwpg02" = "xyes"; then
AC_DEFINE(WITH_LIBWPG02,1,[Build using libwpg 0.2.x])
with_libwpg=yes
AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
fi
fi
if test "x$with_libwpg" = "xyes"; then
AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
fi
fi
AM_CONDITIONAL(WITH_LIBWPG03, test "x$with_libwpg03" = "xyes")
AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
dnl ********************************
dnl Check for libvisio for extension
dnl ********************************
AC_ARG_ENABLE(visio,
AS_HELP_STRING([--disable-visio], [compile without support for Microsoft Visio Diagrams]),
enable_visio=$enableval,enable_visio=yes)
with_libvisio=no
if test "x$enable_visio" = "xyes"; then
dnl **************************************************************
dnl Try using librevenge framework first. Fall back to old libs
dnl if unavailable.
dnl TODO: Drop subsequent tests once this is widespread in distros
dnl **************************************************************
PKG_CHECK_MODULES(LIBVISIO01, libvisio-0.1 librevenge-0.0 librevenge-stream-0.0, with_libvisio01=yes, with_libvisio01=no)
if test "x$with_libvisio01" = "xyes"; then
AC_DEFINE(WITH_LIBVISIO01,1,[Build using libvisio 0.1.x])
with_libvisio=yes
AC_SUBST(LIBVISIO_LIBS, $LIBVISIO01_LIBS)
AC_SUBST(LIBVISIO_CFLAGS, $LIBVISIO01_CFLAGS)
else
PKG_CHECK_MODULES(LIBVISIO00, libvisio-0.0 >= 0.0.20 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libvisio00=yes, with_libvisio00=no)
if test "x$with_libvisio00" = "xyes"; then
AC_DEFINE(WITH_LIBVISIO00,1,[Build using libvisio 0.0.x])
with_libvisio=yes
AC_SUBST(LIBVISIO_LIBS, $LIBVISIO00_LIBS)
AC_SUBST(LIBVISIO_CFLAGS, $LIBVISIO00_CFLAGS)
fi
fi
if test "x$with_libvisio" = "xyes"; then
AC_DEFINE(WITH_LIBVISIO,1,[Build in libvisio])
fi
fi
AM_CONDITIONAL(WITH_LIBVISIO01, test "x$with_libvisio01" = "xyes")
AM_CONDITIONAL(WITH_LIBVISIO00, test "x$with_libvisio00" = "xyes")
AM_CONDITIONAL(WITH_LIBVISIO, test "x$with_libvisio" = "xyes")
dnl ********************************
dnl Carbon Integration
dnl ********************************
AC_ARG_ENABLE(carbon,
AS_HELP_STRING([--enable-osx-carbon], [enable Carbon Integration]),
enable_carbon=$enableval,enable_carbon=no)
with_carbon=no
if test "x$enable_carbon" = "xyes"; then
PKG_CHECK_MODULES(GTKMACINTEGRATION, gtk-mac-integration-gtk2, gtk_mac_integration_gtk2_ok=yes, gtk_mac_integration_gtk2_ok=no)
if test "x$gtk_mac_integration_gtk2_ok" = "xyes"; then
AC_DEFINE(HAVE_GTKMACINTEGRATION, 1, [Use gtk-mac-integration])
AC_SUBST(GTKMACINTEGRATION_LIBS)
AC_SUBST(GTKMACINTEGRATION_CFLAGS)
with_carbon=yes
AC_DEFINE(WITH_CARBON_INTEGRATION,1,[Build with OSX Carbon Integration])
AM_CONDITIONAL(WITH_CARBON_INTEGRATION, test "$with_carbon" = "yes")
LIBS="$LIBS $GTKMACINTEGRATION_LIBS"
CPPFLAGS="$CPPFLAGS $GTKMACINTEGRATION_CFLAGS"
fi
fi
dnl ********************************
dnl Check for libcdr for extension
dnl ********************************
AC_ARG_ENABLE(cdr,
AS_HELP_STRING([--disable-cdr], [compile without support for CorelDRAW Diagrams]),
enable_cdr=$enableval,enable_cdr=yes)
with_libcdr=no
if test "x$enable_cdr" = "xyes"; then
dnl **************************************************************
dnl Try using librevenge framework first. Fall back to old libs
dnl if unavailable.
dnl TODO: Drop subsequent tests once this is widespread in distros
dnl **************************************************************
PKG_CHECK_MODULES(LIBCDR01, libcdr-0.1 librevenge-0.0 librevenge-stream-0.0, with_libcdr01=yes, with_libcdr01=no)
if test "x$with_libcdr01" = "xyes"; then
AC_DEFINE(WITH_LIBCDR01,1,[Build using libcdr 0.1.x])
with_libcdr=yes
AC_SUBST(LIBCDR_LIBS, $LIBCDR01_LIBS)
AC_SUBST(LIBCDR_CFLAGS, $LIBCDR01_CFLAGS)
else
PKG_CHECK_MODULES(LIBCDR00, libcdr-0.0 >= 0.0.3 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libcdr00=yes, with_libcdr00=no)
if test "x$with_libcdr00" = "xyes"; then
AC_DEFINE(WITH_LIBCDR00,1,[Build using libcdr 0.0.x])
with_libcdr=yes
AC_SUBST(LIBCDR_LIBS, $LIBCDR00_LIBS)
AC_SUBST(LIBCDR_CFLAGS, $LIBCDR00_CFLAGS)
fi
fi
if test "x$with_libcdr" = "xyes"; then
AC_DEFINE(WITH_LIBCDR,1,[Build in libcdr])
fi
fi
AM_CONDITIONAL(WITH_LIBCDR01, test "x$with_libcdr01" = "xyes")
AM_CONDITIONAL(WITH_LIBCDR00, test "x$with_libcdr00" = "xyes")
AM_CONDITIONAL(WITH_LIBCDR, test "x$with_libcdr" = "xyes")
dnl ******************************
dnl Support doing a local install
dnl (mostly for distcheck)
dnl ******************************
with_localinstall="no"
AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
dnl ******************************
dnl Check for dbus functionality
dnl ******************************
AC_ARG_ENABLE(dbusapi,
AS_HELP_STRING([--enable-dbusapi], [compile with support for DBus interface]),
enable_dbusapi=$enableval,enable_dbusapi=no)
with_dbus="no"
if test "x$enable_dbusapi" = "xyes"; then
PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
if test "x$with_dbus" = "xyes"; then
if test "x$with_localinstall" = "xyes"; then
DBUSSERVICEDIR="${datadir}/dbus-1/services/"
else
DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
fi
AC_SUBST(DBUSSERVICEDIR)
AC_DEFINE(WITH_DBUS,1,[Build in dbus])
fi
fi
AC_SUBST(DBUS_LIBS)
AC_SUBST(DBUS_CFLAGS)
AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
dnl ******************************
dnl Check for ImageMagick Magick++
dnl ******************************
PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
if test "x$magick_ok" = "xyes"; then
AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
fi
AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
AC_SUBST(IMAGEMAGICK_LIBS)
AC_SUBST(IMAGEMAGICK_CFLAGS)
dnl ******************************
dnl Unconditional dependencies
dnl ******************************
dnl Separate out dependencies that are known to introduce
dnl C++-specific compiler flags
PKG_CHECK_MODULES(INKSCAPE_CXX_DEPS,
cairomm-1.0 >= 1.9.8
glibmm-2.4 >= 2.28
giomm-2.4
sigc++-2.0 >= 2.0.12
)
PKG_CHECK_MODULES(INKSCAPE,
bdw-gc >= 7.2
cairo >= 1.10
glib-2.0 >= 2.28
gmodule-2.0
gsl
gthread-2.0 >= 2.0
libpng >= 1.2
libxml-2.0 >= 2.6.11
libxslt >= 1.0.15
pango >= 1.24
pangoft2 >= 1.24
)
# test whether depenencies require C++11
AC_MSG_CHECKING([whether C++11 mode is required])
CXXFLAGS_SAVE="$CXXFLAGS"
CXXFLAGS="$INKSCAPE_CXX_DEPS_CFLAGS $CXXFLAGS"
cxx11_required=unknown
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <glibmm.h>
int main() {}
])], [cxx11_required=no], [cxx11_required=unknown])
if test "x$cxx11_required" = "xunknown"; then
CXXFLAGS="-std=c++11 $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <glibmm.h>
int main() {}
])], [cxx11_required=yes], [cxx11_required=unknown])
fi
CXXFLAGS="$CXXFLAGS_SAVE"
if test "x$cxx11_required" = "xunknown"; then
AC_MSG_RESULT([unknown])
AC_MSG_ERROR([cannot detect whether C++11 is required])
fi
if test "x$cxx11_required" = "xyes"; then
AC_MSG_RESULT([yes])
CXXFLAGS="-std=c++11 $CXXFLAGS"
else
AC_MSG_RESULT([no])
fi
# Detect a working version of unordered containers.
# First try looking for native support (C++11 feature)
AC_MSG_CHECKING([native support for unordered_set])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unordered_set>]],
[[
std::unordered_set<int> i, j;
i = j;
]])],
[native_unordered_set_works=yes], [native_unordered_set_works=no])
if test "x$native_unordered_set_works" = "xyes"; then
AC_MSG_RESULT([ok])
AC_DEFINE(HAVE_NATIVE_UNORDERED_SET, 1, [Has working native unordered_set])
else
AC_MSG_RESULT([not working])
fi
AC_MSG_CHECKING([TR1 unordered_set usability])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <tr1/unordered_set>]],
[[
std::tr1::unordered_set<int> i, j;
i = j;
]])],
[tr1_unordered_set_works=yes], [tr1_unordered_set_works=no])
if test "x$tr1_unordered_set_works" = "xyes"; then
AC_MSG_RESULT([ok])
AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
else
AC_MSG_RESULT([not working])
fi
AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
dnl *********************************
dnl Allow experimental GTK+3 build
dnl *********************************
AC_ARG_ENABLE(gtk3-experimental,
AS_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]),
[enable_gtk3=$enableval], [enable_gtk3=no])
with_gtkmm_3_0="no"
if test "x$enable_gtk3" = "xyes"; then
ink_spell_pkg=
if pkg-config --exists gtkspell-3.0; then
ink_spell_pkg=gtkspell-3.0
AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
fi
PKG_CHECK_MODULES(GTK,
gtk+-3.0 >= 3.8
gdk-3.0 >= 3.8
gdl-3.0 > 3.4
$ink_spell_pkg)
dnl Separate out dependencies that are known to introduce
dnl C++-specific compiler flags
PKG_CHECK_MODULES(GTKMM,
gtkmm-3.0 >= 3.8
gdkmm-3.0 >= 3.8,
with_gtkmm_3_0=yes,
with_gtkmm_3_0=no)
if test "x$with_gtkmm_3_0" = "xyes"; then
AC_MSG_RESULT([Using EXPERIMENTAL Gtkmm 3 build])
AC_DEFINE(WITH_GTKMM_3_0,1,[Build with Gtkmm 3.x])
AC_MSG_RESULT([Using external GDL])
AC_DEFINE(WITH_EXT_GDL,1,[Build with external GDL])
else
AC_MSG_ERROR([Some dependencies were not fulfilled for the experimental GTK+ 3 build. One possible cause for this is a new dependency on the gdl-3.0 development package.])
fi
# Check whether we can use new features in Gtkmm 3.10
# TODO: Drop this test and bump the version number in the GTK test above
# as soon as all supported distributions provide Gtkmm >= 3.10
PKG_CHECK_MODULES(GTKMM_3_10,
gtkmm-3.0 >= 3.10,
with_gtkmm_3_10=yes,
with_gtkmm_3_10=no)
if test "x$with_gtkmm_3_10" = "xyes"; then
AC_MSG_RESULT([Using Gtkmm 3.10 build])
AC_DEFINE(WITH_GTKMM_3_10,1,[Build with Gtkmm 3.10.x or higher])
fi
# Check whether we are using Gdl >= 3.6. This version introduced an API/ABI change.
# TODO: We should drop support for older versions of Gdl once all supported distros
# provide Gdl 3.6 or higher
PKG_CHECK_MODULES(GDL_3_6, gdl-3.0 >= 3.6, with_gdl_3_6=yes, with_gdl_3_6=no)
if test "x$with_gdl_3_6" = "xyes"; then
AC_MSG_RESULT([Using Gdl 3.6 or higher])
AC_DEFINE(WITH_GDL_3_6,1,[Build with Gdl 3.6 or higher])
fi
dnl The following test is only defined if Gtk+ 3 development libraries
dnl are installed on the system. Therefore, it is guarded by an
dnl m4_ifdef statement. The ifdef can be probably be removed once we
dnl switch to Gtk+ 3 as a hard dependency
# Check whether we are using the X11 backend target for Gtk+ 3.
m4_ifdef([GTK_CHECK_BACKEND],
[GTK_CHECK_BACKEND([x11], , [have_x11=yes], [have_x11=no])])
# Enable strict build options that should work on most systems unless
# the build has been configured not to do so
if test "x$enable_strict_build" != "xno"; then
# Add build flags here as soon as Inkscape trunk can build
# against Gtk+ 3 with the option enabled
echo ""
fi
# Enable strict build options that are known to cause failure in
# Gtk+ 3 builds
if test "x$enable_strict_build" = "xhigh"; then
# Disable deprecated Gtk+ symbols that have been removed since
# Gtk+ 3.
CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
fi
else
ink_spell_pkg=
if pkg-config --exists gtkspell-2.0; then
ink_spell_pkg=gtkspell-2.0
AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
fi
PKG_CHECK_MODULES(GTK,
gtk+-2.0 >= 2.24
$ink_spell_pkg)
dnl Separate out dependencies that are known to introduce C++-specific
dnl compiler flags
PKG_CHECK_MODULES(GTKMM,
gdkmm-2.4 >= 2.24
gtkmm-2.4 >= 2.24)
# Check whether we are using the X11 backend for Gtk+ 2.
AC_MSG_CHECKING([if Gtk+ 2.0 is using the X11 backend target])
if test "x`$PKG_CONFIG --variable=target gtk+-2.0`" = "xx11"; then
have_x11=yes
else
have_x11=no
fi
AC_MSG_RESULT($have_x11)
# Enable build strict options that should work on most systems unless
# the build has been configured explicitly not to do so
if test "x$enable_strict_build" != "xno"; then
# Prevent usage of deprecated Gtk+ symbols. These have all
# been removed in Gtk+ 3 so these checks are important.
CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
# Allow only top-level GTK+ headers to be used. This is mandatory
# for GTK+ >= 3.0 so there is no need to apply the flag in GTK+ 3
# builds.
CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
fi
# Optionally enable strict build options that are known to cause build
# failure in many/most systems
if test "x$enable_strict_build" == "xhigh"; then
# FIXME: This causes build failure because our internal
# copy of GDL uses deprecated GDK symbols.
#
# This specific issue isn't a problem for GTK+ 3 builds because
# we build against external GDL >= 3.3.4 rather than using
# the deprecated internal code
CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
fi
fi
AM_CONDITIONAL(WITH_GTKMM_3_0, test "x$with_gtkmm_3_0" = "xyes")
INKSCAPE_CFLAGS="$GTK_CFLAGS $INKSCAPE_CFLAGS"
INKSCAPE_CXX_DEPS_CFLAGS="$GTKMM_CFLAGS $INKSCAPE_CXX_DEPS_CFLAGS"
INKSCAPE_LIBS="$GTK_LIBS $INKSCAPE_LIBS"
INKSCAPE_CXX_DEPS_LIBS="$GTKMM_LIBS $INKSCAPE_CXX_DEPS_LIBS"
CPPFLAGS="$CPPFLAGS $GTKMM_CFLAGS"
dnl Configure x11 library if Gtk+ uses it as a backend.
dnl Note that this is only here because we directly use X11 functionality. We
dnl wouldn't need this check if we were only using X as the Gtk+ backend.
if test "x$have_x11" = "xyes"; then
PKG_CHECK_MODULES(X11, x11)
fi
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
AM_CONDITIONAL(WITH_EXT_GDL, test "x$with_gtkmm_3_0" = "xyes")
# Prevent usage of deprecated library symbols unless strict build
# checking has been disabled
if test "x$enable_strict_build" != "xno"; then
CPPFLAGS="-DGDKMM_DISABLE_DEPRECATED $CPPFLAGS"
# Ensure that no deprecated glibmm symbols are introduced.
# lp:inkscape builds cleanly with this option at r10957
CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
dnl Pango 1.32.4 uses a deprecated Glib symbol:
dnl https://bugzilla.gnome.org/show_bug.cgi?id=689843
dnl
dnl TODO: Get rid of this check once we are sure that all targeted
dnl platforms have got rid of this Pango version. Apply the
dnl G_DISABLE_DEPRECATED flag to all builds.
pango_uses_deprecated_glib_symbols=no
PKG_CHECK_MODULES(PANGO_USES_DEPRECATED_GLIB_SYMBOLS,
pango = 1.32.4,
pango_uses_deprecated_glib_symbols=yes,
pango_uses_deprecated_glib_symbols=no)
# Don't disable deprecated Glib symbols if it will break stuff in an
# external library header that we use
if test "x$pango_uses_deprecated_glib_symbols" = "xyes"; then
AC_MSG_WARN([The available version of Pango uses deprecated Glib symbols. Deprecated Glib symbol usage will be allowed])
else
CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
fi
fi
# Disable all deprecated symbols if very strict build is requested.
# TODO: Make this a default option for Gtk+ 2 or 3 builds as soon as
# possible.
if test "x$enable_strict_build" = "xhigh"; then
CPPFLAGS="-Werror=deprecated-declarations $CPPFLAGS"
fi
# Check for some boost header files
AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
if test "x$cairo_pdf" = "xyes"; then
AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
fi
dnl Shouldn't we test for libz?
INKSCAPE_LIBS="$INKSCAPE_LIBS -lz"
if test "x$openmp_ok" = "xyes"; then
INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp"
fi
AC_CHECK_HEADER(popt.h,
[INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
AC_MSG_ERROR([libpopt is required]))
dnl **************************
dnl Check for aspell
dnl ******************************
AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
if test "x$aspell_ok" = "xyes"; then
AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
else
AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
fi
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
sp_save_LIBS=$LIBS
LIBS="$LIBS $INKSCAPE_LIBS"
AC_CHECK_FUNCS(bind_textdomain_codeset)
LIBS=$sp_save_LIBS
dnl Check for binary relocation support
dnl Hongli Lai <[email protected]>
AC_ARG_ENABLE(binreloc,
AS_HELP_STRING([--enable-binreloc], [compile with binary relocation support]),
enable_binreloc=$enableval,enable_binreloc=no)
AC_MSG_CHECKING(whether binary relocation support should be enabled)
if test "$enable_binreloc" = "yes"; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
if test -e /proc/self/maps; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
enable_binreloc="no"