From: Todd C. Miller Date: Fri, 10 Jun 2011 19:30:00 +0000 (-0400) Subject: Only enable Solaris project support when setproject() is present in X-Git-Tag: SUDO_1_7_7~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9524471f50a8443519f26873822e7aa7575deca1;p=sudo Only enable Solaris project support when setproject() is present in libproject. --HG-- branch : 1.7 --- diff --git a/configure b/configure index 597e09ce7..eefb8100f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for sudo 1.7.6. +# Generated by GNU Autoconf 2.65 for sudo 1.7.6p2. # # Report bugs to . # @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sudo' PACKAGE_TARNAME='sudo' -PACKAGE_VERSION='1.7.6' -PACKAGE_STRING='sudo 1.7.6' +PACKAGE_VERSION='1.7.6p2' +PACKAGE_STRING='sudo 1.7.6p2' PACKAGE_BUGREPORT='http://www.sudo.ws/bugs/' PACKAGE_URL='' @@ -1559,7 +1559,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sudo 1.7.6 to adapt to many kinds of systems. +\`configure' configures sudo 1.7.6p2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1624,7 +1624,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sudo 1.7.6:";; + short | recursive ) echo "Configuration of sudo 1.7.6p2:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sudo configure 1.7.6 +sudo configure 1.7.6p2 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2538,7 +2538,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sudo $as_me 1.7.6, which was +It was created by sudo $as_me 1.7.6p2, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -14481,11 +14481,52 @@ fi if test ${with_project-'no'} != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "project.h" "ac_cv_header_project_h" "$ac_includes_default" if test "x$ac_cv_header_project_h" = x""yes; then : - $as_echo "#define HAVE_PROJECT_H 1" >>confdefs.h - SUDO_LIBS="${SUDO_LIBS} -lproject" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5 +$as_echo_n "checking for setproject in -lproject... " >&6; } +if test "${ac_cv_lib_project_setproject+set}" = set; then : + $as_echo_n "(cached) " >&6 else - - + ac_check_lib_save_LIBS=$LIBS +LIBS="-lproject $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setproject (); +int +main () +{ +return setproject (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_project_setproject=yes +else + ac_cv_lib_project_setproject=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5 +$as_echo "$ac_cv_lib_project_setproject" >&6; } +if test "x$ac_cv_lib_project_setproject" = x""yes; then : + + $as_echo "#define HAVE_PROJECT_H 1" >>confdefs.h + + SUDO_LIBS="${SUDO_LIBS} -lproject" + +fi + + fi @@ -19320,7 +19361,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sudo $as_me 1.7.6, which was +This file was extended by sudo $as_me 1.7.6p2, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19386,7 +19427,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sudo config.status 1.7.6 +sudo config.status 1.7.6p2 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 5be414e7a..80a5e73ec 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Process this file with GNU autoconf to produce a configure script. dnl dnl Copyright (c) 1994-1996,1998-2011 Todd C. Miller dnl -AC_INIT([sudo], [1.7.6], [http://www.sudo.ws/bugs/], [sudo]) +AC_INIT([sudo], [1.7.6p2], [http://www.sudo.ws/bugs/], [sudo]) AC_CONFIG_HEADER(config.h pathnames.h zlib/zconf.h) dnl dnl Note: this must come after AC_INIT @@ -1931,8 +1931,12 @@ if test ${with_logincap-'no'} != "no"; then ]) fi if test ${with_project-'no'} != "no"; then - AC_CHECK_HEADER(project.h, AC_DEFINE(HAVE_PROJECT_H) - [SUDO_LIBS="${SUDO_LIBS} -lproject"], -) + AC_CHECK_HEADER(project.h, [ + AC_CHECK_LIB(project, setproject, [ + AC_DEFINE(HAVE_PROJECT_H) + SUDO_LIBS="${SUDO_LIBS} -lproject" + ]) + ], []) fi dnl dnl typedef checks