-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.in
1894 lines (1727 loc) · 54.2 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kdebase, "2.2.2") dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
AC_PATH_KDE
#MIN_CONFIG
dnl PAM, shadow passwords, libcrypt
KDE_PASSWDLIBS
DEF_PAM_SERVICE(kdm, kdm, KDM)
DEF_PAM_SERVICE(kcp, kcheckpass, KCHECKPASS)
DEF_PAM_SERVICE(kss, kscreensaver, KSCREENSAVER)
dnl Image readers/writers
KDE_CHECK_KIMGIO
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h crypt.h \
sys/select.h sys/ioctl.h sys/stropts.h stropts.h termio.h termios.h sys/termios.h \
lastlog.h sys/socket.h sys/sockio.h krb5/krb5.h rpc/rpc.h rpc/key_prot.h \
sys/m_wait.h ncurses.h paths.h login_cap.h syslog.h \
sys/wait.h sys/ucred.h sys/mount.h floatingpoint.h fstab.h mntent.h \
Alib.h libutil.h util.h time.h limits.h vfork.h string.h float.h \
math.h nan.h ieeefp.h
)
dnl Checks for Alib on HP-UX (added by deller, Apr 29 1999)
AC_CHECK_LIB(Alib, main, [LIBALIB="-lAlib"]) dnl HP-UX network audio server
AC_SUBST(LIBALIB)
dnl Check for ossaudio on NetBSD
AC_CHECK_LIB(ossaudio, main, [LIBOSSAUDIO="-lossaudio"])
AC_SUBST(LIBOSSAUDIO)
dnl Check for AIX stuff
AC_CHECK_LIB(cfg, main, [LIBCFG="-lcfg"]) dnl for AIX
AC_SUBST(LIBCFG)
AC_CHECK_LIB(odm, main, [LIBODM="-lodm"]) dnl for AIX
AC_SUBST(LIBODM)
dnl SMB checks moved to their own configure.in.in
kde_have_setupterm=yes
AC_CHECK_LIB(curses, setupterm, [LIBCURSES=-lcurses],
AC_CHECK_LIB(ncurses, setupterm, [LIBCURSES=-lncurses],
AC_CHECK_LIB(mytinfo, setupterm, [LIBCURSES=-lmytinfo],
kde_have_setupterm=no)))
AC_SUBST(LIBCURSES)
if test "$kde_have_setupterm" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SETUPTERM, 1, [Define if you have setupterm in -l(n)curses])
fi
kde_have_utempter=yes
AC_CHECK_LIB(utempter, addToUtmp, [LIBUTEMPTER=-lutempter], kde_have_utempter=no)
AC_SUBST(LIBUTEMPTER)
if test "$kde_have_utempter" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_UTEMPTER, 1, [Define if you have the utempter helper for utmp managment])
fi
AC_CHECK_FUNC(res_init, ,
AC_CHECK_LIB(resolv, res_init, [LIBRESOLV="-lresolv"], , $LIBSOCKET)) dnl for Sun
AC_SUBST(LIBRESOLV)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_LANG_CPLUSPLUS
AC_HEADER_TIME
dnl check if the compiler has bool
AC_CHECK_BOOL
AC_LANG_C
AC_C_LONG_DOUBLE
AC_TYPE_GETGROUPS
dnl for libsmb
AC_CHECK_SIZEOF(char,1)
AC_CHECK_SIZEOF(short,2)
AC_CHECK_SIZEOF(int,4)
AC_CHECK_SIZEOF(long,4)
AC_C_BIGENDIAN
AC_CHECK_FUNCS(socket powl sqrtl strdup getdtablesize vsnprintf setpgid nice seteuid snprintf vsyslog initgroups setgroups getgroups grantpt pw_encrypt setpriority getpt unlockpt ptsname setenv unsetenv waitpid mkstemp openpty)
AC_CHECK_GETDOMAINNAME
AC_CHECK_GETHOSTNAME
AC_CHECK_USLEEP
AC_CHECK_RANDOM
AC_CHECK_S_ISSOCK
AC_CHECK_KDEMAXPATHLEN
dnl Perform program name transformation
AC_ARG_PROGRAM
AC_MSG_CHECKING([if it's safe to enable UTMP])
case "$host_os" in
linux*) utmp_support=yes;
;;
freebsd*) utmp_support=yes;
;;
*) utmp_support=no;
esac
AC_MSG_RESULT($utmp_support)
if test "$utmp_support" = yes; then
AC_DEFINE_UNQUOTED(UTMP_SUPPORT, 1, [Define if you want to use utmp entries])
fi
AC_CHECK_UTMP_FILE
dnl Checks for Solaris' libkstat
kde_have_kstat=yes
AC_CHECK_LIB(kstat, kstat_open, [LIBKSTAT=-lkstat], kde_have_kstat=no)
AC_SUBST(LIBKSTAT)
if test "$kde_have_kstat" = "yes"; then
AC_DEFINE(HAVE_KSTAT, 1, [Defines if you have Solaris' libkstat])
fi
dnl Checks for libdevinfo (Solaris 7 and later)
dnl since the library is available on earlier Solaris releases (but
dnl with a completely different and undocumented interface),
dnl we have to verfy that the required header is present as well
AC_CHECK_HEADER(libdevinfo.h,
kde_have_libdevinfo_h=yes,
kde_have_libdevinfo_h=no)
if test "$kde_have_libdevinfo_h" = "yes"; then
kde_have_libdevinfo_lib=yes
AC_CHECK_LIB(devinfo, di_init, [LIBDEVINFO=-ldevinfo], kde_have_libdevinfo_lib=no)
if test "$kde_have_libdevinfo_lib" = "yes"; then
AC_DEFINE(HAVE_LIBDEVINFO_H, 1, [Defines if you have libdevinfo of Solaris 7 or later])
AC_SUBST(LIBDEVINFO)
fi
fi
dnl Mico, mini STL, python checks
dnl KDE_CHECK_MICO()
dnl ----- Checks for X11 extensions -----
ac_save_ldflags="$LDFLAGS"
LDFLAGS="$X_LDFLAGS"
dnl --- XTEST check
XTESTLIB=
KDE_CHECK_HEADER(X11/extensions/XTest.h,
[AC_CHECK_LIB( Xtst, XTestFakeKeyEvent,
[AC_DEFINE(HAVE_XTEST, 1, [Define if you have the XTest extension])
XTESTLIB=-lXtst],
, [ -lXext -lX11 $X_PRE_LIBS ])
])
AC_SUBST(XTESTLIB)
dnl --- XKB check
KDE_CHECK_HEADER(X11/XKBlib.h,
[AC_CHECK_LIB( X11, XkbLockModifiers,
[AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension])],
, [ -lXext -lX11 $X_PRE_LIBS ])
AC_CHECK_LIB( X11, XkbSetPerClientControls,
[AC_DEFINE(HAVE_XKBSETPERCLIENTCONTROLS, 1, [Define if you have XkbSetPerClientControls])],
, [ -lXext -lX11 $X_PRE_LIBS ])
])
LDFLAGS="$ac_save_ldflags"
dnl ----- end of X11 extension checks -----
CXXFLAGS="$CXXFLAGS -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST"
if test -z "$RUN_KAPPFINDER"; then
RUN_KAPPFINDER="yes"
fi
AC_SUBST(RUN_KAPPFINDER)
ACCESS_SUBDIR=
KDE_CHECK_HEADER(X11/extensions/XKBstr.h, ACCESS_SUBDIR=access)
AC_SUBST(ACCESS_SUBDIR)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
kde_save_CXXFLAGS="$CXXFLAGS"
LIBS="$LIBS $all_libraries $USER_LDFLAGS $LIB_QT"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES -DQT_XFT"
AC_MSG_CHECKING(for anti-aliasing support in Qt)
AC_CACHE_VAL(ac_cv_have_aa,
[
AC_TRY_COMPILE([#include <qt_x11.h>],
[int x=qt_use_xft();],
[ac_cv_have_aa="yes"],
[ac_cv_have_aa="no"])
])
AC_MSG_RESULT($ac_cv_have_aa)
if test "$ac_cv_have_aa" = "yes"; then
AC_DEFINE(HAVE_AA, 1, [Define if your Qt supports anti-aliasing])
fi
LIBS="$kde_save_LIBS"
CXXFLAGS="$kde_save_CXXFLAGS"
AC_LANG_RESTORE
dnl ------------------------------------------------------------------------
dnl Try to find the SSL headers and libraries.
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_SSL,
[
LIBSSL="-lssl -lcrypto"
AC_MSG_CHECKING([for OpenSSL])
ac_ssl_includes=NO ac_ssl_libraries=NO
ssl_libraries=""
ssl_includes=""
AC_ARG_WITH(ssl-dir,
[ --with-ssl-dir=DIR where the root of OpenSSL is installed],
[ ac_ssl_includes="$withval"/include
ac_ssl_libraries="$withval"/lib
])
want_ssl=yes
AC_ARG_WITH(ssl,
[ --without-ssl disable SSL checks],
[want_ssl=$withval])
if test $want_ssl = yes; then
AC_CACHE_VAL(ac_cv_have_ssl,
[#try to guess OpenSSL locations
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include"
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
ac_ssl_includes="$ssl_incdir"
ssl_libdirs="/usr/lib /usr/local/lib /usr/ssl/lib /usr/local/ssl/lib"
if test ! "$ac_ssl_libraries" = "NO"; then
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
fi
test=NONE
ssl_libdir=NONE
for dir in $ssl_libdirs; do
try="ls -1 $dir/libssl*"
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
done
ac_ssl_libraries="$ssl_libdir"
AC_LANG_SAVE
AC_LANG_C
ac_cflags_safe="$CFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
LDFLAGS="-L$ssl_libdir $all_libraries"
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
ac_ssl_rsaref="yes"
,
ac_ssl_rsaref="no"
)
CFLAGS="$ac_cflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
have_ssl=no
else
have_ssl=yes;
fi
])
eval "$ac_cv_have_ssl"
else
have_ssl=no
fi
if test "$have_ssl" != yes; then
LIBSSL="";
AC_MSG_RESULT([$have_ssl]);
else
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
ac_cv_have_ssl="have_ssl=yes \
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
ssl_libraries="$ac_ssl_libraries"
ssl_includes="$ac_ssl_includes"
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
AC_MSG_RESULT($ac_ssl_rsaref)
if test "$ac_ssl_rsaref" = yes; then
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
fi
fi
if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
SSL_INCLUDES="";
else
SSL_INCLUDES="-I$ssl_includes"
fi
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
SSL_LDFLAGS=""
else
SSL_LDFLAGS="-L$ssl_libraries"
fi
AC_SUBST(SSL_INCLUDES)
AC_SUBST(SSL_LDFLAGS)
AC_SUBST(LIBSSL)
])
AC_PATH_SSL
dnl libmach for Tru64
case "$host" in
*-*-osf*)
AC_CHECK_LIB(mach, vm_statistics, LIB_TRU64_MACH="-lmach")dnl
;;
esac
AC_SUBST(LIB_TRU64_MACH)
KDE_CHECK_LONG_LONG
if test x$compile_kdedb = x ; then
AC_MSG_CHECKING(for kdedb libraries and headers)
compile_kdedb=no
dnl check for installed kdedb headers
kdedb_incdirs="$kde_includes /usr/include /usr/local/include /opt/kde/include"
AC_FIND_FILE(kdb/kdb.h, $kdedb_incdirs, kdedb_incdir)
if test -r $kdedb_incdir/kdb/kdb.h; then
KDEDB_INCLUDES=$kdedb_incdir
compile_kdedb=yes
fi
dnl check for installed kdedb libraries
kdedb_libdirs="$kde_libraries /usr/lib /usr/local/lib /opt/kde/lib"
AC_FIND_FILE(libkdbcore.la, $kdedb_libdirs, kdedb_libdir)
if test -r $kdedb_libdir/libkdbcore.la; then
KDEDB_LIBS=$kdedb_libdir
compile_kdedb=yes
else
compile_kdedb=no
fi
if test $compile_kdedb = yes; then
AC_MSG_RESULT([headers $KDEDB_INCLUDES, libraries $KDEDB_LIBS])
AC_SUBST(KDEDB_INCLUDES)
AC_SUBST(KDEDB_LIBS)
LIB_KDBUI="-lkdbui"
AC_SUBST(LIB_KDBUI)
LIB_KDBCORE="-lkdbcore"
AC_SUBST(LIB_KDBCORE)
LIB_KDB="$LIB_KDBUI $LIB_KDBCORE"
AC_SUBST(LIB_KDB)
else
AC_MSG_RESULT([not found])
fi
fi
if test $compile_kdedb = yes; then
KDEDB_SUBDIR=kdedb
AC_SUBST(KDEDB_SUBDIR)
fi
DO_NOT_COMPILE="$DO_NOT_COMPILE kcmthemes"
dnl CUPS stuffs (to be changed)
ac_use_cups="yes"
CUPSSUBDIR=
LIB_CUPS=
AC_ARG_ENABLE(cups,[ --disable-cups disable CUPS support [default=enabled]],[ac_use_cups="no"])
if test "$ac_use_cups" = "yes"; then
ac_cups_libs=0
ac_CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $all_includes"
ac_LDFLAGS_save="$LDFLAGS"
LDFLAGS="$LDFLAGS $all_libraries"
AC_CHECK_LIB(cups,cupsServer,[ac_cups_libs=1],[ac_cups_libs=0],$LIBDL)
if test "$ac_cups_libs" = "0"; then
AC_MSG_WARN(CUPS library not found. CUPS support disabled)
ac_use_cups="no"
fi
ac_cups_headers=0
AC_CHECK_HEADER(cups/cups.h,[ac_cups_headers=1])
if test "$ac_cups_headers" = "0"; then
AC_MSG_WARN(CUPS headers not found. CUPS support disabled)
ac_use_cups="no"
fi
LDFLAGS="$ac_LDFLAGS_save"
CPPFLAGS="$ac_CPPFLAGS_save"
fi
if test "$ac_use_cups" = "yes"; then
CUPSSUBDIR="cups"
LIB_CUPS="-lcups"
AC_DEFINE(HAVE_CUPS, 1, [Defines if you have CUPS (Common UNIX Printing System)])
fi
AC_SUBST(CUPSSUBDIR)
AC_SUBST(LIB_CUPS)
AC_CHECK_FUNCS(sigset sigaction)
dnl Check for "struct ucred"
AC_MSG_CHECKING("struct ucred")
AC_EGREP_HEADER([struct ucred], [sys/socket.h], have_ucred=yes)
if test "$have_ucred" = "yes"; then
AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if you have the struct ucred])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl Check for the group "nogroup". Use -2 otherwise.
AC_MSG_CHECKING(nogroup)
AC_TRY_RUN([
#include <grp.h>
#include <sys/types.h>
int main()
{
struct group *grp = getgrnam("nogroup");
if (grp) return 0;
return 1;
}
], nogroup=nogroup, nogroup=65534, nogroup=65534)
AC_MSG_RESULT($nogroup)
AC_SUBST(nogroup)
dnl this is for kdm:
savex="$exec_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
KDE_CONFDIR=`eval echo $kde_confdir`
AC_DEFINE_UNQUOTED(KDE_CONFDIR, "$KDE_CONFDIR", [KDE's configuration directory])
AC_SUBST(KDE_CONFDIR)
KDE_BINDIR=`eval echo $kde_bindir`
AC_DEFINE_UNQUOTED(KDE_BINDIR, "$KDE_BINDIR", [KDE's binaries directory])
AC_SUBST(KDE_BINDIR)
exec_prefix="$savex"
KDE_FIND_PATH(xmkmf, XMKMF, [], [AC_MSG_ERROR([xmkmf/imake not found. Please make sure it's in PATH!])])
AC_SUBST(XMKMF)
dnl ask imake about various X settings
AC_MSG_CHECKING([various X settings])
AC_CACHE_VAL(kde_cv_defines_imake,
[rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
cat > Imakefile <<'EOF'
BASIC_FLAGS = StandardDefines ConnectionFlags
#if HasXdmAuth
XDMAUTH_DEFINES = -DHASXDMAUTH
#endif
#if HasBSD44Sockets
SOCK_DEFINES = -DBSD44SOCKETS
#endif
#if defined(i386Architecture) || defined(ia64Architecture) || defined(AmigaArchitecture)
FRAGILE_DEFINES = -DFRAGILE_DEV_MEM
#endif
#ifdef OpenBSDArchitecture
RANDOM_DEFINES = -DARC4_RANDOM
#elif defined(LinuxArchitecture)
RANDOM_DEFINES = -DDEV_RANDOM
#endif
#if HasLibCrypt && !defined(SpecialLibCrypt) && defined(LynxOSArchitecture)
CRYPT_DEFINES = -DHAS_CRYPT
#endif
VERSION_DEFINES = -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
XDM_CFLAGS = $(BASIC_FLAGS) $(VERSION_DEFINES) $(SIGNAL_DEFINES) $(XDMAUTH_DEFINES) $(FRAGILE_DEFINES) $(SOCK_DEFINES) $(RANDOM_DEFINES) $(CRYPT_DEFINES)
acimake:
@echo XDM_CFLAGS=\"$(XDM_CFLAGS)\"
#if HasXdmAuth
@echo HASXDMAUTH=1
#endif
@echo XBINDIR=$(BINDIR)
@echo XLIBDIR=$(LIBDIR)
EOF
if $XMKMF >&5 2>&1 && test -f Makefile; then
[kde_cv_defines_imake=`${MAKE-make} acimake 2> /dev/null | grep '^[^ ]*='`]
kde_cv_defines_imake=`echo $kde_cv_defines_imake`
else
AC_MSG_ERROR([$XMKF (imake) failed])
fi
cd ..
rm -fr conftestdir
else
AC_MSG_ERROR([mkdir failed])
fi])
if test -n "$kde_cv_defines_imake"; then
eval $kde_cv_defines_imake
AC_MSG_RESULT([done])
fi
AC_MSG_CHECKING([whether to use xdm authorization])
if test -n "$HASXDMAUTH"; then
AC_MSG_RESULT([yes])
AC_DEFINE(HASXDMAUTH, 1, [Use encrypted XDM authorization])
else
AC_MSG_RESULT([no])
fi
AC_MSG_RESULT([checking for X binary directory... $XBINDIR])
AC_DEFINE_UNQUOTED(XBINDIR, "$XBINDIR", [Define where to find the X binaries])
AC_MSG_RESULT([checking for X library directory... $XLIBDIR])
AC_DEFINE_UNQUOTED(XLIBDIR, "$XLIBDIR", [Define where to find the X libraries])
AC_CHECK_LIB(Xau, main, [:],
[
AC_MSG_WARN([Cannot build KDM! Make sure that libXau.a is installed!])
DO_NOT_COMPILE="$DO_NOT_COMPILE kdm"
],
$X_LDFLAGS -lX11 $LIBSOCKET)
AC_ARG_WITH(xdmcp,
[ --without-xdmcp build kdm without xdmcp support [default=with xdmcp]],
[ if test "$withval" = yes; then
XDMCP=1
else
XDMCP=
fi
], [XDMCP=1])
if test -n "$XDMCP"; then
kdmchooserdir=chooser
AC_CHECK_LIB(Xdmcp, main, [LIBXDMCP="-lXdmcp"], , $X_LDFLAGS -lX11 $LIBSOCKET)
if test -n "$LIBXDMCP"; then
ac_cpp_safe=$ac_cpp
ac_cpp='$CXXCPP $CPPFLAGS $X_INCLUDES'
AC_CHECK_HEADER(X11/Xdmcp.h, [HAVE_X11_XDMCP_H=1])
ac_cpp=$ac_cpp_safe
fi
if test -z "$HAVE_X11_XDMCP_H"; then
AC_MSG_WARN([Cannot build KDM! Make sure that libXdmcp.a and Xdmcp.h
are installed or use --without-xdmcp to disable XDMCP support!])
DO_NOT_COMPILE="$DO_NOT_COMPILE kdm"
fi
fi
AC_SUBST(LIBXDMCP)
AC_SUBST(kdmchooserdir) dnl XXX phase out
AC_MSG_CHECKING(whether to use Kerberos v4)
AC_ARG_WITH(krb4,
[ --with-krb4[=PATH] Compile in Kerberos v4 support.],
[ case "$withval" in
yes)
with_krb4=/usr/kerberos
;;
esac ],
[ with_krb4=no ]
)
case "$with_krb4" in
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(KRB4, 1, [ define if you have Kerberos IV ])
KERBEROS_ROOT="$with_krb4"
KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes"
KRB_RPATH=
if test "$USE_RPATH" = "yes" ; then
KRB_RPATH="-R ${KERBEROS_ROOT}/lib"
fi
AC_CHECK_LIB(resolv, dn_expand, KERBEROS_LIBS="$KERBEROS_LIBS -lresolv")
dnl Check whether or not the AFS lifetime conversion routines exist.
AC_MSG_CHECKING(whether AFS lifetime conversion routines are present)
keeplibs="$LIBS"
keepcflags="$CFLAGS"
LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS"
CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS"
AC_TRY_LINK([#include <krb.h>], [ krb_life_to_time(10, 10);],
[AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_KRB_LIFE_TO_TIME, 1,
[ define if libkrb has krb_life_to_time() ])],
[AC_MSG_RESULT(no)])
LIBS="$keeplibs"
CFLAGS="$keepcflags"
;;
esac
AC_MSG_CHECKING(whether to use AFS)
AC_ARG_WITH(afs,
[ --with-afs Compile in AFS support (requires KTH krb4).], ,
[ with_afs=no ])
if test "$with_afs" = no; then
AC_MSG_RESULT(no)
else
if test "$with_krb4" = no; then
AC_MSG_RESULT(no)
AC_MSG_WARN("AFS requires Kerberos v4 support.")
with_afs=no
else
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(AFS, 1, [ define if you have KTH Kerberos IV and AFS ])
KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs"
if test -n "$os_aix"; then
KERBEROS_LIBS="${KERBEROS_LIBS} -lld"
fi
fi
fi
AC_SUBST(KERBEROS_ROOT)dnl
AC_SUBST(KERBEROS_INCS)dnl
AC_SUBST(KERBEROS_LIBS)dnl
AC_SUBST(KRB_RPATH)
AC_CHECK_LIB(s, main, [LIB_LIBS="-ls"]) dnl for AIX
AC_SUBST(LIB_LIBS)
AC_MSG_CHECKING([whether to use Kerberos5 for Xauth cookies in kdm])
AC_ARG_WITH(krb5auth,
[ --with-krb5auth Use Kerberos5 for Xauth cookies in kdm.], ,
[ with_krb5auth=no ])
if test "x$with_krb5auth" = xno; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_CHECK_HEADER(krb5/krb5.h,
[ XDM_CFLAGS="$XDM_CFLAGS -DK5AUTH" ],
[ AC_MSG_ERROR([--with-krb5auth requires Kerberos5 header files.])])
fi
AC_MSG_CHECKING([whether to use Sun's secure RPC for Xauth cookies in kdm])
AC_ARG_WITH(rpcauth,
[ --with-rpcauth Use Sun's secure RPC for Xauth cookies in kdm.], ,
[ with_rpcauth=no ])
if test "x$with_rpcauth" = xno; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_CHECK_HEADER(rpc/rpc.h,
[ XDM_CFLAGS="$XDM_CFLAGS -DSECURE_RPC" ],
[ AC_MSG_ERROR([--with-rpcauth requires Sun RPC header files.])])
fi
if test "x$use_pam" = xno; then
dnl should be:
dnl AC_CHECK_MEMBER(struct passwd.pw_expire, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_PW_EXPIRE" ], , [#include <pwd.h>])
dnl but somehow it doesn't work. so we make it by hand ...
AC_MSG_CHECKING([for pw_expire in struct passwd])
AC_CACHE_VAL(ac_cv_have_pw_expire,
[ AC_TRY_COMPILE(
[#include <pwd.h>],
[struct passwd pwd; pwd.pw_expire = 0;],
[ac_cv_have_pw_expire="yes"],
[ac_cv_have_pw_expire="no"])
])
AC_MSG_RESULT($ac_cv_have_pw_expire)
if test "$ac_cv_have_pw_expire" = "yes"; then
XDM_CFLAGS="$XDM_CFLAGS -DHAVE_PW_EXPIRE"
fi
ac_save_libs=$LIBS
LIBS="$LIBS $LIBUTIL"
AC_CHECK_FUNC(setusercontext, [ XDM_CFLAGS="$XDM_CFLAGS -DHAS_SETUSERCONTEXT" ])
AC_CHECK_FUNC(getusershell, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_GETUSERSHELL" ])
AC_CHECK_FUNC(login_getclass, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_LOGIN_GETCLASS" ])
AC_CHECK_FUNC(auth_timeok, [ XDM_CFLAGS="$XDM_CFLAGS -DHAVE_AUTH_TIMEOK" ])
LIBS=$ac_save_libs
fi
AC_CHECK_FUNC(vsyslog, [ XDM_CFLAGS="$XDM_CFLAGS -DUSE_SYSLOG" ])
if test "x$use_pam" = xyes; then
XDM_CFLAGS="$XDM_CFLAGS -DUSE_PAM"
elif test "x$use_shadow" = xyes; then
XDM_CFLAGS="$XDM_CFLAGS -DUSESHADOW"
fi
if test "x$XDMCP" != x; then
XDM_CFLAGS="$XDM_CFLAGS -DXDMCP"
fi
if test "x$with_krb4" != xno; then
XDM_CFLAGS="$XDM_CFLAGS -DKERBEROS"
if test "x$with_afs" = xno; then
XDM_CFLAGS="$XDM_CFLAGS -DNO_AFS"
fi
fi
AC_MSG_RESULT([xdm CFLAGS: $XDM_CFLAGS])
AC_SUBST(XDM_CFLAGS)
AC_MSG_CHECKING(for cdparanoia libraries and headers)
AC_ARG_WITH(cdparanoia,
[ --with-cdparanoia[=DIR] Compile in cdparanoia support [default=check]],
[
case "$withval" in
yes)
with_cdparanoia=CHECK
;;
esac
],
[
with_cdparanoia=CHECK
]
)dnl
if test "x$with_cdparanoia" = "xCHECK" ; then
with_cdparanoia=NOTFOUND
search_incs="$kde_includes /usr/include /usr/local/include"
AC_FIND_FILE(cdda_interface.h, $search_incs, para_incdir)
if test -r $para_incdir/cdda_interface.h ; then
test "x$para_incdir" != "x/usr/include" && CDPARANOIA_INCS="-I$para_incdir"
with_cdparanoia=FOUND
fi
if test $with_cdparanoia = FOUND ; then
with_cdparanoia=NOTFOUND
# because of the horrible hack we need shared cdparanoia
for ext in la so sl a ; do
AC_FIND_FILE(libcdda_paranoia.$ext, $kde_libraries /usr/lib /usr/local/lib,
para_libdir)
if test -r $para_libdir/libcdda_paranoia.$ext ; then
if test "x$para_libdir" != "x/usr/lib" ; then
CDPARANOIA_LIBS="-L$para_libdir "
test "$USE_RPATH" = yes && CDPARANOIA_RPATH="-R $para_libdir"
fi
CDPARANOIA_LIBS="${CDPARANOIA_LIBS}-lcdda_paranoia -lcdda_interface"
with_cdparanoia=FOUND
break
fi
done
if test "$with_cdparanoia" = FOUND; then
if test "$ext" = la; then
grep "^library_names='*[a-z]*'" $para_libdir/libcdda_paranoia.$ext 2>&1 > /dev/null || with_cdparanoia=NOTFOUND
fi
if test "$ext" = a; then
with_cdparanoia=NOTFOUND
cdparanoia_only_static=yes
fi
# beware, that we don't reset CDPARANOIA_*
fi
fi
fi
case "$with_cdparanoia" in
no) AC_MSG_RESULT(no) ;;
NOTFOUND) AC_MSG_RESULT(searched but not found) ;;
*)
if test "x$with_cdparanoia" = "xFOUND" ; then
AC_MSG_RESULT(incs=$para_incdir libs=$para_libdir)
else
AC_MSG_RESULT($with_cdparanoia)
CDPARANOIA_ROOT="$with_cdparanoia"
if test "x$CDPARANOIA_ROOT" != "x/usr" ; then
CDPARANOIA_INCS="-I${CDPARANOIA_ROOT}/include"
CDPARANOIA_LIBS="-L${CDPARANOIA_ROOT}/lib "
if test "$USE_RPATH" = "yes" ; then
CDPARANOIA_RPATH="-R ${CDPARANOIA_ROOT}/lib"
fi
fi
CDPARANOIA_LIBS="${CDPARANOIA_LIBS}-lcdda_paranoia -lcdda_interface"
fi
AC_DEFINE_UNQUOTED(HAVE_CDPARANOIA, 1, [Define if you have cdparanoia])
AUDIOCD_SUBDIR="audiocd"
;;
esac
AC_SUBST(CDPARANOIA_INCS)
AC_SUBST(CDPARANOIA_LIBS)
AC_SUBST(CDPARANOIA_RPATH)
AC_SUBST(AUDIOCD_SUBDIR)
AC_MSG_CHECKING(for lame library and header)
AC_ARG_WITH(lame,
[ --with-lame[=DIR] Compile in Lame MP3 support [default=check]],
[
case "$withval" in
yes) with_lame=CHECK ;;
esac
],
[ with_lame=CHECK ]
)dnl
AC_ARG_ENABLE(lametest,
[ --disable-lametest Do not try to compile and run a test Lame MP3 program], , enable_lametest=yes)
if test "x$with_lame" = "xCHECK" ; then
with_lame=NOTFOUND
search_incs="/usr/local/include $kde_includes /usr/include"
AC_FIND_FILE(lame/lame.h, $search_incs, lame_incdir)
if test -r $lame_incdir/lame/lame.h ; then
test "x$lame_incdir" != "x/usr/include" && LAME_INCS="-I$lame_incdir"
with_lame=FOUND
fi
if test $with_lame = FOUND ; then
with_lame=NOTFOUND
for ext in la so sl a ; do
AC_FIND_FILE(libmp3lame.$ext, /usr/local/lib $kde_libraries /usr/lib,
lame_libdir)
if test -r $lame_libdir/libmp3lame.$ext ; then
if test "x$lame_libdir" != "x/usr/lib" ; then
LAME_LIBS="-L$lame_libdir "
test "$USE_RPATH" = yes && LAME_RPATH="-R $lame_libdir"
fi
LAME_LIBS="${LAME_LIBS}-lmp3lame -lm"
with_lame=FOUND
break
fi
done
fi
fi
case "$with_lame" in
no) AC_MSG_RESULT(no) ;;
NOTFOUND) AC_MSG_RESULT(searched but not found) ;;
*)
if test "x$with_lame" = "xFOUND" ; then
msg="incs=$lame_incdir libs=$lame_libdir"
else
msg="$with_lame"
LAME_ROOT="$with_lame"
if test "x$LAME_ROOT" != "x/usr" ; then
LAME_INCS="-I${LAME_ROOT}/include"
LAME_LIBS="-L${LAME_ROOT}/lib "
if test "$USE_RPATH" = "yes" ; then
LAME_RPATH="-R ${LAME_ROOT}/lib"
fi
fi
LAME_LIBS="${LAME_LIBS}-lmp3lame -lm"
fi
non_compile=no
if test "x$enable_lametest" = xyes ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $all_includes $LAME_INCS"
LIBS="$LIBS $all_libraries $LAME_LIBS"
rm -f conf.lametest conf.wrongver
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lame/lame.h>
int main ()
{
lame_version_t v;
get_lame_version_numerical (&v);
if (v.major>3 || (v.major==3 && v.minor>88)) {
system("touch conf.lametest");
return 0;
} else {
system("touch conf.wrongver");
return 1;
}
}
], , non_compile=yes , [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
# bogus return value, but it _did_ run correctly
test -f conf.lametest && non_compile=no
# Set the flag for configure.in.bot
test -f conf.wrongver && lame_wrong_version=yes
rm -f conf.lametest conf.wrongver
fi
if test "$non_compile" = no ; then
AC_MSG_RESULT($msg)
AC_DEFINE_UNQUOTED(HAVE_LAME, 1, [Define if you have lame])
KCM_AUDIOCD="kcmaudiocd"
else
AC_MSG_RESULT(no (but first try gave $msg))
if test -z "$lame_wrong_version"; then
# only do this test, if it really didn't run
echo "*** Could not run Lame test program, checking why..."
CFLAGS="$CFLAGS $all_includes $LAME_INCS"
LIBS="$LIBS $all_libraries $LAME_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lame/lame.h>
], [
lame_version_t v;
get_lame_version_numerical (&v);
return 0;
],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Lame or finding the wrong"
echo "*** version of Lame. If it is not finding Lame, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Lame was incorrectly installed"
echo "*** or that you have moved Lame since it was installed." ])
# ac_save_* still set, because this else part is only entered if the
# enable_lametest was yes, in which case also ac_save_* was set.
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
LAME_INCS=
LAME_LIBS=
LAME_RPATH=
fi
;;
esac
AC_SUBST(LAME_INCS)
AC_SUBST(LAME_LIBS)
AC_SUBST(LAME_RPATH)
AC_SUBST(KCM_AUDIOCD)
AC_MSG_CHECKING(for Vorbis Ogg libraries and headers)
AC_ARG_WITH(vorbis,
[ --with-vorbis[=DIR] Compile in Vorbis OGG support [default=check]],
[
case "$withval" in
yes) with_vorbis=CHECK ;;
esac
],
[ with_vorbis=CHECK ]
)dnl
AC_ARG_ENABLE(vorbistest,
[ --disable-vorbistest Do not try to compile and run a test Vorbis program], , enable_vorbistest=yes)
if test "x$with_vorbis" = "xCHECK" ; then
with_vorbis=NOTFOUND
search_incs="$kde_includes /usr/local/include /usr/include"
AC_FIND_FILE(vorbis/codec.h, $search_incs, vorbis_incdir)
if test -r $vorbis_incdir/vorbis/codec.h ; then
test "x$vorbis_incdir" != "x/usr/include" && VORBIS_INCS="-I$vorbis_incdir"
with_vorbis=FOUND
fi
if test $with_vorbis = FOUND ; then
with_vorbis=NOTFOUND
for ext in la so sl a ; do