-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
1167 lines (1039 loc) · 28.4 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
######################################################################
# configure.in September 2000
# Horms <[email protected]>
#
# perdition
# Mail retrieval proxy server
# Copyright (C) 1999-2005 Horms
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
######################################################################
AC_INIT(perdition, 2.2)
AC_CONFIG_SRCDIR(makegdbm/makegdbm.c)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [[#include <sys/socket.h>]])
# Checks for libraries.
AC_CHECK_LIB(dl, dlopen, [ dl_lib="-ldl" ], [ dl_lib="" ])
AC_CHECK_LIB(nsl, yp_match, true, true)
AC_CHECK_LIB(socket, socket, [ socket_lib="-lsocket" ], [ socket_lib="" ])
AC_CHECK_LIB(nsl, gethostbyname, [ nsl_lib="-lnsl" ], [ nsl_lib="" ])
AC_CHECK_LIB(crypt, crypt, [ crypt_lib="-lcrypt" ], [ crypt_lib="" ])
AC_CHECK_LIB(
popt,
poptGetContext,
true,
AC_MSG_ERROR(
""
"**********************************************************************"
"* perdition requires the popt options parsing library available from"
"* ftp://ftp.rpm.org/pub/rpm/ and mirrors."
"**********************************************************************"
) ;\
)
PKG_CHECK_MODULES(VANESSA_LOGGER,vanessa-logger >= 0.0.10)
AC_CHECK_LIB(
vanessa_adt,
vanessa_queue_create,
true,
AC_MSG_ERROR(
""
"**********************************************************************"
"* perdition requires the vanessa_adt abstract data type library"
"* available from"
"* http://horms.net/projects/vanessa/download/vanessa_adt/ and mirrors."
"**********************************************************************"
),
-lvanessa_logger
)
PKG_CHECK_MODULES(VANESSA_SOCKET,vanessa-socket >= 0.0.12)
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(sys/param.h)
######################################################################
# Libidn
AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
[Support IDN (needs GNU Libidn)]),
libidn=$withval, libidn=yes)
if test "$libidn" != "no" ; then
PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0,
[libidn=yes], [libidn=no])
fi
if test "$libidn" == "yes" ; then
AC_DEFINE(WITH_LIBIDN, 1, [Define to 1 if you want Libidn.])
else
AC_MSG_WARN(
""
"************************************************************"
"* Could not find libidn."
"* - SSL may not veify certificates with non-ASCII common names"
"* or subjectAltName dNSName entries correctly."
"* - Managesieve may not handle non-ascii userames correctly"
"************************************************************"
)
fi
######################################################################
# OpenSSL
AC_MSG_CHECKING([if SSL/TLS support has been disabled]);
AC_ARG_ENABLE(
ssl,
[ --disable-ssl DO not compile with SSL/TLS support. ],
[
if test "$enable_ssl" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_ssl="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_ssl" = "yes"; then
AC_ARG_WITH(
ssl-includes,
[ --with-ssl-includes=DIR
OpenSSL include files are in DIR. ],
[ ssl_includepath="$withval" ],
[
AC_MSG_CHECKING(OpenSSL include path)
for ssl_includepath in /usr/openssl/include /usr/local/openssl/include \
/usr/local/include/openssl /usr/local/ssl/include \
/usr/include /usr/local/include; do
if test -f "${ssl_includepath}/openssl/ssl.h"; then
break
fi
done
AC_MSG_RESULT($ssl_includepath)
]
)
ssl_includes="-I$ssl_includepath"
AC_ARG_WITH(
ssl-libraries,
[ --with-ssl-libraries=DIR
OpenSSL library files are in DIR. ],
[ ssl_libpath="$withval" ],
[
AC_MSG_CHECKING(OpenSSL library path)
for ssl_libpath in /usr/openssl/lib64 /usr/openssl/lib \
/usr/local/openssl/lib64 /usr/local/openssl/lib \
/usr/lib64/openssl /usr/lib/openssl \
/usr/local/lib64/openssl /usr/local/lib/openssl \
/usr/local/ssl/lib64 /usr/local/ssl/lib \
/usr/lib64 /usr/lib \
/usr/local/lib64 /usr/local/lib; do
if test -f "${ssl_libpath}/libssl.a" -o -f "${ssl_libpath}/libssl.so"
then
break
fi
done
AC_MSG_RESULT($ssl_libpath)
]
)
ssl_lib="-L$ssl_libpath -lssl -lcrypto"
fi
if test "$enable_ssl" = "yes"; then
AC_CHECK_FILE(
$ssl_includepath/openssl/ssl.h,
true,
[
AC_MSG_WARN(
""
"**********************************************************************"
"* SSL/TLS will not be built"
"**********************************************************************"
) ;\
sleep 5
enable_ssl="no";
]
)
fi
if test "$enable_ssl" = "yes"; then
AC_CHECK_LIB(
ssl,
ERR_error_string,
true,
[
AC_MSG_WARN(
""
"**********************************************************************"
"* SSL/TLS will not be built"
"**********************************************************************"
) ;\
sleep 5
enable_ssl="no";
],
$ssl_lib
)
fi
if test "$enable_ssl" = "yes"; then
AC_DEFINE(WITH_SSL_SUPPORT, 1, Compile with SSL/TLS support)
AC_CHECK_LIB(ssl, SSL_CTX_set_min_proto_version)
AC_CHECK_DECLS([SSL_CTX_set_min_proto_version], [], [], [[#include <openssl/ssl.h>]])
AC_CHECK_DECLS([SSL_CTX_set_max_proto_version], [], [], [[#include <openssl/ssl.h>]])
else
ssl_lib=""
ssl_includes=""
fi
AC_SUBST(ssl_lib)
AC_SUBST(ssl_includes)
AM_CONDITIONAL(SSL_BUILD, test "${enable_ssl}" = "yes")
######################################################################
# MySQL
AC_MSG_CHECKING([if MySQL support has been disabled]);
AC_ARG_ENABLE(
mysql,
[ --disable-mysql DO not compile with MySQL support. ],
[
if test "$enable_mysql" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_mysql="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_mysql" = "yes"; then
AC_ARG_WITH(
mysql-includes,
[ --with-mysql-includes=DIR
MySQL include files are in DIR. ],
[ mysql_includepath="$withval" ],
[
AC_MSG_CHECKING(MySQL include path)
for mysql_includepath in /usr/mysql/include /usr/local/mysql/include \
/usr/include/mysql /usr/local/include/mysql \
/usr/local/mysql/include/mysql /usr/include /usr/local/include; do
if test -f "${mysql_includepath}/mysql.h"; then
break
fi
done
AC_MSG_RESULT($mysql_includepath)
]
)
mysql_includes="-I$mysql_includepath"
fi
if test "$enable_mysql" = "yes"; then
AC_ARG_WITH(
mysql-libraries,
[ --with-mysql-libraries=DIR
MySQL library files are in DIR. ],
[ mysql_libpath="$withval" ],
[
AC_MSG_CHECKING(MySQL include path)
for mysql_libpath in /usr/mysql/lib64 /usr/mysql/lib \
/usr/local/mysql/lib64 /usr/local/mysql/lib \
/usr/lib64/mysql /usr/lib/mysql \
/usr/local/lib64/mysql /usr/local/lib/mysql \
/usr/local/mysql/lib64/mysql /usr/local/mysql/lib/mysql \
/usr/lib64 /usr/lib \
/usr/local/lib64 /usr/local/lib; do
if test -f "${mysql_libpath}/libmysqlclient.a" \
-o -f "${mysql_libpath}/libmysqlclient.so"; then
break
fi
done
AC_MSG_RESULT($mysql_libpath)
]
)
mysql_libs="-lvanessa_logger -lvanessa_adt -L$mysql_libpath -lmysqlclient"
fi
if test "$enable_mysql" = "yes"; then
AC_CHECK_FILE(
$mysql_includepath/mysql.h, ,
[
enable_mysq="no"
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_mysql will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
if test "$enable_mysql" = "yes"; then
AC_CHECK_LIB(
mysqlclient,
mysql_real_connect,
true,
[
enable_mysql="no"
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_mysql will not be built: $mysql_libraries"
"**********************************************************************"
) ;\
sleep 5
],
$mysql_libs
)
fi
AM_CONDITIONAL(MYSQL_BUILD, test "${enable_mysql}" = "yes")
######################################################################
# ODBC
AC_MSG_CHECKING([if ODBC support has been disabled]);
AC_ARG_ENABLE(
odbc,
[ --disable-odbc DO not compile with ODBC support. ],
[
if test "$enable_odbc" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_odbc="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_odbc" = "yes"; then
AC_ARG_WITH(
odbc-includes,
[ --with-odbc-includes=DIR
ODBC include files are in DIR. ],
[ odbc_includepath="$withval" ],
[
AC_MSG_CHECKING(ODBC include path)
for odbc_includepath in /usr/odbc/include /usr/local/odbc/include \
/usr/include/odbc /usr/local/include/odbc \
/usr/local/odbc/include/odbc /usr/include /usr/local/include ; do
if test -f "${odbc_includepath}/sql.h" ; then
break
fi
done
AC_MSG_RESULT($odbc_includepath)
]
)
odbc_includes="-I$odbc_includepath"
fi
if test "$enable_odbc" = "yes"; then
AC_ARG_WITH(
odbc-libraries,
[ --with-odbc-libraries=DIR
ODBC library files are in DIR. ],
[ odbc_libpath="$withval" ],
[
AC_MSG_CHECKING(ODBC include path)
for odbc_libpath in /usr/odbc/lib64 /usr/odbc/lib \
/usr/local/odbc/lib64 /usr/local/odbc/lib \
/usr/lib64/odbc /usr/lib/odbc \
/usr/local/lib64/odbc /usr/local/lib/odbc \
/usr/local/odbc/lib64/odbc /usr/local/odbc/lib/odbc \
/usr/lib64 /usr/lib \
/usr/local/lib64 /usr/local/lib ; do
if test -f "${odbc_libpath}/libodbc.so" ; then
break
fi
done
AC_MSG_RESULT($odbc_libpath)
]
)
odbc_libs="-lvanessa_logger -lvanessa_adt -L$odbc_libpath -lodbc"
fi
if test "$enable_odbc" = "yes"; then
AC_CHECK_FILES(
$odbc_includepath/sql.h $odbc_includepath/sqlext.h $odbc_includepath/sqltypes.h,
AC_DEFINE(WITH_UNIX_ODBC, 1, Use unixodbc ODBC Manager),
enable_odbc="no"
)
fi
if test "$enable_odbc" = "yes"; then
AC_CHECK_LIB(odbc, SQLSetEnvAttr, true,
[ enable_odbc="no" ], $odbc_libs)
fi
if test "$enable_odbc" != "yes"; then
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_odbc will not be built: $odbc_libraries"
"* There a many ODBC Managers available including UnixODBC"
"* which is available from www.unixodbc.org"
"**********************************************************************"
) ;\
sleep 5
fi
AM_CONDITIONAL(ODBC_BUILD, test "${enable_odbc}" = "yes")
######################################################################
# PostgreSQL
AC_MSG_CHECKING([if PostgreSQL support has been disabled]);
AC_ARG_ENABLE(
pg,
[ --disable-pg DO not compile with PostgreSQL support. ],
[
if test "$enable_pg" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_pg="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_pg" = "yes"; then
AC_CHECK_PROGS(PG_CONFIG, pg_config)
if test "X$PG_CONFIG" = "X"; then
enable_pg="no"
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_postgresql will not be built"
"**********************************************************************"
)
sleep 5
fi
fi
AM_CONDITIONAL(PG_BUILD, test "${enable_pg}" = "yes")
if test "$enable_pg" = "yes"; then
pg_libdir=-L`$PG_CONFIG --libdir`
AC_SUBST(pg_libdir)
pg_includedir=-I`$PG_CONFIG --includedir`
AC_SUBST(pg_includedir)
fi
######################################################################
# CDB
AC_MSG_CHECKING([if CDB support has been disabled]);
AC_ARG_ENABLE(
cdb,
[ --disable-cdb DO not compile with CDB support. ],
[
if test "$enable_cdb" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_cdb="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_cdb" = "yes"; then
AC_CHECK_HEADERS(
cdb.h, ,
[
enable_cdb="no",
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_cdb will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
if test "$enable_cdb" = "yes"; then
AC_CHECK_LIB(
cdb,
cdb_bread,
true,
[
enable_cdb="no",
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_cdb will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
AM_CONDITIONAL(CDB_BUILD, test "${enable_cdb}" = "yes")
######################################################################
# GDBM
AC_MSG_CHECKING([if GDBM support has been disabled]);
AC_ARG_ENABLE(
gdbm,
[ --disable-gdbm DO not compile with GDBM support. ],
[
if test "$enable_gdbm" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_gdbm="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_gdbm" = "yes"; then
AC_CHECK_HEADERS(
gdbm.h, ,
[
enable_gdbm="no",
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_gdbm and makegdbm will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
if test "$enable_gdbm" = "yes"; then
AC_CHECK_LIB(
gdbm,
gdbm_fetch,
true,
[
enable_gdbm="no",
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_gdbm and makegdbm will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
AM_CONDITIONAL(GDBM_BUILD, test "${enable_gdbm}" = "yes")
######################################################################
# BerkeleyDB
AC_MSG_CHECKING([if Berkeley DB support has been disabled]);
AC_ARG_ENABLE(
bdb,
[ --disable-bdb DO not compile with Berkeley DB support. ],
[
if test "$enable_bdb" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_bdb="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_bdb" = "yes"; then
AC_CHECK_HEADERS(
db.h, ,
[
enable_bdb="no"
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_bdb and makebdb will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
if test "$enable_bdb" = "yes"; then
AC_CHECK_LIB(
db,
db_create, ,
[
enable_bdb="no"
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_bdb and makebdb will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
AM_CONDITIONAL(BDB_BUILD, test "${enable_bdb}" = "yes")
if test "$enable_bdb" = "yes"; then
AC_MSG_CHECKING([If BDB db->open() takes 7 arguments]);
AC_TRY_COMPILE(
[ #include <db.h> ],
[ DB *dbp;
db_create(&dbp, NULL, 0);
dbp->open(NULL, NULL, NULL, NULL, 0, 0, 0); ],
AC_MSG_RESULT("yes")
AC_DEFINE(HAVE_BDB_OPEN_7, 1,
[BDB db->open() takes 7 arguments]),
AC_MSG_RESULT("no"))
fi
######################################################################
# NIS
AC_MSG_CHECKING([if NIS support has been disabled]);
AC_ARG_ENABLE(
nis,
[ --disable-nis DO not compile with NIS support. ],
[
if test "$enable_nis" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_nis="yes";
AC_MSG_RESULT("no")
]
)
AM_CONDITIONAL(NIS_BUILD, test "${enable_nis}" = "yes")
######################################################################
# Posix Regular Expression
AC_MSG_CHECKING([if Posix Regular Expression support has been disabled]);
AC_ARG_ENABLE(
posix_regex,
[ --disable-posix-regex DO not compile with Posix Regular Expression support.],
[
if test "$enable_posix_regex" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_posix_regex="yes";
AC_MSG_RESULT("no")
]
)
AM_CONDITIONAL(POSIX_REGEX_BUILD, test "${enable_posix_regex}" = "yes")
######################################################################
# Open LDAP
AC_MSG_CHECKING([if LDAP support has been disabled]);
AC_ARG_ENABLE(
ldap,
[ --disable-ldap DO not compile with LDAP support. ],
[
if test "$enable_ldap" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_ldap="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_ldap" = "yes"; then
AC_ARG_WITH(
ldap-includes,
[ --with-ldap-includes=DIR
Open LDAP include files are in DIR. ],
[
if test "$withval" = "no"; then
enable_ldap="no";
else
ldap_includepath="$withval"
fi
],
[
AC_MSG_CHECKING(OpenLDAP include path)
for ldap_includepath in /usr/openldap/include /usr/local/openldap/include \
/usr/include/openldap /usr/local/include/openldap \
/usr/include /usr/local/include; do
if test -f "${ldap_includepath}/ldap.h"; then
break
fi
done
AC_MSG_RESULT($ldap_includepath)
]
)
ldap_includes="-I$ldap_includepath"
fi
if test "$enable_ldap" = "yes"; then
AC_ARG_WITH(
ldap-libraries,
[ --with-ldap-libraries=DIR
Open LDAP library files are in DIR. ],
[
if test "$withval" = "no"; then
enable_ldap="no";
else
ldap_libpath="$withval"
fi
],
[
AC_MSG_CHECKING(OpenLDAP library path)
for ldap_libpath in /usr/openldap/lib64 /usr/openldap/lib \
/usr/local/openldap/lib64 /usr/local/openldap/lib \
/usr/lib64/openldap /usr/lib/openldap \
/usr/local/lib64/openldap /usr/local/lib/openldap \
/usr/lib64 /usr/lib \
/usr/local/lib64 /usr/local/lib; do
if test -f "${ldap_libpath}/libldap.a" \
-o -f "${ldap_libpath}/libldap.so"; then
break
fi
done
AC_MSG_RESULT($ldap_libpath)
]
)
ldap_libs="-L$ldap_libpath -lldap -llber"
fi
if test "$enable_ldap" = "yes"; then
AC_CHECK_FILE($ldap_includepath/ldap.h, , [ enable_ldap="no" ])
fi
if test "$enable_ldap" = "yes"; then
AC_CHECK_LIB(ldap, ldap_url_parse, true,
[ enable_ldap="no" ], $ldap_libs)
fi
if test "$enable_ldap" = "yes"; then
AC_CHECK_MEMBER(LDAPURLDesc.lud_exts,
AC_DEFINE(WITH_LDAP_LUD_EXTS, 1, Compile with LDAP lud_exts),
AC_MSG_WARN(
""
"************************************************************"
"* Password and Username support will not be built in the"
"* LDAP module. For Password and Username support compile"
"* openldap2. Available from openldap.org"
"************************************************************"
),
[ #include <stdlib.h>
#include <lber.h>
#include <ldap.h> ])
fi
if test "$enable_ldap" = "yes"; then
AC_CHECK_LIB(ldap, ldap_set_option,
AC_DEFINE(WITH_LDAP_SET_OPTION, 1, Compile with LDAP set_option),
AC_MSG_WARN(
""
"************************************************************"
"* Cannot expicitly set network timeout or ldap protocol"
"* version. For ldap_set_option support please use openlap2."
"* Available from openldap.org"
"************************************************************"
),)
fi
if test "$enable_ldap" = "yes"; then
AC_ARG_WITH(
ldap-schema-directory,
[ --with-ldap-schema-directory=DIR
Open LDAP schema files are in DIR. ],
[
if test "$withval" = "no"; then
ldap_schemadir="";
else
ldap_schemadir="$withval"
fi
],
[
AC_MSG_CHECKING(OpenLDAP schema path)
for ldap_schemadir in /etc/openldap/schema /etc/ldap/schema \
/usr/local/openldap/etc/schema; do
if test -f "${ldap_schemadir}/openldap.schema"; then
break
fi
ldap_schemadir="Not found"
done
AC_MSG_RESULT($ldap_schemadir)
if test "$ldap_schemadir" = "Not found"; then
AC_MSG_WARN(
""
"************************************************************"
"* Could not find OpenLDAP schema directory."
"* perdition.schema will not be installed"
"************************************************************"
)
ldap_schemadir=""
fi
]
)
fi
AM_CONDITIONAL(LDAP_SCHEMA, test "${ldap_schemadir}X" != "X")
if test "$enable_ldap" != "yes"; then
AC_MSG_WARN(
""
"**********************************************************************"
"* perditiondb_ldap will not be built"
"**********************************************************************"
) ;\
sleep 5;
fi
AM_CONDITIONAL(LDAP_BUILD, test "${enable_ldap}" = "yes")
######################################################################
# Daemon Map
AC_MSG_CHECKING([if deamon map has been disabled]);
AC_ARG_ENABLE(
daemon_map,
[ --disable-daemon-map DO not compile with daemon map. ],
[
if test "$enable_daemon_map" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_daemon_map="yes";
AC_MSG_RESULT("no")
]
)
AM_CONDITIONAL(DEAMON_MAP_BUILD, test "${enable_daemon_map}" = "yes")
######################################################################
# PAM
AC_MSG_CHECKING([if PAM support has been disabled]);
AC_ARG_ENABLE(
pam,
[ --disable-pam DO not compile with pam support. ],
[
if test "$enable_pam" = "no"; then
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
fi
],
[
enable_pam="yes";
AC_MSG_RESULT("no")
]
)
if test "$enable_pam" == "yes"; then
AC_CHECK_HEADERS(
security/pam_appl.h,
true,
[
enable_pam=no
AC_MSG_WARN(
""
"**********************************************************************"
"* pam support will not be built"
"**********************************************************************"
) ;\
sleep 5
]
)
fi
if test "$enable_pam" == "yes"; then
AC_CHECK_HEADERS(security/pam_misc.h)
AC_CHECK_LIB(
pam,
pam_authenticate,
true,
[
enable_pam=no
AC_MSG_WARN(
""
"**********************************************************************"
"* pam support will not be built"
"**********************************************************************"
) ;\
sleep 5
],
$dl_lib
)
fi
if test "$enable_pam" == "yes"; then
pam_lib="-lpam"
AC_DEFINE(WITH_PAM_SUPPORT, 1, Compile with PAM support)
else
pam_lib=""
fi
AM_CONDITIONAL(PAM_BUILD, test "$enable_pam" = "yes")
posix_regex_libs="-lvanessa_logger -lvanessa_adt"
######################################################################
# User and Group to run as
AC_ARG_WITH(
user,
[ --with-user=USER Run perdition as USER. [default=nobody] ],
[ perdition_user="$withval" ],
[ perdition_user="nobody" ],
)
AC_DEFINE_UNQUOTED(WITH_USER, "$perdition_user", User to run perdition as )
AC_ARG_WITH(
group,
[ --with-group=GROUP Run perdition as GROUP. [default=nobody] ],
[ perdition_group="$withval" ],
[ perdition_group="nobody" ],
)
AC_DEFINE_UNQUOTED(WITH_GROUP, "$perdition_group", Group to run perdition as )
######################################################################
# Dmalloc debugging
dmalloc_lib=""
AC_ARG_WITH(
dmalloc,
[ --with-dmalloc Compile with dmalloc debugging ],
[ dmalloc_lib="-ldmalloc"
AC_SUBST(dmalloc_lib)
AC_DEFINE(WITH_DMALLOC, 1, Should we use DMALLOC) ],
)
AC_MSG_CHECKING([if ldap (latex) documentation is disabled]);
AC_ARG_ENABLE(
ldap_doc,
[ --enable-ldap-doc Create ldap (latex) documentation. ],
[
if test "$enable_ldap_doc" = "no"; then
AC_MSG_RESULT("no")
else
AC_MSG_RESULT("yes")