-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfigure.ac
More file actions
5534 lines (4554 loc) · 160 KB
/
configure.ac
File metadata and controls
5534 lines (4554 loc) · 160 KB
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
PACKAGE=libferris
AC_INIT(libferris, 2.0.5)
LIBFERRIS_BETA=4
LIBFERRIS_MINOR=0
LIBFERRIS_MAJOR=2
dnl
dnl /usr/local/src/git/gnulib/gnulib-tool --import strverscmp readlinkat extern-inline
dnl
AC_SUBST(LIBFERRIS_MAJOR)
AC_SUBST(LIBFERRIS_MINOR)
AC_SUBST(LIBFERRIS_BETA)
FERRIS_VERSION=$LIBFERRIS_MAJOR.$LIBFERRIS_MINOR.$LIBFERRIS_BETA
LIBFERRIS_FULLV=$FERRIS_VERSION
AC_SUBST(LIBFERRIS_FULLV)
AC_SUBST(FERRIS_VERSION)
AC_DEFINE_UNQUOTED(FERRIS_VERSION, "$FERRIS_VERSION", [] )
VERSION=$FERRIS_VERSION
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [] )
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(Ferris/Ferris.cpp)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.9 tar-ustar])
AM_MAINTAINER_MODE
cd ${srcdir}; absolute_srcdir=`pwd`; cd -;
on_osx=`uname -a | grep -q -v '^Darwin'; echo $?`
if test x${on_osx} = xyes; then
AC_DEFINE( FERRIS_ON_OSX, 1, [On OSX platform] )
fi
dnl
dnl The rules are that 1.0.x will be stable, and 1.1.x will be development.
dnl I assume to break ABI if not API between 1.0.x and 1.2.x so the major/minor
dnl form an ABI sentinal and the BETA releases are to be ABI compatible for the stable tree.
dnl ABI will probably break for each development snapshot.
dnl
if test x$LIBFERRIS_MAJOR = x0; then
LIBFERRIS_LT_CURRENT=$LIBFERRIS_MINOR
else
LIBFERRIS_LT_CURRENT=$LIBFERRIS_MAJOR$LIBFERRIS_MINOR
fi
LIBFERRIS_LT_REVISION=$LIBFERRIS_BETA
LIBFERRIS_LT_AGE=0
if test x$LIBFERRIS_MINOR = x1 || test x$LIBFERRIS_MINOR = x9; then
echo Development tree...
LIBFERRIS_LT_REVISION=$LIBFERRIS_MINOR$LIBFERRIS_BETA
fi
AC_SUBST(LIBFERRIS_LT_CURRENT)
AC_SUBST(LIBFERRIS_LT_REVISION)
AC_SUBST(LIBFERRIS_LT_AGE)
LIBFERRIS_PLUGIN_LT_LINE=" -version-info $LIBFERRIS_LT_CURRENT:0:0 "
AC_SUBST(LIBFERRIS_PLUGIN_LT_LINE)
LIBFERRIS_EAPLUGIN_LT_LINE=" -version-info $LIBFERRIS_LT_CURRENT:0:0 "
AC_SUBST(LIBFERRIS_EAPLUGIN_LT_LINE)
LIBFERRIS_ASTEXTPLUGIN_LT_LINE=" -version-info $LIBFERRIS_LT_CURRENT:0:0 "
AC_SUBST(LIBFERRIS_ASTEXTPLUGIN_LT_LINE)
LIBFERRIS_CREATIONPLUGIN_LT_LINE=" -version-info $LIBFERRIS_LT_CURRENT:0:0 "
AC_SUBST(LIBFERRIS_CREATIONPLUGIN_LT_LINE)
dnl
dnl This is made throughout, as each text passes it appends its
dnl to-text factory to be statically linked into libferris
dnl
dnl LIBASTEXT_PLUGIN_FACTORY_PREFIX="\$(top_builddir)/plugins/astext"
LIBASTEXT_PLUGIN_FACTORIES_LA=" \$(top_builddir)/factories/astext/libastext_factories.la "
dnl
dnl This is made throughout, as each text passes it appends its
dnl creation factory to be statically linked into libferris
dnl
dnl LIBCREATION_PLUGIN_FACTORY_PREFIX="\$(top_builddir)/plugins/creation"
LIBCREATION_PLUGIN_FACTORIES_LA=" \$(top_builddir)/factories/creation/libcreation_factories.la "
dnl
dnl This is made throughout, as each test passes it appends its
dnl ea factory to be statically linked into libferris
dnl
dnl LIBEAGEN_PLUGIN_FACTORY_PREFIX="\$(top_builddir)/plugins/eagenerators"
LIBEAGEN_PLUGIN_FACTORIES_LA=" \$(top_builddir)/factories/eagenerators/libferriseagenerator_factories.la "
RPM_BUILD_ROOT=`eval echo ${RPM_BUILD_ROOT}`
AC_SUBST(RPM_BUILD_ROOT)
LDFLAGS=" $LDFLAGS -L/usr/local/lib "
dnl libtool versioning
LT_RELEASE=$LIBFERRIS_MAJOR.$LIBFERRIS_MINOR
AC_SUBST(LT_RELEASE)
AC_CANONICAL_HOST
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AM_PROG_GCJ
gl_EARLY
AC_STDC_HEADERS
AC_SYS_LARGEFILE
dnl AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4])
AC_C_RESTRICT
AC_ARG_ENABLE(fastinstall,
[AS_HELP_STRING([--enable-fastinstall],
[dont call AC_DISABLE_FAST_INSTALL (default=yes)])],[],[])
m4_pattern_allow([^AC_DISABLE_FAST_INSTALL$])
if test x$enable_fastinstall = xno; then
echo "disable fast install for inline testing...";
AC_DISABLE_FAST_INSTALL
else
echo "fast install left intact...";
fi
LT_INIT([disable-static])
LT_LANG([C++])
LT_OUTPUT
dnl AC_DISABLE_STATIC
dnl AM_PROG_LIBTOOL
FERRIS_CF_X86=" -fomit-frame-pointer -fno-exceptions -pipe -s -mpentium -mcpu=pentium -ffast-math -fexpensive-optimizations -march=i686 -funroll-all-loops "
FERRIS_CF=" -O3 -DNDEBUG -I/nothing -DG_DISABLE_ASSERT -ffast-math "
FERRIS_LD=""
smartptr_assert=""
###############################################################################
## Debug,profile or production CFLAGS #########################################
###############################################################################
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[compile with -g and -O0 debug information. Invalid smart pointer dereferences will give a backtrace (default=no)])],
[],[])
if test x$enable_debug = xyes; then
echo "setting debug mode to on..."
FERRIS_CF=" -O0 -g -pg -pipe -fno-inline -fno-default-inline "; #-Wall ";
FERRIS_CF=" -O0 -g -pg -pipe -fno-inline ";
smartptr_assert="if( !val ) { ::Ferris::BackTrace(); assert(val); }";
else
echo "setting debug mode to off..."
fi
AC_SUBST( FERRIS_SMARTPTR_ASSERT, $smartptr_assert )
dnl #AC_DEFINE_UNQUOTED(FERRIS_SMARTPTR_CHECKINGPOLICY, $ferris_smartptr_checkingpolicy)
AC_ARG_ENABLE(profile,
[AS_HELP_STRING([--enable-profile], [compile with profile debug information (default=no)])],
[],[])
if test x$enable_profile = xyes; then
echo "setting profile mode to on..."
FERRIS_CF=" -O0 -g -pg -fprofile-arcs -ftest-coverage ";
else
echo "setting profile mode to off..."
fi
AC_ARG_ENABLE(stlport-stlport-nocustomio,
[AS_HELP_STRING([--enable-stlport-nocustomio], [compile with _STLP_NO_CUSTOM_IO where you can (default=yes)])],
[],[enable_stlport_nocustomio=yes])
if test x$enable_stlport_nocustomio = xyes; then
echo setting _STLP_NO_CUSTOM_IO to on...
FERRIS_CF=" $FERRIS_CF -D_STLP_NO_CUSTOM_IO ";
else
echo not using _STLP_NO_CUSTOM_IO...
fi
AC_ARG_ENABLE(vmdebug,
[AS_HELP_STRING([--enable-vmdebug], [compile with extra printouts for VM debug msgs (default=no)])],
[],[])
if test x$enable_vmdebug = xyes; then
echo setting vm debug mode to on...
AC_DEFINE( FERRIS_DEBUG_VM, 1, [Extra debug information on VM system] )
else
echo setting vm debug mode to off...
fi
AC_ARG_ENABLE(resolvedebug,
[AS_HELP_STRING([--enable-resolvedebug], [compile with extra printouts for resolve() debug msgs (default=no)])],
[],[])
if test x$enable_resolvedebug = xyes; then
echo "setting resolve() debug mode to on..."
AC_DEFINE( FERRIS_DEBUG_RESOLVE,1,[Debuging resolve() method] )
else
echo "setting resolve() debug mode to off..."
fi
CONTEXT_PLUGIN_CFLAGS=
COMPILE_SYMBOLS_AS_PUBLIC=
AC_ARG_ENABLE(hiddensymbols,
[AS_HELP_STRING([--enable-hiddensymbols], [use hidden symbols for private APIs (default=no)])],
[],[])
if test x$enable_hiddensymbols = xyes; then
echo setting hidden symbol support...;
# FERRIS_CF=" $FERRIS_CF -DGCC_HASCLASSVISIBILITY -fvisibility=default -fvisibility-inlines-hidden ";
FERRIS_CF=" $FERRIS_CF -DGCC_HASCLASSVISIBILITY -DBUILDING_LIBFERRIS -fvisibility=hidden -fvisibility-inlines-hidden ";
AC_DEFINE(GCC_HASCLASSVISIBILITY,1, [] )
COMPILE_SYMBOLS_AS_PUBLIC=" -DGCC_HASCLASSVISIBILITY -DBUILDING_LIBFERRIS -fvisibility=default "
CONTEXT_PLUGIN_CFLAGS=" -DBUILDING_LIBFERRIS "
fi
AC_SUBST(COMPILE_SYMBOLS_AS_PUBLIC)
AC_SUBST(CONTEXT_PLUGIN_CFLAGS)
AC_ARG_ENABLE(hiddensymbolstests,
[AS_HELP_STRING([--enable-hiddensymbolstests], [compile some test programs using hidden symbols for private APIs (default=no)])],
[],[])
AM_CONDITIONAL(BUILD_HIDDENSYMBOL_TEST, test x$enable_hiddensymbolstests = xyes)
gl_INIT
gl_EXTERN_INLINE
LDADD += lib/libgnu.a
dnl ###############################################################################
dnl ###############################################################################
dnl ###############################################################################
dnl # Build FCA support
dnl ###############################################################################
dnl AC_ARG_ENABLE(fca,
dnl [AS_HELP_STRING([--enable-fca], [build support for performing Formal Concept Analysis (default=no)])],
dnl [],[])
dnl
dnl if test x$enable_fca = xyes; then
dnl echo Building Formal Concept Analysis code...
dnl AC_DEFINE(HAVE_FCA)
dnl AC_DEFINE(BUILD_FCA)
dnl fi
###############################################################################
###############################################################################
###############################################################################
# Test for stlport 4.5
###############################################################################
AM_FERRIS_STLPORT_OPTIONAL( 4.5.0 )
###############################################################################
###############################################################################
###############################################################################
AC_CHECK_FUNCS([posix_fallocate posix_fadvise truncate ftruncate])
###############################################################################
###############################################################################
###############################################################################
# Test for readlinkat(2)
###############################################################################
AC_TRY_LINK([ #include <unistd.h> ],
[
int dirfd = 1;
const char *path;
char *buf;
size_t bufsiz;
int rc = readlinkat( dirfd, path, buf, bufsiz);
],
[
AC_DEFINE(FERRIS_HAVE_READLINKAT, 1, [] )
have_readlinkat=yes;
],
[
have_readlinkat=no;
])
AM_CONDITIONAL(FERRIS_HAVE_READLINKAT, test x"$have_readlinkat" = xyes)
###############################################################################
###############################################################################
###############################################################################
# Test for sqrtl(3)
###############################################################################
AC_TRY_LINK([ #include <math.h> ],
[
long double v = 100;
long double x = sqrtl( v );
],
[
AC_DEFINE(FERRIS_HAVE_SQRTL, 1, [] )
have_sqrtl=yes;
],
[
have_sqrtl=no;
])
AM_CONDITIONAL(FERRIS_HAVE_SQRTL, test x"$have_sqrtl" = xyes)
###############################################################################
###############################################################################
###############################################################################
# Test for xml4c (xerces-c)
###############################################################################
AM_FERRIS_XERCESC3( 3.0.0 )
###############################################################################
###############################################################################
###############################################################################
# Test for xalan
###############################################################################
AM_FERRIS_XALAN( 1.10.0, [], [echo "not building Xalan-C support..."] )
AM_CONDITIONAL(FERRIS_HAVE_XSLTFS_MOUNT_ABILITY, test x"$have_xalan" = xyes, [] )
XSLTFS_MOUNT_CFLAGS=
XSLTFS_MOUNT_LIBS=
AC_SUBST(XSLTFS_MOUNT_CFLAGS)
AC_SUBST(XSLTFS_MOUNT_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for redland RDF library
###############################################################################
dnl package=redland
dnl AC_CHECK_PROG( have_redland, redland-config, yes, no )
dnl if test "$have_redland" = yes; then
dnl REDLAND_LIBS=" `redland-config --libs` `rasqal-config --libs` `raptor-config --libs`"
dnl REDLAND_CFLAGS=" `redland-config --cflags` `rasqal-config --cflags` `rasqal-config --cflags`"
dnl AC_DEFINE(HAVE_REDLAND)
dnl dnl PFX="$LIBEAGEN_PLUGIN_FACTORY_PREFIX"
dnl dnl LIBEAGEN_PLUGIN_FACTORIES_LA=" $LIBEAGEN_PLUGIN_FACTORIES_LA $PFX/redland/libferrisredland_factory.la "
dnl dnl PFX="$LIBCREATION_PLUGIN_FACTORY_PREFIX"
dnl dnl LIBCREATION_PLUGIN_FACTORIES_LA="$LIBCREATION_PLUGIN_FACTORIES_LA $PFX/redland/libcreationredland_factory.la "
dnl else
dnl AC_MSG_ERROR([Fatal Error: The redland RDF library is required... http://www.redland.opensource.ac.uk/])
dnl fi
dnl dnl
dnl dnl -ldb-4.5 -lcurl -lxslt
dnl dnl
dnl AC_ARG_WITH( redland-extra-client-libs,
dnl [ --with-redland-extra-client-libs=extra libraries to link for static redland],
dnl [REDLAND_LIBS="$REDLAND_LIBS $withval "
dnl ])
dnl AM_CONDITIONAL(HAVE_REDLAND, test x"$have_redland" = xyes)
dnl AC_SUBST(REDLAND_LIBS)
dnl AC_SUBST(REDLAND_CFLAGS)
have_redland=no
AM_CONDITIONAL(HAVE_REDLAND, test x"$have_redland" = xyes)
###############################################################################
###############################################################################
###############################################################################
# Test for making adobe XMP support
###############################################################################
have_xmp=no
if test "$have_redland" = yes; then
have_xmp=yes
fi
AM_CONDITIONAL(HAVE_XMP, test x"$have_xmp" = xyes)
AC_SUBST(XMP_LIBS)
AC_SUBST(XMP_CFLAGS)
###############################################################################
## check ssh/fsh shell name ###################################################
###############################################################################
SSHCMD="ssh"
AC_CHECK_PROG( have_fsh, fsh, yes, no )
if test x$have_fsh = xyes; then
SSHCMD="fsh"
fi
AC_ARG_WITH(sshcmd,
[AC_HELP_STRING([--with-sshcmd=ssh],[use ssh/fsh command])],
[SSHCMD="$withval"],[SSHCMD=ssh])
AC_SUBST(SSHCMD)
###############################################################################
###############################################################################
###############################################################################
dnl Checks for libraries.
AC_CHECK_LIB(fam, FAMOpen,,
echo ""
echo "fam 2.6.4+ is needed by ferris"
echo ""
echo "Its best to get fam from your Linux distribution mirror"
echo ""
echo "-- /usr/lib/fam -- "
ls -l /usr/lib/libfam*
echo ""
echo "-- /usr/local/lib/fam -- "
ls -l /usr/local/lib/libfam*
AC_MSG_ERROR([Fatal Error: no libfam found.])
)
AM_FERRIS_FAMPP2(3.5.0)
AC_CHECK_LIB("cap_FIXME_XFS_CONFLICT", cap_clear,
[
AC_DEFINE(FERRIS_HAVE_LIBCAP, 1, [] )
LIBCAP_CFLAGS=" "
LIBCAP_LIBS=" -lcap"
AC_SUBST(LIBCAP_CFLAGS)
AC_SUBST(LIBCAP_LIBS)
], [])
AC_ARG_ENABLE(libz,
[AS_HELP_STRING([--enable-libz],
[enable libz support (default=auto)])],[],[enable_libz=check])
if test x$enable_libz != xno; then
AC_CHECK_LIB("z", zlibVersion,
[
AM_CONDITIONAL(FERRIS_HAVE_LIBZ, test "yes" = yes )
AC_DEFINE(FERRIS_HAVE_LIBZ, 1, [] )
LIBZ_CFLAGS=" "
LIBZ_LIBS=" -lz "
AC_SUBST(LIBZ_CFLAGS)
AC_SUBST(LIBZ_LIBS)
], [
AM_CONDITIONAL(FERRIS_HAVE_LIBZ, test x"no" = xyes)
])
fi
AC_ARG_ENABLE(libbz2,
[AS_HELP_STRING([--enable-libbz2],
[enable libbz2 support (default=auto)])],[],[enable_libbz2=check])
if test x$enable_libbz2 != xno; then
AC_CHECK_LIB("bz2", BZ2_bzCompress,
[
AM_CONDITIONAL(FERRIS_HAVE_BZIP2, test x"yes" = xyes)
AC_DEFINE(FERRIS_HAVE_BZIP2, 1, [] )
BZIP2_CFLAGS=" "
BZIP2_LIBS=" -lbz2 "
AC_SUBST(BZIP2_CFLAGS)
AC_SUBST(BZIP2_LIBS)
], [
AM_CONDITIONAL(FERRIS_HAVE_BZIP2, test x"no" = xyes)
])
fi
AC_CHECK_LIB("uuid", uuid_generate,
[
UUID_LIBS=" -luuid "
AC_SUBST(UUID_LIBS)
], [
AC_MSG_ERROR([Fatal Error: no libuuid (from e2fsprogs-devel) found.])
])
###############################################################################
###############################################################################
###############################################################################
# Test for libtextcat 2.1 or better
###############################################################################
AC_LANG_C
LIBTEXTCAT_CFLAGS=
LIBTEXTCAT_LIBS=
AC_ARG_ENABLE(libtextcat,
[AS_HELP_STRING([--enable-libtextcat],
[enable libtextcat support (default=auto)])],[],[enable_libtextcat=check])
if test x$enable_libtextcat != xno; then
LIBTEXTCAT_CFLAGS=""
LIBTEXTCAT_LIBS="-ltextcat"
CXXFLAGS_cache=$CXXFLAGS
CXXFLAGS=" $LIBTEXTCAT_CFLAGS "
CFLAGS_cache=$CFLAGS
CFLAGS=" $LIBTEXTCAT_CFLAGS "
LDFLAGS_cache=$LDFLAGS
LDFLAGS=" $LIBTEXTCAT_LIBS "
AC_TRY_COMPILE([
#include <textcat.h>
#include <string.h>
],
[
char* buf = "The createfp program allows you to easily create your own document"
"fingerprints. Just feed it an example document on standard input, and"
"store the standard output:";
void* h = textcat_Init( "/etc/libtextcat.conf" );
printf( "Language: %s\n", textcat_Classify(h, buf, strlen(buf)) );
textcat_Done(h);
],
[have_libtextcat=yes],[have_libtextcat=no])
LDFLAGS=$LDFLAGS_cache
CXXFLAGS=$CXXFLAGS_cache
CFLAGS=$CFLAGS_cache
fi
if test x"$have_libtextcat" = xno; then
LIBTEXTCAT_CFLAGS=" "
LIBTEXTCAT_LIBS=" "
echo "libtextcat 2.1+ not found or symlink from /etc/libtextcat.conf to .../langclass/conf.txt"
echo " not found... no text language guessing for you."
else
echo "Found libtextcat 2.1, text language guessing support being built..."
AC_DEFINE(HAVE_LIBTEXTCAT, 1, [] )
fi;
AM_CONDITIONAL(HAVE_LIBTEXTCAT, test x"$have_libtextcat" = xyes)
AC_SUBST(LIBTEXTCAT_CFLAGS)
AC_SUBST(LIBTEXTCAT_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for libsvmlight
###############################################################################
package=svmlight
version=5.0.0
AC_ARG_ENABLE(svmlight,
[AS_HELP_STRING([--enable-svmlight],
[enable svmlight support (default=auto)])],[],[enable_svmlight=check])
if test x$enable_svmlight != xno; then
PKG_CHECK_MODULES(SVMLIGHT, $package >= $version,
[
have_svmlight=yes
AC_DEFINE(HAVE_SVMLIGHT,1, [] )
echo "building agent using detected svmlight..."
],
[
have_svmlight=no
echo "no svmlight library detected (version $version or better). "
echo " src available at http://svmlight.joachims.org/"
])
fi
AM_CONDITIONAL(HAVE_SVMLIGHT, test x"$have_svmlight" = xyes)
AC_SUBST(SVMLIGHT_CFLAGS)
AC_SUBST(SVMLIGHT_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for gstreamer
###############################################################################
package=gstreamer-0.10
version=0.10.13
AC_ARG_ENABLE(gstreamer,
[AS_HELP_STRING([--enable-gstreamer],
[enable gstreamer support (default=auto)])],[],[enable_gstreamer=check])
if test x$enable_gstreamer != xno; then
PKG_CHECK_MODULES(GSTREAMER, [$package >= $version gstreamer-app-0.10],
[
have_gstreamer=yes
AC_DEFINE(HAVE_GSTREAMER,1, [] )
echo "building gstreamer stuff..."
],
[
have_gstreamer=no
echo "no gstreamer library detected (gstreamer-0.10). "
])
fi
AM_CONDITIONAL(HAVE_GSTREAMER, test x"$have_gstreamer" = xyes)
AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for libexif (digital camera metadata and thumbnails)
###############################################################################
package=libexif
version=0.5.12
AC_ARG_ENABLE(libexif,
[AS_HELP_STRING([--enable-libexif],
[enable libexif support (default=auto)])],[],[enable_libexif=check])
if test x$enable_libexif != xno; then
PKG_CHECK_MODULES(LIBEXIF, $package >= $version,
[
have_libexif=yes
AC_DEFINE(HAVE_LIBEXIF,1, [] )
echo "building image metadata and thumbnail support using detected libexif..."
],
[
have_libexif=no
echo "no libexif found. download at http://sourceforge.net/project/showfiles.php?group_id=12272"
])
fi
AM_CONDITIONAL(HAVE_LIBEXIF, test x"$have_libexif" = xyes)
AC_SUBST(LIBEXIF_CFLAGS)
AC_SUBST(LIBEXIF_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for epeg
###############################################################################
AC_ARG_ENABLE(epeg,
[AS_HELP_STRING([--enable-epeg],
[enable epeg support (default=auto)])],[],[enable_epeg=check])
if test x$enable_epeg != xno; then
AC_CHECK_PROG( have_epeg, epeg-config, yes, no )
fi
if test "$have_epeg" = yes; then
EPEG_LIBS=" `epeg-config --libs` "
EPEG_CFLAGS=" `epeg-config --cflags` "
AC_DEFINE(HAVE_EPEG,1, [] )
fi
AM_CONDITIONAL(HAVE_EPEG, test "$have_epeg" = yes)
AC_SUBST(EPEG_LIBS)
AC_SUBST(EPEG_CFLAGS)
###############################################################################
###############################################################################
###############################################################################
# Test for socket++
###############################################################################
AM_FERRIS_SOCKETPP( 1.12.10 )
###############################################################################
###############################################################################
###############################################################################
# Test for openssl
###############################################################################
AC_LANG_CPLUSPLUS
OPENSSL_CFLAGS=""
OPENSSL_LIBS=""
openssl_pkgcfg_modules="openssl"
AC_CHECK_PROG( have_openssl, pkg-config --exists ${openssl_pkgcfg_modules}, yes, no )
if test "$have_openssl" = yes; then
OPENSSL_CFLAGS=" `pkg-config --cflags ${openssl_pkgcfg_modules}` "
OPENSSL_LIBS=" `pkg-config --libs ${openssl_pkgcfg_modules}` "
fi
CXXFLAGS_cache=$CXXFLAGS
CXXFLAGS=" $CXXFLAGS $OPENSSL_CFLAGS "
LDFLAGS_cache=$LDFLAGS
LDFLAGS=" $LDFLAGS $OPENSSL_LIBS "
AC_TRY_LINK([
#include <openssl/ssl.h>
],
[
int fixme;
],
[have_openssl=yes],[have_openssl=no])
LDFLAGS=$LDFLAGS_cache
CXXFLAGS=$CXXFLAGS_cache
if test x"$have_openssl" = xno; then
echo ""
echo "Please install the openssl"
echo "version 0.9.6b or better"
AC_MSG_ERROR([Fatal Error: no openssl found.])
fi;
AM_CONDITIONAL(HAVE_OPENSSL, test "$have_openssl" = yes)
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
AC_DEFINE(HAVE_OPENSSL,1, [] )
###############################################################################
###############################################################################
###############################################################################
# See what will be used for mime type determination
###############################################################################
AC_LANG_CPLUSPLUS
MIMETYPE_ENGINE_CHOSEN=""
MIMETYPE_ENGINE_DESC="none"
CXXFLAGS_cache=$CXXFLAGS
LIBFILE_CFLAGS=""
AC_ARG_WITH(libfile-mime,
AC_HELP_STRING( [--with-libfile-mime=DIR],[use libfile for mimetype determination (default=auto)]),
[
if test x$withval != xno && test x$withval != xyes; then
LIBFILE_CFLAGS="-I$withval/include"
fi
try_libfile_mime=$withval
],
[ try_libfile_mime=check ]
)
CXXFLAGS=" $LIBFILE_CFLAGS "
if test x"$try_libfile_mime" != xno; then
AC_CHECK_LIB("file", libfile_new,
[
MIMETYPE_ENGINE_DESC="libfile"
MIMETYPE_ENGINE_CHOSEN=yes
FERRIS_HAVE_LIBFILE=yes
AC_DEFINE(HAVE_LIBFILE,1, [] )
LIBFILE_LIBS="-lfile"
] , )
fi
AC_SUBST(LIBFILE_CFLAGS)
AC_SUBST(LIBFILE_LIBS)
echo "libfile cflags:$LIBFILE_CFLAGS"
echo "libfile libs:$LIBFILE_LIBS"
CXXFLAGS=$CXXFLAGS_cache
CXXFLAGS_cache=$CXXFLAGS
GNOMEVFS_CFLAGS=""
AC_ARG_WITH(gnome-vfs-mime,
AC_HELP_STRING( [--with-gnome-vfs-mime], [use gnome-vfs2 for mimetype determination (default=auto)]),
[ try_gnome_vfs_mime=$withval ], [ try_gnome_vfs_mime=check ] )
if test x"$try_gnome_vfs_mime" != xno; then
if test x"$FERRIS_HAVE_LIBFILE" = xyes; then
if test x"$try_gnome_vfs_mime" = xyes; then
AC_MSG_ERROR([Asked to build gnome-vfs2 mime determination functions but mimetype engine already selected. You may only have one mimetype engine. Selected engine: $MIMETYPE_ENGINE_DESC])
fi
fi
PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0 gnome-vfs-module-2.0, [ have_gvfs=yes ], [ have_gvfs=no ])
if test "$have_gvfs" = yes; then
echo Building gnome-vfs support functions
MIMETYPE_ENGINE_DESC="gnome-vfs"
MIMETYPE_ENGINE_CHOSEN=yes
FERRIS_HAVE_GNOMEVFS=yes
AC_DEFINE(HAVE_GNOMEVFS, 1, [] )
GNOMEVFS_CFLAGS=" `pkg-config --cflags gnome-vfs-2.0 gnome-vfs-module-2.0` "
GNOMEVFS_LIBS=" `pkg-config --libs gnome-vfs-2.0 gnome-vfs-module-2.0` "
fi
fi
AC_SUBST(GNOMEVFS_CFLAGS)
AC_SUBST(GNOMEVFS_LIBS)
AC_ARG_WITH(kde-mime,
AC_HELP_STRING( [--with-kde-mime], [use KDE4 for mimetype determination (default=auto)]),
[ try_kde_mime=$withval ], [ try_kde_mime=check ] )
if test x"$try_kde_mime" != xno; then
if test x"$MIMETYPE_ENGINE_CHOSEN" = xyes; then
if test x"$try_kde_mime" = xyes; then
AC_MSG_ERROR([Asked to build KDE4 mime determination functions but mimetype engine already selected. You may only have one mimetype engine. Selected engine: $MIMETYPE_ENGINE_DESC ])
fi
fi
echo "checking if KDE4 support stuff should be built..."
AM_FERRIS_KDE( 4.0.0 )
if test x"$have_kde" = xyes; then
echo "Building kde support funtions"
MIMETYPE_ENGINE_DESC="KDE4"
MIMETYPE_ENGINE_CHOSEN=yes
else
echo "KDE not found..."
fi
fi
AM_FERRIS_PLASMA( 4.0.0 )
#AM_FERRIS_KSANE( 0.0.0 )
FERRIS_HAVE_SANE=no
FERRIS_HAVE_KSANE=no
SANE_CFLAGS=""
SANE_LIBS=""
KSANE_CFLAGS=""
KSANE_LIBS=""
AC_MSG_RESULT([compilation of SANE and ksane functions disabled])
AM_FERRIS_QPRINTER( 0.0.0 )
AC_ARG_WITH(efsd-mime,
AC_HELP_STRING( [--with-efsd-mime], [use efsd for mimetype determination (default=auto)]),
[ try_efsd_mime=$withval ], [ try_efsd_mime=check ] )
if test x"$try_efsd_mime" != xno; then
if test x"$MIMETYPE_ENGINE_CHOSEN" = xyes; then
if test x"$try_efsd_mime" = xyes; then
AC_MSG_ERROR([Asked to build efsd mime determination functions but mimetype engine already selected. You may only have one mimetype engine. Selected engine: $MIMETYPE_ENGINE_DESC ])
fi
fi
AC_CHECK_PROG( have_efsd, efsd-config --cflags, yes, no )
if test "$have_efsd" = yes; then
echo Building efsd support functions
MIMETYPE_ENGINE_DESC="efsd"
MIMETYPE_ENGINE_CHOSEN=yes
FERRIS_HAVE_EFSD=yes
AC_DEFINE(HAVE_EFSD, 1, [] )
EFSD_CFLAGS=" `efsd-config --cflags` "
EFSD_LIBS=" `efsd-config --libs ` "
fi
fi
AC_SUBST(EFSD_CFLAGS)
AC_SUBST(EFSD_LIBS)
dnl
dnl Try to find the trusty libmagic library and default to that.
dnl
LIBMAGIC_CFLAGS=
LIBMAGIC_LIBS=
if test x"$MIMETYPE_ENGINE_CHOSEN" = x; then
LIBMAGIC_CFLAGS=" "
LIBMAGIC_LIBS=" -lmagic "
CXXFLAGS_cache=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $LIBMAGIC_CFLAGS"
LDFLAGS_cache=$LDFLAGS
LDFLAGS="$LDFLAGS $LIBMAGIC_LIBS"
AC_TRY_LINK([
#include <magic.h>
],
[
magic_t cookie = magic_open( MAGIC_NONE );
return 0;
],
[have_libmagic=yes], [have_libmagic=no])
LDFLAGS=$LDFLAGS_cache
CXXFLAGS=$CXXFLAGS_cache
if test x"$have_libmagic" = xyes; then
echo Building support for libmagic MIME type detection...
MIMETYPE_ENGINE_DESC="libmagic"
MIMETYPE_ENGINE_CHOSEN=yes
HAVE_LIBMAGIC=yes
AC_DEFINE(HAVE_LIBMAGIC,1, [] )
else
LIBMAGIC_CFLAGS=" "
LIBMAGIC_LIBS=" "
fi
fi
AC_SUBST(LIBMAGIC_CFLAGS)
AC_SUBST(LIBMAGIC_LIBS)
if test x"$MIMETYPE_ENGINE_CHOSEN" = x; then
AC_MSG_ERROR([You must select which mime type engine to use from
efsd, gnome-vfs2, KDE4, libfile or have libmagic installed as default choice.
If you have passed a suitable --with arg to configure then that engine could
not be found or used on your computer. Please see --help for exact arguments
for enabling mime engines.])
fi
echo "chosen engine for mime: $MIMETYPE_ENGINE_DESC..."
AC_LANG_C
AC_DEFINE_UNQUOTED(MIMETYPE_ENGINE_DESC, "$MIMETYPE_ENGINE_DESC", [] )
#
# because the mimetype names for some types may vary depending on
# which mime engine is in use, mimetypes that ferris needs internally
# are defined here.
#
MIMETYPE_DIRECTORY="x-directory/normal";
AC_SUBST(MIMETYPE_DIRECTORY)
AC_DEFINE_UNQUOTED(MIMETYPE_DIRECTORY, "$MIMETYPE_DIRECTORY", [] )
###############################################################################
###############################################################################
###############################################################################
###############################################################################
AM_FERRIS_LOKI( 2.2.0 )
AM_FERRIS_STREAMS( 0.4.0 )
AM_FERRIS_SIGC3( 3.0.0 )
###############################################################################
###############################################################################
###############################################################################
# Check if we should add Signal6<> templates because the current
# sigc++ 1.2 doesn't have it
###############################################################################
AC_DEFINE(SIGCXX_HAS_LESS_THAN_FIVE_SIGNAL_ARGS_AS_MAX,1, [] )
###############################################################################
###############################################################################
###############################################################################
# Test for mysql++ (aka sqlplus)
###############################################################################
package="mysql++"
version=2.1.1
AC_ARG_ENABLE(mysqlpp,
[AS_HELP_STRING([--enable-mysqlpp],
[enable mysqlpp support (default=auto)])],[],[enable_mysqlpp=check])
if test x$enable_mysqlpp != xno; then
PKG_CHECK_MODULES(SQLPLUS, $package >= $version,
[
have_sqlplus=yes
],
[
SQLPLUS_CFLAGS="-I/usr/include/mysql++ -I/usr/include/mysql "
SQLPLUS_LIBS="-lmysqlpp"
AC_LANG_CPLUSPLUS
CXXFLAGS_cache=$CXXFLAGS
CXXFLAGS=" $CXXFLAGS $SQLPLUS_CFLAGS "
LDFLAGS_cache=$LDFLAGS
LDFLAGS=" $LDFLAGS $SQLPLUS_LIBS "
AC_TRY_RUN([
#include <mysql++.h>
int main( int, char** ) {
if( MYSQLPP_LIB_VERSION < MYSQLPP_VERSION(2,1,1) )
exit(1);
return 0;
}
],
[have_sqlplus=yes],[have_sqlplus=no])
LDFLAGS=$LDFLAGS_cache
CXXFLAGS=$CXXFLAGS_cache
AC_LANG_C
])
fi
if test x"$have_sqlplus" = xyes; then
have_sqlplus=yes
AC_DEFINE(HAVE_SQLPLUS, 1, [] )
AC_DEFINE(FERRIS_HAVE_SQLPLUS, 1, [] )
echo "$package library detected and used..."
else
have_sqlplus=no
echo "no $package library detected (version $version or better). "
SQLPLUS_CFLAGS=
SQLPLUS_LIBS=
fi
AM_CONDITIONAL(HAVE_SQLPLUS, test x"$have_sqlplus" = xyes)
AC_SUBST(SQLPLUS_CFLAGS)
AC_SUBST(SQLPLUS_LIBS)
###############################################################################
###############################################################################
###############################################################################
# Test for DTL ODBC wrapper
###############################################################################
TESTING_FEATURE="mount ODBC using DTL";
AM_FERRIS_DTL( 3.6.2,
[ echo "Adding ability to: $TESTING_FEATURE ..."; ],
[ echo "Not adding ability to: $TESTING_FEATURE ..."; ] )
###############################################################################
###############################################################################
###############################################################################
# Test for libpqxx library
###############################################################################
AM_FERRIS_PQXX( 2.4.3,