2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Add checks for getprognam(), __progname and err.h

This commit is contained in:
Todd C. Miller 2003-04-02 18:15:25 +00:00
parent b51c124116
commit d64a83b41e
2 changed files with 25 additions and 1 deletions

View File

@ -75,6 +75,9 @@
/* Define to 1 if you have the `dispcrypt' function. */
#undef HAVE_DISPCRYPT
/* Define to 1 if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define to 1 if you have the `flock' function. */
#undef HAVE_FLOCK
@ -103,6 +106,9 @@
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
/* Define to 1 if you have the `getprogname' function. */
#undef HAVE_GETPROGNAME
/* Define if you have the `getprpwnam' function. (SecureWare-style shadow
passwords) */
#undef HAVE_GETPRPWNAM
@ -324,6 +330,9 @@
/* Define to 1 if you have the `_innetgr' function. */
#undef HAVE__INNETGR
/* Define if your crt0.o defines the __progname symbol for you. */
#undef HAVE___PROGNAME
/* Define if you want the hostname to be entered into the log file. */
#undef HOST_IN_LOG

View File

@ -1587,6 +1587,7 @@ dnl
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h)
AC_CHECK_HEADERS(err.h, , [AC_LIBOBJ(err)])
dnl ultrix termio/termios are broken
if test "$OS" != "ultrix"; then
AC_SYS_POSIX_TERMIOS
@ -1692,7 +1693,21 @@ dnl
if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
AC_FUNC_ALLOCA
fi
dnl
dnl Check for getprogname() or __progname
dnl
AC_CHECK_FUNCS(getprogname, , [
AC_MSG_CHECKING([for __progname])
AC_CACHE_VAL(sudo_cv___progname, [
AC_TRY_LINK(, [extern char *__progname; (void)puts(__progname);],
[sudo_cv___progname=yes], [sudo_cv___progname=no])])
if test "$sudo_cv___progname" = "yes"; then
AC_DEFINE(HAVE___PROGNAME, 1, [Define if your crt0.o defines the __progname symbol for you.])
else
AC_LIBOBJ(getprogname)
fi
AC_MSG_RESULT($sudo_cv___progname)
])
dnl
dnl Kerberos IV
dnl