1 |
# Configuration for inetutils |
# Configuration for inetutils |
2 |
# |
# |
3 |
# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. |
# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. |
4 |
# |
# |
5 |
# Written by Miles Bader <miles@gnu.ai.mit.edu> |
# Written by Miles Bader <miles@gnu.ai.mit.edu> |
6 |
# |
# |
30 |
# config.h turns this on, so make sure it's on for our tests too |
# config.h turns this on, so make sure it's on for our tests too |
31 |
#CPPFLAGS=-D_BSD_SOURCE |
#CPPFLAGS=-D_BSD_SOURCE |
32 |
|
|
|
# Include files that we link into our own include directory from headers. |
|
|
# Initialize it with the things we always want to use. |
|
|
IU_CONFIG_LINKS([crypt.h, arpa/telnet.h, arpa/ftp.h, arpa/tftp.h, |
|
|
protocols/talkd.h, tftpsubs.h]) |
|
|
|
|
33 |
dnl For now, we always use libexecdir; later we may want to vary where the |
dnl For now, we always use libexecdir; later we may want to vary where the |
34 |
dnl daemons go. |
dnl daemons go. |
35 |
inetdaemondir='$(libexecdir)' |
inetdaemondir='$(libexecdir)' |
82 |
AM_INIT_AUTOMAKE |
AM_INIT_AUTOMAKE |
83 |
|
|
84 |
### Checks for programs. |
### Checks for programs. |
85 |
|
AC_PROG_CC |
86 |
|
gl_EARLY |
87 |
AC_AIX |
AC_AIX |
88 |
AC_CHECK_TOOL(AR, ar) |
AC_CHECK_TOOL(AR, ar) |
89 |
AC_ISC_POSIX |
AC_ISC_POSIX |
90 |
AC_MINIX |
AC_MINIX |
91 |
AC_PATH_PROG(RM, rm, rm) |
AC_PATH_PROG(RM, rm, rm) |
|
AC_PROG_CC |
|
92 |
AC_PROG_CPP |
AC_PROG_CPP |
93 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
94 |
AC_PROG_MAKE_SET |
AC_PROG_MAKE_SET |
95 |
AC_PROG_RANLIB |
AC_PROG_RANLIB |
96 |
AC_PROG_YACC |
AC_PROG_YACC |
97 |
|
|
98 |
|
dnl For gnulib |
99 |
|
gl_MODULES(xalloc snprintf obstack memcpy getpass getopt memset strerror malloc poll memcmp strdup realloc getusershell memmove setenv xgetcwd argp regex unlocked-io readutmp error) |
100 |
|
gl_INIT |
101 |
|
|
102 |
dnl __P is the standard name for the ansi-or-not-ansi arg-decl macro. |
dnl __P is the standard name for the ansi-or-not-ansi arg-decl macro. |
103 |
dnl We define our own version in <config.h> if the system doesn't supply one. |
dnl We define our own version in <config.h> if the system doesn't supply one. |
104 |
dnl NOTE: This check has to be done pretty early because we use __P in |
dnl NOTE: This check has to be done pretty early because we use __P in |
131 |
|
|
132 |
# See if a termcap library is available (under one of several names) |
# See if a termcap library is available (under one of several names) |
133 |
IU_LIB_TERMCAP |
IU_LIB_TERMCAP |
|
# If not, add a bogus version of tgetent to libinetutils, as that's the only |
|
|
# function actually used (to check terminal type validity), modulo any |
|
|
# dependencies from curses. |
|
|
if test -z "$LIBTERMCAP"; then |
|
|
# Some packages include termcap just ; |
|
|
# for those cases, we really don't need termcap. |
|
|
AC_LIBOBJ(stub_tgetent) |
|
|
fi |
|
134 |
|
|
135 |
# We want to use libreadline if it is available. However, it seems that the |
# We want to use libreadline if it is available. However, it seems that the |
136 |
# guile hackers have had problems because there is a Solaris libreadline |
# guile hackers have had problems because there is a Solaris libreadline |
327 |
dnl old 4.3BSD struct sockaddr, and used in grotty bsd talk protocol) |
dnl old 4.3BSD struct sockaddr, and used in grotty bsd talk protocol) |
328 |
AC_CHECK_TYPE(struct osockaddr, , |
AC_CHECK_TYPE(struct osockaddr, , |
329 |
[AC_DEFINE(HAVE_OSOCKADDR_H, 1, |
[AC_DEFINE(HAVE_OSOCKADDR_H, 1, |
330 |
[Define to one if you have <osockaddr.h>.]) |
[Define to one if you have <osockaddr.h>.])], |
|
IU_CONFIG_LINKS(osockaddr.h)], |
|
331 |
[#include <sys/types.h> |
[#include <sys/types.h> |
332 |
#include <sys/socket.h> ]) |
#include <sys/socket.h> ]) |
333 |
|
|
475 |
#define bzero(x,z) memset(x,0,z) |
#define bzero(x,z) memset(x,0,z) |
476 |
#endif]) |
#endif]) |
477 |
|
|
478 |
dnl Functions that we will define (in libinetutils) if necessary. |
dnl Functions that we will define if necessary. |
479 |
AC_REPLACE_FUNCS(getpass getusershell herror memcmp memcpy memmove memset \ |
AC_REPLACE_FUNCS(getpass getusershell memcmp memcpy memmove memset \ |
480 |
setenv strdup strcasecmp strsignal waitpid poll) |
setenv strdup poll) |
|
|
|
|
dnl Look for the functions typically defined by libutil (which of course may |
|
|
dnl not actually be in libutil), and and use our own versions if necesary. |
|
|
_SAVE_LIBS="$LIBS" |
|
|
LIBS="$LIBUTIL $LIBS" |
|
|
AC_REPLACE_FUNCS(login logout logwtmp openpty forkpty ruserok iruserok login_tty) |
|
|
LIBS="$_SAVE_LIBS" |
|
481 |
|
|
482 |
dnl Look for the crypt function itself (in libcrypt if possible) |
dnl Look for the crypt function itself (in libcrypt if possible) |
483 |
_SAVE_LIBS="$LIBS" |
_SAVE_LIBS="$LIBS" |
505 |
extern void memset __P ((void *mem, int val, size_t sz)); |
extern void memset __P ((void *mem, int val, size_t sz)); |
506 |
#endif]) |
#endif]) |
507 |
|
|
|
dnl FIXME: I don't understand this. |
|
|
dnl If revoke hasn't been defined yet, just define a dummy version |
|
|
AC_REPLACE_FUNCS(revoke) |
|
|
|
|
508 |
jm_INCLUDED_REGEX(libinetutils/regex.c) |
jm_INCLUDED_REGEX(libinetutils/regex.c) |
509 |
|
|
510 |
AC_CHECK_FUNC(_obstack_free, , |
AC_CHECK_FUNC(_obstack_free) |
|
[AC_LIBOBJ(obstack) |
|
|
IU_CONFIG_LINKS(obstack.h)]) |
|
511 |
|
|
512 |
dnl Use (posix) `setpgid' if it's around, otherwise assume a BSD setpgrp |
dnl Use (posix) `setpgid' if it's around, otherwise assume a BSD setpgrp |
513 |
AC_CHECK_FUNC(setpgid, , AC_DEFINE(setpgid, setpgrp, |
AC_CHECK_FUNC(setpgid, , AC_DEFINE(setpgid, setpgrp, |
515 |
|
|
516 |
dnl We use our own version of getopt (including our own header file) if the |
dnl We use our own version of getopt (including our own header file) if the |
517 |
dnl system one doesn't have getopt_long. |
dnl system one doesn't have getopt_long. |
518 |
AC_CHECK_FUNC(getopt_long, , |
AC_CHECK_FUNC(getopt_long) |
|
[AC_LIBOBJ(getopt) |
|
|
AC_LIBOBJ(getopt1) |
|
|
IU_CONFIG_LINKS(getopt.h)]) |
|
519 |
|
|
520 |
AC_CHECK_HEADER(poll.h, , [LINK_POLL_H=yes]) |
AC_CHECK_HEADER(poll.h) |
521 |
|
|
522 |
dnl Supply a version of poll() if the libray is missing. |
dnl Supply a version of poll() if the libray is missing. |
523 |
dnl syslogd uses poll() unconditionnaly. |
dnl syslogd uses poll() unconditionnaly. |
524 |
AC_CHECK_FUNC(poll, , |
AC_CHECK_FUNC(poll, , |
525 |
[AC_DEFINE(HAVE_POLL_H, 1, [Define to one if you have <poll.h>]) |
[AC_DEFINE(HAVE_POLL_H, 1, [Define to one if you have <poll.h>])]) |
|
AC_LIBOBJ(poll) |
|
|
LINK_POLL_H=yes]) |
|
|
|
|
|
if test "$LINK_POLL_H" = "yes"; then |
|
|
IU_CONFIG_LINKS(poll.h) |
|
|
fi |
|
|
|
|
|
dnl Supply versions of the BSD error reporting functions if the system doesn't |
|
|
AC_CHECK_FUNC(verrx, , |
|
|
[AC_LIBOBJ(err) |
|
|
IU_CONFIG_LINKS(err.h)]) |
|
|
|
|
|
dnl See if the __PROGNAME variable is defined, otherwise use our own. |
|
|
AC_CHECK_FUNC(__progname, |
|
|
[AC_DEFINE(HAVE___PROGNAME, 1, [Define to one if you have __progname])], |
|
|
[AC_LIBOBJ(__progname)]) |
|
526 |
|
|
527 |
dnl See if snprintf exists, otherwise just use a bogus version |
dnl See if snprintf exists, otherwise just use a bogus version |
528 |
AC_CHECK_FUNC(snprintf, |
AC_CHECK_FUNC(snprintf, |
529 |
[AC_DEFINE(HAVE_SNPRINTF, 1, [Define to one if you have snprintf])], |
[AC_DEFINE(HAVE_SNPRINTF, 1, [Define to one if you have snprintf])]) |
|
[AC_LIBOBJ(snprintf)]) |
|
530 |
|
|
531 |
dnl See if vsnprintf exists, otherwise use our own. |
dnl See if vsnprintf exists, otherwise use our own. |
532 |
AC_CHECK_FUNC(vsnprintf, |
AC_CHECK_FUNC(vsnprintf, |
533 |
[AC_DEFINE(HAVE_VSNPRINTF, 1, [Define to one if you have vsnprintf])], |
[AC_DEFINE(HAVE_VSNPRINTF, 1, [Define to one if you have vsnprintf])]) |
|
[AC_LIBOBJ(snprintf)]) |
|
534 |
|
|
535 |
AH_BOTTOM( |
AH_BOTTOM( |
536 |
[#ifndef HAVE_VSNPRINTF |
[#ifndef HAVE_VSNPRINTF |
544 |
#endif]) |
#endif]) |
545 |
|
|
546 |
dnl See if the system has strerror, and replace it if not |
dnl See if the system has strerror, and replace it if not |
547 |
AC_CHECK_FUNC(strerror, , [AC_LIBOBJ(strerror)]) |
AC_CHECK_FUNC(strerror) |
548 |
if test "$ac_cv_func_strerror" = no; then |
if test "$ac_cv_func_strerror" = no; then |
549 |
# No strerror, so see if the SYS_ERRLIST variable can be used by ours |
# No strerror, so see if the SYS_ERRLIST variable can be used by ours |
550 |
AC_CHECK_FUNC(sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST, 1, |
AC_CHECK_FUNC(sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST, 1, |
559 |
fi |
fi |
560 |
|
|
561 |
dnl See if the system has hstrerror, and replace it if not |
dnl See if the system has hstrerror, and replace it if not |
562 |
AC_CHECK_FUNC(hstrerror, , [AC_LIBOBJ(hstrerror)]) |
AC_CHECK_FUNC(hstrerror) |
563 |
if test "$ac_cv_func_hstrerror" = yes; then |
if test "$ac_cv_func_hstrerror" = yes; then |
564 |
AC_CHECK_DECL(hstrerror, , , [#include <netdb.h>]) |
AC_CHECK_DECL(hstrerror, , , [#include <netdb.h>]) |
565 |
else |
else |
605 |
[LOG_MAKEPRI LOG_PRI LOG_FAC], |
[LOG_MAKEPRI LOG_PRI LOG_FAC], |
606 |
AC_CHECK_TYPE(CODE, |
AC_CHECK_TYPE(CODE, |
607 |
AC_CHECK_DECL(prioritynames, |
AC_CHECK_DECL(prioritynames, |
608 |
AC_DEFINE(HAVE_SYSLOG_INTERNAL, 1, [FIXME]), |
AC_DEFINE(HAVE_SYSLOG_INTERNAL, 1, [FIXME]),, |
609 |
LINK_SYSLOG_INT_H=yes, |
iu_syslog_includes), , iu_syslog_includes),) |
|
iu_syslog_includes), |
|
|
LINK_SYSLOG_INT_H=yes, iu_syslog_includes), |
|
|
LINK_SYSLOG_INT_H=yes) |
|
610 |
undefine([iu_syslog_includes]) |
undefine([iu_syslog_includes]) |
611 |
|
|
|
if test "$LINK_SYSLOG_INT_H" = "yes"; then |
|
|
IU_CONFIG_LINKS(syslog-int.h) |
|
|
fi |
|
|
|
|
612 |
dnl Some systems don't declare common functions (especially if they return |
dnl Some systems don't declare common functions (especially if they return |
613 |
dnl int), at least in the expected header file. Check. |
dnl int), at least in the expected header file. Check. |
614 |
AC_CHECK_DECLS([fclose, pclose], , , [#include <stdio.h>]) |
AC_CHECK_DECLS([fclose, pclose], , , [#include <stdio.h>]) |
723 |
IU_CONFIG_PATHS($srcdir/paths, PATHDEFS_MAKE, PATHS_DEFS) |
IU_CONFIG_PATHS($srcdir/paths, PATHDEFS_MAKE, PATHS_DEFS) |
724 |
AH_BOTTOM( |
AH_BOTTOM( |
725 |
[/* Defaults for PATH_ variables. */ |
[/* Defaults for PATH_ variables. */ |
726 |
#include <include/confpaths.h>]) |
#include <confpaths.h>]) |
727 |
|
|
728 |
dnl Ok this is the end of the rope, even autoconf can't help. |
dnl Ok this is the end of the rope, even autoconf can't help. |
729 |
dnl For example on certain system login(1) will not work if we |
dnl For example on certain system login(1) will not work if we |
741 |
;; |
;; |
742 |
esac |
esac |
743 |
|
|
744 |
AC_CONFIG_FILES([Makefile libinetutils/Makefile libtelnet/Makefile glob/Makefile |
AC_CONFIG_FILES([Makefile lib/Makefile |
745 |
|
libinetutils/Makefile libtelnet/Makefile glob/Makefile |
746 |
libicmp/Makefile ping/Makefile ftp/Makefile ftpd/Makefile inetd/Makefile |
libicmp/Makefile ping/Makefile ftp/Makefile ftpd/Makefile inetd/Makefile |
747 |
rcp/Makefile |
rcp/Makefile |
748 |
rexecd/Makefile rlogin/Makefile rlogind/Makefile rsh/Makefile |
rexecd/Makefile rlogin/Makefile rlogind/Makefile rsh/Makefile |
749 |
rshd/Makefile logger/Makefile syslogd/Makefile talk/Makefile |
rshd/Makefile logger/Makefile syslogd/Makefile talk/Makefile |
750 |
talkd/Makefile telnet/Makefile telnetd/Makefile tftp/Makefile |
talkd/Makefile telnet/Makefile telnetd/Makefile tftp/Makefile |
751 |
tftpd/Makefile uucpd/Makefile gwhois/Makefile libls/Makefile |
tftpd/Makefile uucpd/Makefile gwhois/Makefile libls/Makefile |
752 |
include/confpaths.h:headers/confpaths.h.in |
confpaths.h:confpaths.h.in |
753 |
headers/Makefile |
headers/Makefile |
754 |
doc/Makefile doc/rfc/Makefile]) |
doc/Makefile doc/rfc/Makefile]) |
755 |
AC_OUTPUT |
AC_OUTPUT |