]> granicus.if.org Git - sudo/commitdiff
Only enable Solaris project support when setproject() is present in
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Jun 2011 19:30:00 +0000 (15:30 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Jun 2011 19:30:00 +0000 (15:30 -0400)
libproject.

--HG--
branch : 1.7

configure
configure.in

index 597e09ce7aa3360f30e0ae261f201df58c50497d..eefb8100fc36df6bbc34413cb76f1a05218d4d1a 100755 (executable)
--- 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 <http://www.sudo.ws/bugs/>.
 #
@@ -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 $@
 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\\"
 
index 5be414e7aefe25cbb47faff46462b130e5b0b471..80a5e73ec06c0d712ac493598b259c83225af86d 100644 (file)
@@ -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 <Todd.Miller@courtesan.com>
 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