]> granicus.if.org Git - sudo/commitdiff
Fix setting of plugin dir
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 20 Feb 2010 18:20:57 +0000 (13:20 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 20 Feb 2010 18:20:57 +0000 (13:20 -0500)
configure
configure.in

index 55a6341a95cadb991b81cfda4d28c95eb5b39f73..b65c28e0701b84e7da2e35106616a623a26bc968 100755 (executable)
--- a/configure
+++ b/configure
@@ -3853,22 +3853,19 @@ fi
 fi
 
 
-PLUGINDIR="$libexecdir"
+with_plugindir="$libexecdir"
 
 # Check whether --with-plugin_dir was given.
 if test "${with_plugin_dir+set}" = set; then
   withval=$with_plugin_dir; case $with_plugin_dir in
-    yes)       ;;
-    no)                ;;
-    *)         PLUGINDIR="$with_plugin_dir"
+    no)                { { echo "$as_me:$LINENO: error: \"illegal argument: --without-plugin_dir.\"" >&5
+echo "$as_me: error: \"illegal argument: --without-plugin_dir.\"" >&2;}
+   { (exit 1); exit 1; }; }
                ;;
+    *)         ;;
 esac
 fi
 
-cat >>confdefs.h <<EOF
-#define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR"
-EOF
-
 
 
 { echo "$as_me:$LINENO: checking whether to do user authentication by default" >&5
@@ -6494,7 +6491,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6497 "configure"' > conftest.$ac_ext
+  echo '#line 6494 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8358,11 +8355,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8361: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8358: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8365: \$? = $ac_status" >&5
+   echo "$as_me:8362: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8648,11 +8645,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8651: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8648: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8655: \$? = $ac_status" >&5
+   echo "$as_me:8652: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8752,11 +8749,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8755: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8752: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8759: \$? = $ac_status" >&5
+   echo "$as_me:8756: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11112,7 +11109,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11115 "configure"
+#line 11112 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11212,7 +11209,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11215 "configure"
+#line 11212 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -26202,6 +26199,11 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
     fi
+    eval PLUGINDIR="$with_plugindir"
+    cat >>confdefs.h <<EOF
+#define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR"
+EOF
+
     exec_prefix="$oexec_prefix"
 fi
 
index 1a15fb456200b7fff97241cbf764ffe832c5d97d..9734e19b19615842eafbebabd9ac90d0f139ada9 100644 (file)
@@ -1067,15 +1067,13 @@ if test X"$with_libvas" != X"no"; then
 fi
 ])
 
-PLUGINDIR="$libexecdir"
+with_plugindir="$libexecdir"
 AC_ARG_WITH(plugin_dir, [AS_HELP_STRING([--with-plugin_dir], [set directory to load plugins from])],
 [case $with_plugin_dir in
-    yes)       ;;
-    no)                ;;
-    *)         PLUGINDIR="$with_plugin_dir"
+    no)                AC_MSG_ERROR(["illegal argument: --without-plugin_dir."])
                ;;
+    *)         ;;
 esac])
-SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR")
 
 dnl
 dnl Options for --enable
@@ -2711,6 +2709,8 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
        eval sesh_file="$libexecdir/sesh"
        AC_DEFINE_UNQUOTED(_PATH_SUDO_SESH, "$sesh_file", [The fully qualified pathname of sesh])
     fi
+    eval PLUGINDIR="$with_plugindir"
+    SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR")
     exec_prefix="$oexec_prefix"
 fi