1AC_INIT(LPRng,3.8.C,lprng-devel@lists.sf.net) 2AC_CONFIG_SRCDIR(src/common/lpr.c) 3AM_CONFIG_HEADER(config.h) 4AM_INIT_AUTOMAKE([foreign]) 5 6AM_MAINTAINER_MODE 7 8AC_PREFIX_DEFAULT(/usr/local) 9 10mysaved_CFLAGSset="${CFLAGS+set}" 11AC_PROG_CC 12if test "$ac_cv_prog_gcc" = yes; then 13 if test "$mysaved_CFLAGSset" != set ; then 14 CFLAGS="-g -W -Wall -Wno-unused -Wstrict-prototypes -Wmissing-prototypes" 15 fi 16fi; 17AC_SYS_LARGEFILE 18 19AC_PROG_AWK 20AC_SUBST(AWK) 21AC_PATH_PROG(SED,sed)dnl 22AC_SUBST(SED)dnl 23AC_PATH_PROG(PERL,perl)dnl 24AC_SUBST(PERL)dnl 25dnl -- TODO: 26dnl this is used in checkpc, why not just use "chown" there? 27dnl same with chgrp 28dnl -- 29AC_PATH_PROG(CHOWN,chown)dnl 30AC_DEFINE_UNQUOTED(CHOWN, "$CHOWN",[full path to chown]) 31AC_PATH_PROG(CHGRP,chgrp)dnl 32AC_DEFINE_UNQUOTED(CHGRP, "$CHGRP",[full path to chgrp]) 33AC_PATH_PROG(PRUTIL,pr)dnl 34AC_DEFINE_UNQUOTED(PRUTIL, "$PRUTIL",[full path to prutil]) 35AC_PATH_PROG(OPENSSL,openssl)dnl 36AC_SUBST(OPENSSL)dnl 37AC_DEFINE_UNQUOTED(OPENSSL, "$OPENSSL",[full path to openssl]) 38 39dnl dnl check to see if setuid is suppressed 40dnl AC_ARG_ENABLE( setuid, 41dnl AS_HELP_STRING([--disable-setuid],[do not install client executables setuid root]), 42dnl [ 43dnl if test "$enableval" = "yes" ; then 44dnl PERMS=SUID_ROOT_PERMS 45dnl else 46dnl PERMS=NORM_PERMS 47dnl fi 48dnl ], 49dnl [ PERMS=SUID_ROOT_PERMS ], 50dnl ) 51dnl AC_MSG_NOTICE([installing client with $PERMS]) 52dnl AC_SUBST(PERMS) 53 54dnl check to see if priv ports required 55ENABLE_BOOLEAN(priv_ports, 56[--enable-priv_ports],[require connections from privileged ports], 57"no", 58[require connections from priviledged ports: $v], 59[PRIV_PORTS=""],[PRIV_PORTS="#"]) 60AC_SUBST(PRIV_PORTS) 61 62dnl check if only accept from local host 63ENABLE_BOOLEAN(remote, 64[--disable-remote],[do not accept remote jobs by default], 65"yes", 66[listen for remote connections by default : $v], 67[NOREMOTE="#" 68LPD_LISTEN_PORT='"=515"' 69],[NOREMOTE="" 70LPD_LISTEN_PORT='"=off"' 71]) 72AC_SUBST(LPD_LISTEN_PORT) 73AC_SUBST(NOREMOTE) 74AC_DEFINE_UNQUOTED(LPD_LISTEN_PORT, $LPD_LISTEN_PORT,[default value for lpd_listen_port (0 means default port ("=515"), "=off" means to not listen at all]) 75 76ENABLE_BOOLEAN(lpd.conf.local, 77[--enable-lpd.conf.local],[include lpd.conf.local in lpd.conf], 78"no", 79[include lpd.conf.local in lpd.conf : $v], 80[INCLUDELPDCONFLOCAL="" 81],[INCLUDELPDCONFLOCAL="# " 82]) 83AC_SUBST(INCLUDELPDCONFLOCAL) 84 85dnl check to see if force_localhost is suppressed 86ENABLE_BOOLEAN(force_localhost, 87[--disable-force_localhost],[disable force_localhost default], 88"yes", 89[force_localhost is default : $v], 90[FORCE_LOCALHOST=1],[FORCE_LOCALHOST=0]) 91AC_DEFINE_UNQUOTED(FORCE_LOCALHOST,"$FORCE_LOCALHOST",[Force Localhost (force_localhost)]) 92 93dnl check to see if clients require lpd.conf and printcap 94ENABLE_BOOLEAN(require_configfiles, 95[--disable-require_configfiles],[client programs require lpd.conf, printcap], 96"yes", 97[client programs require lpd.conf, printcap: $v], 98[REQUIRE_CONFIGFILES=1], [REQUIRE_CONFIGFILES=0]) 99AC_DEFINE_UNQUOTED(REQUIRE_CONFIGFILES, "$REQUIRE_CONFIGFILES",[require configfiles]) 100 101dnl check to see if kerberos is disabled 102AH_TEMPLATE(KERBEROS,[enable Kerberos support]) 103ENABLE_BOOLEAN(kerberos, 104[--enable-kerberos],[enable kerberos support], 105"no", 106[enable kerberos support : $v], 107[KERBEROS=1; 108AC_DEFINE_UNQUOTED(KERBEROS,"1")], 109[KERBEROS=""]) 110AM_CONDITIONAL(WITHKERBEROS, test $v = yes) 111AC_SUBST(KERBEROS) 112 113dnl find kerberos libraries 114ENABLE_BOOLEAN(kerberos_checks, 115[--disable-kerberos_checks],[disable kerberos library location and checking for support], 116"yes", 117[locate Kerberos libraries and check : $v], 118[KERBEROS_CHECKS=1],[KERBEROS_CHECKS=""]) 119 120WITH_DIR(lpddir, 121[--with-lpddir=DIR],[lpd executable directory (default ${sbindir})], 122[lpdbindir],['${sbindir}'], 123[directory to place lpd executable into : $lpdbindir]) 124 125AC_ARG_WITH(config_subdir, 126AS_HELP_STRING([--with-config_subdir=SUBDIR],[configuration subdirectory (default 'lpd')]), 127CONFIGSUBDIR=$withval,CONFIGSUBDIR=lpd 128) 129configdir=\${sysconfdir}/${CONFIGSUBDIR} 130AC_MSG_NOTICE([configuration directory configdir= $configdir]) 131AC_SUBST(configdir) 132 133WITH_DIR(lpd_conf_path, 134[--with-lpd_conf_path=PATH],[path of lpd.conf (default: ${configdir}/lpd.conf)], 135[LPD_CONF_PATH],['${configdir}/lpd.conf'], 136[lpd.conf location : $LPD_CONF_PATH]) 137AC_SUBST(LPD_CONF_PATH) 138 139WITH_DIR(lpd_perms_path, 140[--with-lpd_perms_path=PATH],[path of lpd.perms (default: ${configdir}/lpd.perms)], 141[LPD_PERMS_PATH],['${configdir}/lpd.perms'], 142[lpd.perms location : $LPD_PERMS_PATH]) 143AC_SUBST(LPD_PERMS_PATH) 144 145WITH_DIR(printcap_path, 146[--with-printcap_path=PATH],[path of printcap (default ${sysconfdir}/printcap)], 147[PRINTCAP_PATH],['${sysconfdir}/printcap'], 148[printcap location : $PRINTCAP_PATH]) 149AC_SUBST(PRINTCAP_PATH) 150 151WITH_DIR(lpd_printcap_path, 152[--with-lpd_printcap_path=PATH],[path of lpd_printcap (default ${configdir}/lpd_printcap)], 153[LPD_PRINTCAP_PATH],['${configdir}/lpd_printcap'], 154[lpd_printcap location : $LPD_PRINTCAP_PATH]) 155 156WITH_DIR(localedir, 157[--with-localedir=PATH],[specify locale information directory], 158[localedir],['${datadir}/locale'], 159[locale information directory is : $localedir]) 160AC_SUBST(localedir) 161 162WITH_DIR(unix_socket_path, 163[--with-unix_socket_path=DIR],[unix socket path (default /var/run/lprng)], 164[UNIXSOCKETPATH],[/var/run/lprng], 165[unix socket path is : $UNIXSOCKETPATH]) 166 167WITH_DIR(lockfile, 168[--with-lockfile=PATH],[lockfile PATH, default /var/run/lpd ], 169[LOCKFILE],['/var/run/lpd'], 170[lockfile directory : $LOCKFILE]) 171 172WITH_DIR(spooldir, 173[--with-spooldir=PATH],[default spool directory, default /var/spool/lpd ], 174[SD_DEFAULT],['/var/spool/lpd'], 175[default spool directory (:sd=SPOOLDIR/%P) : $SD_DEFAULT]) 176 177WITH_DIR(plugindir, 178[--with-plugindir=DIR],[dynamic loadable plugin directory (default ${libdir}/lprng/plugins)], 179[plugindir],['${libdir}/lprng/plugins'], 180[plugin directory plugindir = $plugindir]) 181 182WITH_DIR(filterdir, 183[--with-filterdir=DIR],[filter directory (default ${libexecdir}/filters)], 184[filterdir],['${libexecdir}/filters'], 185[filter directory filterdir = $filterdir]) 186 187dnl FILTER_LD_PATH (LD_LIBRARY_PATH for filters) value 188dnl 189AC_ARG_WITH(ld_library_path, 190AS_HELP_STRING([--with-ld_library_path=PATH],[FILTER_LD_PATH value, default empty (for Solaris you might need /lib:/usr/lib:/usr/local/lib)]), 191FILTER_LD_PATH="$withval", 192FILTER_LD_PATH="" 193) 194AC_MSG_NOTICE([filter LD_LIBRARY_PATH: FILTER_LD_PATH = $FILTER_LD_PATH]) 195AC_SUBST(FILTER_LD_PATH) 196AC_DEFINE_UNQUOTED(FILTER_LD_PATH, "$FILTER_LD_PATH",[default LD_LIBRARY_PATH for filters]) 197 198dnl filter PATH value 199dnl 200AC_ARG_WITH(filter-path, 201AS_HELP_STRING([--with-filter-path=PATH],[filter PATH value, default /bin:/usr/bin:/usr/local/bin ]), 202FILTER_PATH="$withval", 203FILTER_PATH="/bin:/usr/bin:/usr/local/bin" 204) 205AC_MSG_NOTICE([filter PATH: FILTER_PATH = $FILTER_PATH]) 206AC_SUBST(FILTER_PATH) 207AC_DEFINE_UNQUOTED(FILTER_PATH, "$FILTER_PATH",[default PATH for filters]) 208 209dnl user name 210dnl 211AC_ARG_WITH(userid, 212AS_HELP_STRING([--with-userid=NAME],[run LPRng software as this userid, default daemon ]), 213USERID="$withval", USERID="daemon", 214) 215AC_MSG_NOTICE([userID to run lpd as : $USERID]) 216AC_DEFINE_UNQUOTED(USERID, "$USERID",[userid to run LPRng as, default daemon]) 217 218dnl group value 219dnl 220AC_ARG_WITH(groupid, 221AS_HELP_STRING([--with-groupid=NAME],[run LPRng software as this groupid, default daemon ]), 222GROUPID="$withval", GROUPID="daemon", 223) 224AC_MSG_NOTICE([groupID to run lpd as : $GROUPID]) 225AC_DEFINE_UNQUOTED(GROUPID, "$GROUPID",[groupid to run LPRng as, default daemon]) 226 227dnl done_jobs value 228dnl 229AC_ARG_WITH(done_jobs, 230AS_HELP_STRING([--with-done_jobs=N],[retain last N job status, default 1]), 231DONE_JOBS="$withval", DONE_JOBS="1", 232) 233AC_MSG_NOTICE([number of job status to retain : $DONE_JOBS]) 234AC_DEFINE_UNQUOTED(DONE_JOBS, "$DONE_JOBS",[number of jobs to retain status of]) 235 236dnl done_jobs_max_age value 237dnl 238AC_ARG_WITH(done_jobs_max_age, 239AS_HELP_STRING([--with-done_jobs_max_age=N],[retain job status N seconds, default 0 - no expiry]), 240DONE_JOBS_MAX_AGE="$withval", DONE_JOBS_MAX_AGE="0", 241) 242AC_MSG_NOTICE([max age to retain job status (0=no expiry): $DONE_JOBS_MAX_AGE]) 243AC_DEFINE_UNQUOTED(DONE_JOBS_MAX_AGE, "$DONE_JOBS_MAX_AGE",[number of seconds to retain job status]) 244 245dnl clear program 246dnl 247AC_MSG_CHECKING(terminal screen clear program) 248if test -z "$CLEAR" ; then 249 AC_PATH_PROG(CLEAR,clear)dnl 250fi 251if test -z "$CLEAR" ; then 252 AC_MSG_WARN([Program 'clear' is not found. Set environment CLEAR=no if you do not want to use it]); 253 exit 1 254fi 255if test "$CLEAR" = "no" ; then CLEAR= ; fi 256if test -n "$CLEAR" ; then 257 AC_DEFINE_UNQUOTED(CLEAR,"$CLEAR",[screen clear program]) 258fi 259 260dnl ---------------------------------------------------------------------------- 261dnl ----------- C compiler checks ----------------------------------------- 262 263AC_C_CONST 264AC_C_INLINE 265AC_C_VOLATILE 266 267AC_HEADER_STDC 268AC_HEADER_DIRENT 269AC_HEADER_SYS_WAIT 270AC_HEADER_TIME 271 272dnl typedefs: 273AC_TYPE_SIGNAL 274AC_TYPE_UID_T 275AC_TYPE_SIZE_T 276AC_TYPE_MODE_T 277AC_TYPE_OFF_T 278AC_TYPE_PID_T 279 280AC_CHECK_TYPES( fd_set,,,[ 281#include <sys/types.h> 282#include <sys/time.h> 283#include <sys/unistd.h> 284] ) 285 286AC_CHECK_TYPES( socklen_t,,,[ 287#include <sys/types.h> 288#include <sys/socket.h> 289] ) 290 291checklibs= 292 293dnl ---------------------------------------------------------------------------- 294dnl headers: 295 296AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h assert.h com_err.h compat.h ctype.h ctypes.h dirent.h errno.h fcntl.h filehdr.h grp.h limits.h locale.h machine/vmparam.h malloc.h memory.h ndir.h netdb.h netinet/in.h pwd.h resolv.h select.h setjmp.h sgtty.h signal.h stab.h stdarg.h stdio.h stdlib.h string.h strings.h sys/dir.h sys/exec.h sys/fcntl.h sys/file.h sys/ioctl.h sys/mount.h sys/ndir.h sys/param.h sys/pstat.h sys/resource.h sys/select.h sys/signal.h sys/socket.h sys/stat.h sys/statfs.h sys/statvfs.h sys/syslog.h sys/systeminfo.h sys/termio.h sys/termiox.h sys/time.h sys/ttold.h sys/ttycom.h sys/types.h sys/utsname.h sys/vfs.h sys/wait.h syslog.h term.h termcap.h termio.h termios.h time.h unistd.h utsname.h varargs.h vmparam.h endian.h stdint.h) 297 298dnl ---------------------------------------------------------------------------- 299dnl libraries: 300 301dnl it might be nice to put them to some SOCKETLIBS or stuff like that instead, 302dnl but given it is not needed on Linux, this will both seldom tested and 303dnl seldom be useful. 304 305dnl A/UX uses this... 306AC_SEARCH_LIBS(getpwent, posix) 307 308dnl TODO: error out if not there? 309 310AC_SEARCH_LIBS(gethostbyaddr, [nsl_s nsl net_s net]) 311 312AC_SEARCH_LIBS(socket, [socket_s socket]) 313 314 dnl BIND library may be needed, need to force this first 315 if test -z "$no_resolv_lib"; then 316 AC_CHECK_FUNC(inet_ntop,name2=yes) 317 if test -z "$name2" ; then 318 AC_CHECK_LIB(resolv, inet_ntop, [LIBS="$LIBS -lresolv";name2=yes]) 319 fi; 320 fi 321 322dnl ---------------------------------------------------------------------------- 323dnl function checks: 324 325dnl BSDs have this: 326AC_CHECK_LIB(util, setproctitle, [LIBS="-lutil $LIBS"]) 327 328AC_CHECK_FUNCS(_res cfsetispeed fcntl flock gethostbyname2 getdtablesize gethostname getrlimit inet_aton inet_ntop inet_pton innetgr initgroups killpg lockf mkstemp mktemp openlog putenv random rand setenv seteuid setgroups setlocale setpgid setproctitle setresuid setreuid setruid setsid sigaction sigprocmask siglongjmp socketpair strcasecmp strchr strdup strerror strncasecmp sysconf sysinfo tcdrain tcflush tcsetattr uname unsetenv wait3 waitpid) 329 330if test ! "$ac_cv_func_setreuid" = yes -a ! "$ac_cv_func_seteuid" = yes -a ! "$ac_cv_func_setresuid" = yes; then 331 AC_MSG_WARN([missing setreuid(), seteuid(), and setresuid()]) 332fi 333 334AC_FUNC_VFORK 335AC_FUNC_VPRINTF 336 337 338dnl ---------------------------------------------------------------------------- 339dnl special system checks 340 341AC_CACHE_CHECK(how to manipulate tty attributes, 342ac_cv_struct_term, 343[ 344 345if test "$ac_cv_header_termios_h" = yes; then 346 ac_cv_struct_term=termios 347fi 348if test "$ac_cv_header_sys_termios_h" = yes; then 349 ac_cv_struct_term=termios 350fi 351 352dnl test to see if we need to compile 353if test -z "$ac_cv_struct_term" ; then 354AC_TRY_COMPILE([ 355#ifdef HAVE_TERMIO_H 356#include <termio.h> 357#endif 358#ifdef HAVE_SYS_TERMIO_H 359#include <sys/termio.h> 360#endif],[struct termio t;t.c_iflag = 0], 361ac_cv_struct_term=termio) 362fi 363 364dnl now you have determined if you have termio 365if test -z "$ac_cv_struct_term" ; then 366 AC_TRY_COMPILE([#include <sgtty.h>],[ 367 struct sgttyb s;s.sg_flags = 0], 368 ac_cv_struct_term=sgttyb) 369fi 370if test -z "$ac_cv_struct_term" ; then 371 ac_cv_struct_term=UNDEFINED 372fi 373]) 374if test "$ac_cv_struct_term" = "sgttyb"; then 375 AC_DEFINE(USE_SGTTYB,1,[use sgttyb]) 376 AC_DEFINE(USE_STTY,SGTTYB,[use sgttyb]) 377fi 378if test "$ac_cv_struct_term" = "termio"; then 379 AC_DEFINE(USE_TERMIO,1,[use termio]) 380 AC_DEFINE(USE_STTY,TERMIO,[use termio]) 381fi 382if test "$ac_cv_struct_term" = "termios"; then 383 AC_DEFINE(USE_TERMIOS,1,[use termios]) 384 AC_DEFINE(USE_STTY,TERMIOS,[use termios]) 385 if test "$ac_cv_header_sys_termiox_h" = yes; then 386 AC_DEFINE(USE_TERMIOX,1,[use termiox]) 387 fi 388fi 389 390dnl ---------------------------------------------------------------------------- 391 392dnl test to see if lseek has a prototype - you make it get an error 393 394AC_CACHE_CHECK(checking for lseek prototype, 395ac_cv_lseek_proto, 396[ 397AC_TRY_COMPILE([ 398#ifdef HAVE_CTYPES_H 399#include <ctypes.h> 400#endif 401#ifdef HAVE_SYS_TYPES_H 402#include <sys/types.h> 403#endif 404#ifdef HAVE_SYS_UNISTD_H 405#include <sys/unistd.h> 406#endif 407],[off_t x; x = lseek(0,"test",SEEK_SET);], 408ac_cv_lseek_proto=no, ac_cv_lseek_proto=yes) 409]) 410if test "$ac_cv_lseek_proto" = yes; then 411 AC_DEFINE(HAVE_LSEEK_PROTO,1,[have lseek definition]) 412fi 413 414dnl ---------------------------------------------------------------------------- 415 416AC_CACHE_CHECK(how to get filesystem free space, 417ac_cv_struct_fstype, 418[ 419fstype= 420 421dnl do this check if statvfs is a valid function 422if test "$ac_cv_func_statvfs" != no ; then #{ 423 AC_TRY_COMPILE([ 424#ifdef HAVE_CTYPES_H 425#include <ctypes.h> 426#endif 427#include <sys/types.h> 428#include <sys/param.h> 429#ifdef HAVE_SYS_STATVFS_H 430# include <sys/statvfs.h> 431#endif 432#ifdef HAVE_SYS_STATFS_H 433# include <sys/statfs.h> 434#endif 435 436#ifdef HAVE_SYS_MOUNT_H 437# include <sys/mount.h> 438#endif 439#ifdef HAVE_SYS_VFS_H 440# include <sys/vfs.h> 441#endif],[struct statvfs s; statvfs ("/", &s); return(s.f_bavail+s.f_bsize)], 442 fstype=statvfs) 443fi #} 444 445dnl do these checks if statfs is a valid function 446 447if test "$ac_cv_func_statfs" != no ; then #{ 448 if test -z "$fstype" ; then #{ 449 AC_TRY_COMPILE([ 450#ifdef HAVE_CTYPES_H 451#include <ctypes.h> 452#endif 453#include <sys/types.h> 454#include <sys/param.h> 455#ifdef HAVE_SYS_STATFS_H 456# include <sys/statfs.h> 457#endif 458 459#ifdef HAVE_SYS_STATVFS_H 460# include <sys/statvfs.h> 461#endif 462#ifdef HAVE_SYS_MOUNT_H 463# include <sys/mount.h> 464#endif 465#ifdef HAVE_SYS_VFS_H 466# include <sys/vfs.h> 467#endif],[struct fs_data s; return(s.fd_bfree+s.fd_bsize)], 468 fstype=Ultrix-statfs) 469 fi #} 470 471 if test -z "$fstype" ; then #{ 472 AC_TRY_COMPILE([ 473#ifdef HAVE_CTYPES_H 474#include <ctypes.h> 475#endif 476#include <sys/types.h> 477#include <sys/param.h> 478#ifdef HAVE_SYS_STATFS_H 479#include <sys/statfs.h> 480#endif 481#ifdef HAVE_SYS_MOUNT_H 482#include <sys/mount.h> 483#endif 484#ifdef HAVE_SYS_VFS_H 485#include <sys/vfs.h> 486#endif],[struct statfs s; return(s.f_bavail+s.f_bsize)], 487 fstype=statfs) 488 fi # } 489 490 if test -z "$fstype" ; then # { 491 AC_TRY_COMPILE([ 492#ifdef HAVE_CTYPES_H 493#include <ctypes.h> 494#endif 495#include <sys/types.h> 496#include <sys/param.h> 497#ifdef HAVE_SYS_STATFS_H 498#include <sys/statfs.h> 499#endif 500#ifdef HAVE_SYS_MOUNT_H 501#include <sys/mount.h> 502#endif 503#ifdef HAVE_SYS_VFS_H 504#include <sys/vfs.h> 505#endif],[struct statfs s; return(s.f_bfree+s.f_bsize)], 506 fstype=SVR3-statfs) 507 fi # } 508fi # } 509 510if test -z "$fstype" ; then 511 echo "cannot find a valid statfs-like structure!" 512 fstype=UNKNOWN 513fi 514 515ac_cv_struct_fstype=$fstype 516 517]) 518 519if test "$ac_cv_struct_fstype" = SVR3-statfs; then 520 AC_DEFINE(USE_STATFS_TYPE,SVR3_STATFS,[svr3 statfs]) 521fi 522if test "$ac_cv_struct_fstype" = Ultrix-statfs; then 523 AC_DEFINE(USE_STATFS_TYPE,ULTRIX_STATFS,[ultix statfs]) 524fi 525if test "$ac_cv_struct_fstype" = statfs; then 526 AC_DEFINE(USE_STATFS_TYPE,STATFS,[plain statfs]) 527fi 528if test "$ac_cv_struct_fstype" = statvfs; then 529 AC_DEFINE(USE_STATFS_TYPE,STATVFS,[statvfs statfs]) 530fi 531 532dnl ---------------------------------------------------------------------------- 533dnl 534 535AC_CACHE_CHECK(for setproctitle declaration, 536ac_cv_decl_setproctitle_def, 537[AC_TRY_COMPILE([ 538#include <stdio.h> 539#ifdef HAVE_STDLIB_H 540#include <stdlib.h> 541#endif 542#ifdef HAVE_UNISTD_H 543#include <unistd.h> 544#endif 545#ifdef HAVE_ERRNO_H 546#include <errno.h> 547#endif 548],[setproctitle(0);], 549ac_cv_decl_setproctitle_def=no, ac_cv_decl_setproctitle_def=yes) 550]) 551if test "$ac_cv_decl_setproctitle_def" = yes; then 552 AC_DEFINE(HAVE_SETPROCTITLE_DEF,1,[setproctitle defined]) 553fi 554 555 556dnl ---------------------------------------------------------------------------- 557dnl sys_siglist array (list of signals) 558 559 560 561AC_CACHE_CHECK(for sys_siglist array, 562ac_cv_sys_siglist, 563[AC_TRY_LINK([ 564#include <stdio.h>], 565[extern int sys_siglist; printf("%d",sys_siglist);], 566ac_cv_sys_siglist=yes, ac_cv_sys_siglist=no) 567]) 568if test "$ac_cv_sys_siglist" = yes; then 569 AC_DEFINE(HAVE_SYS_SIGLIST,1,[have sys_syslist]) 570 AC_CACHE_CHECK(for sys_siglist declaration, 571 ac_cv_decl_sys_siglist_def, 572 [AC_TRY_COMPILE([ 573#include <stdio.h> 574#include <sys/types.h> 575#ifdef HAVE_STDLIB_H 576#include <stdlib.h> 577#endif 578#ifdef HAVE_UNISTD_H 579#include <unistd.h> 580#endif 581#ifdef HAVE_SYS_SIGNAL_H 582#include <sys/signal.h> 583#endif 584#include <signal.h>], 585 [printf("%s",sys_siglist[0]);], 586 ac_cv_decl_sys_siglist_def=yes, ac_cv_decl_sys_siglist_def=no) 587 ]) 588 if test "$ac_cv_decl_sys_siglist_def" = yes; then 589 AC_DEFINE(HAVE_SYS_SIGLIST_DEF,1,[sys_siglist defined]) 590 ac_cv_sys_siglist=yes 591 fi 592else 593AC_CACHE_CHECK(for _sys_siglist array, 594ac_cv__sys_siglist, 595[AC_TRY_LINK([ 596#include <stdio.h>], 597[extern int _sys_siglist; printf("%d",_sys_siglist);], 598ac_cv__sys_siglist=yes, ac_cv__sys_siglist=no) 599]) 600if test "$ac_cv__sys_siglist" = yes; then 601 AC_DEFINE(HAVE__SYS_SIGLIST,1,[have _sys_siglist]) 602 AC_CACHE_CHECK(for _sys_siglist declaration, 603 ac_cv_decl__sys_siglist_def, 604 [AC_TRY_COMPILE([ 605#include <stdio.h> 606#include <sys/types.h> 607#ifdef HAVE_STDLIB_H 608#include <stdlib.h> 609#endif 610#ifdef HAVE_UNISTD_H 611#include <unistd.h> 612#endif 613#ifdef HAVE_SYS_SIGNAL_H 614#include <sys/signal.h> 615#endif 616#include <signal.h>], 617 [printf("%s",_sys_siglist[0]);], 618 ac_cv_decl__sys_siglist_def=yes, ac_cv_decl__sys_siglist_def=no) 619 ]) 620 if test "$ac_cv_decl__sys_siglist_def" = yes; then 621 AC_DEFINE(HAVE__SYS_SIGLIST_DEF,1,[_sys_siglist defined]) 622 ac_cv__sys_siglist=yes 623 fi 624fi 625fi 626 627dnl ---------------------------------------------------------------------------- 628dnl just for (really) backwards compatibility 629dnl we really try not to use union wait -- it's heinously unportable. 630dnl nicked this check from Tcl as well. ; 631dnl 632dnl The check below checks whether <sys/wait.h> defines the type 633dnl "union wait" correctly. It's needed because of weirdness in 634dnl HP-UX where "union wait" is defined in both the BSD and SYS-V 635dnl environments. Checking the usability of WIFEXITED seems to do 636dnl the trick. 637 638AC_CACHE_CHECK(for obsolete union wait compatibility, 639ac_cv_unionwait, 640[ 641AC_TRY_COMPILE([ 642#ifdef HAVE_CTYPES_H 643#include <ctypes.h> 644#endif 645#include <sys/types.h> 646#include <sys/wait.h>], [union wait x;WIFEXITED(x);], 647ac_cv_unionwait=yes, ac_cv_unionwait=no) 648]) 649if test "$ac_cv_unionwait" = yes; then 650 AC_DEFINE(HAVE_UNION_WAIT,1,[have union wait]) 651fi 652 653dnl ---------------------------------------------------------------------------- 654dnl Would you believe the gethostname declarations are broken on some machines 655dnl ---------------------------------------------------------------------------- 656AC_CACHE_CHECK(for gethostname declaration, 657ac_cv_decl_gethostname_def, 658[AC_TRY_COMPILE([ 659#ifdef HAVE_CTYPES_H 660#include <ctypes.h> 661#endif 662#ifdef HAVE_STDIO_H 663#include <stdio.h> 664#endif 665#ifdef HAVE_STDLIB_H 666#include <stdlib.h> 667#endif 668#ifdef HAVE_UNISTD_H 669#include <unistd.h> 670#endif],[gethostname(1);], 671ac_cv_decl_gethostname_def=no, ac_cv_decl_gethostname_def=yes) 672]) 673if test "$ac_cv_decl_gethostname_def" = yes; then 674 AC_DEFINE(HAVE_GETHOSTNAME_DEF,1,[have gethostname definition]) 675fi 676 677dnl ---------------------------------------------------------------------------- 678dnl innetgr() declarations missing 679dnl ---------------------------------------------------------------------------- 680AC_CACHE_CHECK(for innetgr declaration, 681ac_cv_decl_innetgr_def, 682[ 683AC_TRY_COMPILE([ 684#ifdef HAVE_CTYPES_H 685#include <ctypes.h> 686#endif 687#ifdef HAVE_STDIO_H 688#include <stdio.h> 689#endif 690#ifdef HAVE_STDLIB_H 691#include <stdlib.h> 692#endif 693#ifdef HAVE_UNISTD_H 694#include <unistd.h> 695#endif 696#ifdef HAVE_NETDB_H 697#include <netdb.h> 698#endif],[printf("%d", innetgr(1));], 699ac_cv_decl_innetgr_def=no, ac_cv_decl_innetgr_def=yes ) 700] 701) 702if test "$ac_cv_decl_innetgr_def" = yes; then 703 AC_DEFINE(HAVE_INNETGR_DEF,1,[use innetgr(1)]) 704fi 705 706dnl ---------------------------------------------------------------------------- 707dnl openlog() declarations missing 708dnl ---------------------------------------------------------------------------- 709AC_CACHE_CHECK(for openlog declaration, 710ac_cv_decl_openlog_def, 711[AC_TRY_COMPILE([ 712#include <stdio.h> 713#ifdef HAVE_CTYPES_H 714#include <ctypes.h> 715#endif 716#ifdef HAVE_STDARG_H 717#include <stdarg.h> 718#endif 719#ifdef HAVE_SYSLOG_H 720#include <syslog.h> 721#endif],[printf("%d",openlog);], 722ac_cv_decl_openlog_def=yes, ac_cv_decl_openlog_def=no) 723]) 724if test "$ac_cv_decl_openlog_def" = yes; then 725 AC_DEFINE(HAVE_OPENLOG_DEF,1,[have openlog definition]) 726fi 727 728 729dnl ---------------------------------------------------------------------------- 730dnl syslog() declarations missing 731dnl ---------------------------------------------------------------------------- 732AC_CACHE_CHECK(for syslog declaration, 733ac_cv_decl_syslog_def, 734[AC_TRY_COMPILE([ 735#include <stdio.h> 736#ifdef HAVE_STDARG_H 737#include <stdarg.h> 738#endif 739#ifdef HAVE_SYSLOG_H 740#include <syslog.h> 741#endif],[printf("%d",syslog);], 742ac_cv_decl_syslog_def=yes, ac_cv_decl_syslog_def=no) 743]) 744if test "$ac_cv_decl_syslog_def" = yes; then 745 AC_DEFINE(HAVE_SYSLOG_DEF,1,[have syslog definition]) 746fi 747 748dnl ---------------------------------------------------------------------------- 749dnl IPV6 - check for structure declarations 750dnl ---------------------------------------------------------------------------- 751 752AC_CACHE_CHECK(for struct in6_addr declaration, 753ac_cv_decl_in6_addr_def, 754[AC_TRY_COMPILE([ 755#ifdef HAVE_CTYPES_H 756#include <ctypes.h> 757#endif 758#include <sys/types.h> 759#include <sys/socket.h> 760#include <netinet/in.h>],[struct in6_addr v;], 761ac_cv_decl_in6_addr_def=yes, ac_cv_decl_in6_addr_def=no) 762]) 763if test "$ac_cv_decl_in6_addr_def" = yes; then 764 AC_DEFINE(IN6_ADDR,1,[in6_addr defined]) 765 AC_DEFINE(IPV6,1,[ipV6]) 766fi 767 768 769AC_CACHE_CHECK([for struct in_addr6 declaration (LINUX)], 770ac_cv_decl_in_addr6_def, 771[AC_TRY_COMPILE([ 772#ifdef HAVE_CTYPES_H 773#include <ctypes.h> 774#endif 775#include <sys/types.h> 776#include <sys/socket.h> 777#include <netinet/in.h>],[struct in_addr6 v;], 778ac_cv_decl_in_addr6_def=yes, ac_cv_decl_in_addr6_def=no) 779]) 780if test "$ac_cv_decl_in_addr6_def" = yes; then 781 AC_DEFINE(IN_ADDR6,1,[in_addr6 defined]) 782 AC_DEFINE(IPV6,1,[ipV6]) 783fi 784 785dnl ---------------------------------------------------------------------------- 786dnl struct stat can have a st_mtime_nsec field 787dnl ---------------------------------------------------------------------------- 788 789 790AC_CACHE_CHECK(for struct stat has st_mtimespec.tv_nsec, 791ac_cv_decl_st_mtimespec_tv_nsec, 792[AC_TRY_COMPILE([ 793#ifdef HAVE_CTYPES_H 794#include <ctypes.h> 795#endif 796#include <sys/types.h> 797#ifdef HAVE_SYS_TIME_H 798#include <sys/time.h> 799#endif 800#include <sys/stat.h>],[struct stat statb; statb.st_mtimespec.tv_nsec;], 801ac_cv_decl_st_mtimespec_tv_nsec=yes, 802ac_cv_decl_st_mtimespec_tv_nsec=no) 803]) 804if test "$ac_cv_decl_st_mtimespec_tv_nsec" = yes; then 805 AC_DEFINE_UNQUOTED(ST_MTIMESPEC_TV_NSEC,1,[stat st_mtimespec.tv_nsec present]) 806fi 807 808AC_CACHE_CHECK(for struct stat has st_mtimensec, 809ac_cv_decl_st_mtimensec, 810[AC_TRY_COMPILE([ 811#ifdef HAVE_CTYPES_H 812#include <ctypes.h> 813#endif 814#include <sys/types.h> 815#if defined(HAVE_SYS_TIME_H) 816#include <sys/time.h> 817#endif 818#include <sys/stat.h>],[struct stat statb; statb.st_mtimensec;], 819ac_cv_decl_st_mtimensec=yes, 820ac_cv_decl_st_mtimensec=no) 821]) 822if test "$ac_cv_decl_st_mtimensec" = yes; then 823 AC_DEFINE_UNQUOTED(ST_MTIMENSEC,1,[struct st_mtimensec present]) 824fi 825 826dnl ---------------------------------------------------------------------------- 827 828AC_CACHE_CHECK(for strcasecmp definition, 829ac_cv_decl_strcasecmp, 830[AC_TRY_COMPILE([ 831#ifdef HAVE_CTYPES_H 832#include <ctypes.h> 833#endif 834#if defined(HAVE_STDLIB_H) 835#include <stdlib.h> 836#endif 837#if defined(HAVE_STRING_H) 838#include <string.h> 839#endif 840#if defined(HAVE_STRINGS_H) 841#include <strings.h> 842#endif 843],[strcasecmp(1)], 844ac_cv_decl_strcasecmp=no, 845ac_cv_decl_strcasecmp=yes) 846]) 847if test "$ac_cv_decl_strcasecmp" = yes; then 848 AC_DEFINE_UNQUOTED(HAVE_STRCASECMP_DEF,1,[have strcasecmp definition]) 849fi 850 851dnl ---------------------------------------------------------------------------- 852 853AC_CACHE_CHECK(for flock definition, 854ac_cv_decl_flock, 855[AC_TRY_COMPILE([ 856#ifdef HAVE_CTYPES_H 857#include <ctypes.h> 858#endif 859#if defined(HAVE_STDLIB_H) 860#include <stdlib.h> 861#endif 862#if defined(HAVE_SYS_FILE_H) 863#include <sys/file.h> 864#endif 865#if defined(HAVE_FCNTL_H) 866#include <fcntl.h> 867#endif 868],[flock(1)], 869ac_cv_decl_flock=no, 870ac_cv_decl_flock=yes) 871]) 872if test "$ac_cv_decl_flock" = yes; then 873 AC_DEFINE_UNQUOTED(HAVE_FLOCK_DEF,1,[have flock definition]) 874fi 875 876dnl ---------------------------------------------------------------------------- 877 878AC_PROG_INSTALL 879AC_CHECK_PROG(INSTALL_MAN,auxman,auxman,[$INSTALL -m 644]) 880 881AC_PROG_MAKE_SET 882 883dnl ----------------- force this to be Bourne Shell for now --------------- 884AC_MSG_CHECKING(for shell) 885SHELL=/bin/sh 886AC_MSG_RESULT(using $SHELL (FORCED)) 887 888MY_GETTEXT 889 890dnl ---------------------------------------------------------------------------- 891dnl ----------------- END OF GENERAL CONFIGURATION --------------------------- 892 893dnl check to see if tcp wrappers required 894AC_MSG_CHECKING(use tcp wrappers) 895AC_ARG_ENABLE( tcpwrappers, 896AS_HELP_STRING([--enable-tcpwrappers],[use tcp wrappers (-lwrap)]), 897[ 898if test "$enableval" = "yes" ; then 899 v=yes 900 AC_CHECK_HEADERS(tcpd.h, 901 [AC_DEFINE(HAVE_TCPD_H,1,[have tcpd])], 902 [AC_MSG_ERROR(tcpd.h not found); 903 v=no; 904 ] 905 ) 906 AC_CHECK_LIB(wrap, request_init, 907 [LIBS="-lwrap $LIBS"], 908 [AC_MSG_ERROR(request_init not found in -wrap library); 909 v=no; 910 ] 911 ) 912else 913 v=no; 914fi 915], 916[ 917 v=no; 918] 919) 920 921if test "$v" = "yes" ; then 922 AC_DEFINE(TCPWRAPPERS,1,[tcpwrappers]) 923fi 924AC_MSG_RESULT($v);dnl 925 926dnl check to see if ssl is disabled 927SSL_EXPLICITLY_ENABLED="" 928AC_MSG_CHECKING(if ssl authentication is disabled) 929AC_ARG_ENABLE( ssl, 930AS_HELP_STRING([--disable-ssl],[disable ssl support]), 931[ 932if test "$enableval" = "yes" ; then 933 v=enabled; SSL_ENABLE=1; 934 SSL_EXPLICITLY_ENABLED=1; 935else 936 v=disabled; SSL_ENABLE=; 937fi 938], 939[ 940 v=enabled; SSL_ENABLE=1; 941], 942) 943AC_MSG_RESULT($v);dnl 944 945dnl This does far too much by hand, try to just check for 946dnl the headers and libs... 947 948if test "$SSL_ENABLE" != ""; then 949 AC_CHECK_HEADER([openssl/ssl.h], [true], [SSL_ENABLE=""]) 950fi 951 952SSL_LDADD="" 953if test "$SSL_ENABLE" != ""; then 954 AC_CHECK_LIB([crypto], [RC4_set_key], [true], [SSL_ENABLE=""]) 955fi 956if test "$SSL_ENABLE" != ""; then 957 AC_CHECK_LIB([ssl], [SSL_load_error_strings], [true], [SSL_ENABLE=""], [-lcrypto]) 958fi 959if test "$SSL_ENABLE" != ""; then 960 SSL_LDADD="-lssl -lcrypto" 961elif test "$SSL_EXPLICITLY_ENABLED" != ""; then 962 AC_MSG_ERROR([Unable to use OpenSSL]) 963fi 964AC_SUBST(SSL_LDADD) 965AM_CONDITIONAL(WITHSSL, test "$SSL_ENABLE" != "") 966test "$SSL_ENABLE" != "" && AC_DEFINE(SSL_ENABLE,1,[ssl enabled]) 967 968 969dnl ssl certificate authority CERT file 970dnl 971AC_MSG_CHECKING(ssl Certificate Authority CERT file) 972AC_ARG_WITH(ssl_ca_file, 973AS_HELP_STRING([--with-ssl_ca_file=FILE],[ssl Certificate Authority CERT file (default ${configdir}/ssl.ca/ca.crt)]), 974SSL_CA_FILE=$withval, 975SSL_CA_FILE=\${configdir}/ssl.ca/ca.crt, 976) 977AC_MSG_RESULT($SSL_CA_FILE) 978AC_SUBST(SSL_CA_FILE) 979 980dnl ssl certificate authority private key file 981dnl 982AC_MSG_CHECKING(ssl Certificate Authority private key file) 983AC_ARG_WITH(ssl_ca_key, 984AS_HELP_STRING([--with-ssl_ca_key=KEY],[ssl Certificate Authority private key file (default ${configdir}/ssl.ca/ca.key)]), 985SSL_CA_KEY=$withval, 986SSL_CA_KEY=\${configdir}/ssl.ca/ca.key, 987) 988AC_MSG_RESULT($SSL_CA_KEY) 989AC_SUBST(SSL_CA_KEY) 990 991dnl ssl certificate authority certs working directory 992dnl 993AC_MSG_CHECKING(ssl Certificate Authority certs working directory) 994AC_ARG_WITH(ssl_certs_dir, 995AS_HELP_STRING([--with-ssl_certs_dir=DIR],[ssl Certificate Authority certs working directory (default ${configdir}/ssl.certs/)]), 996SSL_CERTS_DIR=$withval, 997SSL_CERTS_DIR=\${configdir}/ssl.certs, 998) 999AC_MSG_RESULT($SSL_CERTS_DIR) 1000AC_SUBST(SSL_CERTS_DIR) 1001 1002dnl ssl certificate revocation list 1003dnl 1004AC_MSG_CHECKING(ssl Certificate Revocation List (CRL) file) 1005AC_ARG_WITH(ssl_crl_file, 1006AS_HELP_STRING([--with-ssl_crl_file=PATH],[ssl Certificate Revocation List File (default ${configdir}/ssl.crl/ssl.crl)]), 1007SSL_CRL_FILE=$withval, 1008SSL_CRL_FILE=\${configdir}/ssl.crl/ssl.crl, 1009) 1010AC_MSG_RESULT($SSL_CRL_FILE) 1011AC_SUBST(SSL_CRL_FILE) 1012 1013dnl ssl server certificate file 1014dnl 1015AC_MSG_CHECKING(ssl server certificate file) 1016AC_ARG_WITH(ssl_server_cert, 1017AS_HELP_STRING([--with-ssl_server_cert=FILE],[ssl server certificate file (default ${configdir}/ssl.server/server.crt)]), 1018SSL_SERVER_CERT=$withval, 1019SSL_SERVER_CERT=\${configdir}/ssl.server/server.crt, 1020) 1021AC_MSG_RESULT($SSL_SERVER_CERT) 1022AC_SUBST(SSL_SERVER_CERT) 1023 1024dnl ssl server password file for private key file 1025dnl 1026AC_MSG_CHECKING(ssl server password file for private key file) 1027AC_ARG_WITH(ssl_server_password_file, 1028AS_HELP_STRING([--with-ssl_server_password_file=FILE],[ssl server private key in password file (default ${configdir}/ssl.server/server.pwd)]), 1029SSL_SERVER_PASSWORD_FILE=$withval, 1030SSL_SERVER_PASSWORD_FILE=\${configdir}/ssl.server/server.pwd, 1031) 1032AC_MSG_RESULT($SSL_SERVER_PASSWORD_FILE) 1033AC_SUBST(SSL_SERVER_PASSWORD_FILE) 1034 1035dnl ---------------------------------------------------------------------------- 1036dnl ---------------- START OF KERBEROS ----------------------------------------- 1037 1038dnl Kerberos stuff again 1039 1040KRB_LIBS="" 1041SAVELIBS="$LIBS" 1042 1043 1044if test -n "$KERBEROS" ; then 1045 echo "Kerberos checks with CFLAGS '$CFLAGS', CPPFLAGS '$CPPFLAGS', LDFLAGS '$LDFLAGS" 1046 if test -d /usr/kerberos/include; then 1047 CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 1048 fi 1049 if test -d /usr/kerberos/lib; then 1050 LDFLAGS="-L/usr/kerberos/lib $LDFLAGS" 1051 fi 1052 dnl Kerberos 5 - release 1.1.1 1053 found= 1054 AC_CHECK_HEADERS(krb5.h,found=yes) 1055 if test "$found" != "yes" ; then 1056 AC_MSG_ERROR([ 1057Kerberos 5 support wanted and cannot find krb5.h include file 1058use configure --disable-kerberos-checks or check your Kerberos 5 installation 1059If you have installed kerberos in /usr/local/{lib,include} then use 1060configure --enable-kerberos CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib 1061]) 1062 fi 1063 1064 if test "$KERBEROS_CHECKS" = 1 ; then 1065 dnl we have the Kerberos 5 package, lets try for the rest 1066 AC_TRY_COMPILE([ 1067 #include <stdio.h> 1068 #include <krb5.h> 1069 ], [printf("%d",sizeof(HostAddress));], 1070 heimdal=yes, heimdal=no) 1071 if test $heimdal = yes; then 1072 AC_MSG_WARN(compiling with CFLAGS $CFLAGS, CPPFLAGS $CPPFLAGS) 1073 AC_MSG_ERROR(You appear to be using the Heimdal Kerberos krb5.h file. You must use MIT Kerberos with LPRng) 1074 fi 1075 1076 dnl we check for the library we need to use 1077 dnl courtesy of mandrake linux and friends. 1078 dnl Christian Zoffoli <czoffoli@linux-mandrake.com> 1079 1080 found=no 1081 if test "$found" "!=" "yes" ; then 1082 found=yes 1083 KRB_LIBS="-lkrb5 -lk5crypto -lcom_err" 1084 LIBS=" $KRB_LIBS $SAVELIBS" 1085 AC_CHECKING(for krb5_init_context in $LIBS ) 1086 AC_TRY_LINK_FUNC(krb5_init_context,,found="no") 1087 AC_CHECKING(for krb5_encrypt_size in $LIBS ) 1088 AC_TRY_LINK_FUNC(krb5_encrypt_size,,found="no") 1089 fi; 1090 if test "$found" "!=" "yes" ; then 1091 found=yes 1092 KRB_LIBS="-lkrb5 -lcrypto -lcom_err" 1093 LIBS=" $KRB_LIBS $SAVELIBS" 1094 AC_CHECKING(for krb5_init_context in $LIBS ) 1095 AC_TRY_LINK_FUNC(krb5_init_context,,found="no") 1096 AC_CHECKING(for krb5_encrypt_size in $LIBS ) 1097 AC_TRY_LINK_FUNC(krb5_encrypt_size,,found="no") 1098 fi; 1099 if test "$found" "!=" "yes" ; then 1100 AC_PATH_PROG(KRB5CONFIG, krb5-config) 1101 found=yes 1102 KRB_LIBS="$($KRB5CONFIG --libs krb5)" 1103 LIBS=" $KRB_LIBS $SAVELIBS" 1104 AC_CHECKING(for krb5_init_context in $LIBS ) 1105 AC_TRY_LINK_FUNC(krb5_init_context,,found="no") 1106 AC_CHECKING(for krb5_encrypt_size in $LIBS ) 1107 AC_TRY_LINK_FUNC(krb5_encrypt_size,,found="no") 1108 fi; 1109 if test "$found" "!=" "yes" ; then 1110 AC_MSG_WARN(Kerberos 5 library does not have krb5_init_context and krb5_encrypt_size or ) 1111 AC_MSG_WARN(use configure --disable-kerberos or check your Kerberos 5 installation) 1112 exit 1 1113 fi 1114 AC_MSG_RESULT(found in $LIBS) 1115 1116 AC_CHECK_FUNC(krb5_read_message,AC_DEFINE_UNQUOTED(HAVE_KRB5_READ_MESSAGE,1,[have krb5_read_message]),[AC_MSG_WARN(Kerberos 5 library does not have krb5_read_message)]) 1117 1118 fi 1119 1120 AC_CHECK_FUNCS(krb5_free_data_contents) 1121 1122 AC_CACHE_CHECK(for krb5_xfree, 1123 ac_cv_krb5_xfree, 1124 [AC_TRY_LINK([ 1125 # define KRB5_DEPRECATED 1 1126 #if defined(HAVE_KRB5_H) 1127 #include <krb5.h> 1128 #endif 1129 ],[krb5_xfree((void *)0);], 1130 ac_cv_krb5_xfree=yes, 1131 ac_cv_krb5_xfree=no) 1132 ]) 1133 if test "$ac_cv_krb5_xfree" = yes; then 1134 AC_DEFINE_UNQUOTED(HAVE_KRB5_XFREE,1,[have krb5_xfree]) 1135 fi 1136 1137 AC_CACHE_CHECK(for krb_xfree, 1138 ac_cv_krb_xfree, 1139 [AC_TRY_LINK([ 1140 # define KRB5_DEPRECATED 1 1141 #if defined(HAVE_KRB5_H) 1142 #include <krb5.h> 1143 #endif 1144 ],[krb_xfree((void *)0);], 1145 ac_cv_krb_xfree=yes, 1146 ac_cv_krb_xfree=no) 1147 ]) 1148 if test "$ac_cv_krb_xfree" = yes; then 1149 AC_DEFINE_UNQUOTED(HAVE_KRB_XFREE,1,[have krb_xfree]) 1150 fi 1151 1152 LIBS="$SAVELIBS" 1153fi; 1154AC_SUBST(KRB_LIBS) 1155 1156dnl ---------------------------------------------------------------------------- 1157dnl ---------------- END OF KERBEROS ----------------------------------------- 1158 1159CHECK_PLUGINS 1160 1161dnl ---------------------------------------------------------------------------- 1162dnl ----------------- START OF OUTPUT ------------------------------------------ 1163 1164AC_OUTPUT( 1165[ 1166Makefile 1167UTILS/LPRng.pm 1168UTILS/Makefile 1169UTILS/accounting.pl 1170UTILS/decode_args_with_perl 1171UTILS/decode_args_with_sh 1172UTILS/fixid 1173UTILS/fixupdate 1174UTILS/lpq_in_perl 1175UTILS/lpr_in_perl 1176UTILS/lprm_in_perl 1177UTILS/make_lpd_conf 1178UTILS/make_printcap_use 1179UTILS/makeinc 1180UTILS/read_conf 1181UTILS/remote_active 1182UTILS/test_read 1183UTILS/update_z.pl 1184man/Makefile 1185src/Makefile 1186src/pclbanner 1187src/psbanner 1188po/Makefile 1189conf/Makefile 1190conf/lpd.perms 1191], 1192[ 1193for i in \ 1194UTILS/LPRng.pm \ 1195UTILS/accounting.pl \ 1196UTILS/decode_args_with_perl \ 1197UTILS/decode_args_with_sh \ 1198UTILS/fixid \ 1199UTILS/fixupdate \ 1200UTILS/lpq_in_perl \ 1201UTILS/lpr_in_perl \ 1202UTILS/lprm_in_perl \ 1203UTILS/make_lpd_conf \ 1204UTILS/make_printcap_use \ 1205UTILS/makeinc \ 1206UTILS/read_conf \ 1207UTILS/remote_active \ 1208UTILS/test_read \ 1209UTILS/update_z.pl \ 1210; do chmod +x $i ; done 1211] 1212 1213) 1214 1215dnl ---------------------------------------------------------------------------- 1216dnl ----------------- END OF OUTPUT -------------------------------------------- 1217