summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2016-11-17 10:16:51 -0700
committerTodd C. Miller <Todd.Miller@courtesan.com>2016-11-17 10:16:51 -0700
commite3fe0347b6d779a316fb18c49a6090918f092322 (patch)
treedbac45181fd85241f4ea490e2fef762d1e96d32e
parentdd1c7ecfcf3fd508a0745d06ade3e4e9a8aa092b (diff)
downloadsudo-e3fe0347b6d779a316fb18c49a6090918f092322.tar.gz
Use AX_APPEND_FLAG instead of SUDO_APPEND_CPPFLAGS and direct
modification of LDFLAGS.
-rw-r--r--MANIFEST1
-rw-r--r--aclocal.m41
-rwxr-xr-xconfigure1933
-rw-r--r--configure.ac56
-rw-r--r--m4/ax_append_flag.m471
-rw-r--r--m4/sudo.m431
6 files changed, 1730 insertions, 363 deletions
diff --git a/MANIFEST b/MANIFEST
index bb079b997..cb7146de8 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -205,6 +205,7 @@ lib/zlib/zlib.h
lib/zlib/zutil.c
lib/zlib/zutil.h
ltmain.sh
+m4/ax_append_flag.m4
m4/ax_check_compile_flag.m4
m4/ax_check_link_flag.m4
m4/ax_func_getaddrinfo.m4
diff --git a/aclocal.m4 b/aclocal.m4
index c2591690e..2be85ab2b 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -126,6 +126,7 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
| (ullmax / ull) | (ullmax % ull));]])
])
+m4_include([m4/ax_append_flag.m4])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_check_link_flag.m4])
m4_include([m4/ax_func_getaddrinfo.m4])
diff --git a/configure b/configure
index c68316cc0..22a3e9c1f 100755
--- a/configure
+++ b/configure
@@ -4255,17 +4255,36 @@ if test "${with_devel+set}" = set; then :
yes) { $as_echo "$as_me:${as_lineno-$LINENO}: Setting up for development: -Wall, flex, yacc" >&5
$as_echo "$as_me: Setting up for development: -Wall, flex, yacc" >&6;}
- case "${CPPFLAGS}" in
- *"-DSUDO_DEVEL"|*"-DSUDO_DEVEL ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-DSUDO_DEVEL"
- else
- CPPFLAGS="${CPPFLAGS} -DSUDO_DEVEL"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -DSUDO_DEVEL "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -DSUDO_DEVEL"; } >&5
+ (: CPPFLAGS already contains -DSUDO_DEVEL) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -DSUDO_DEVEL"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-DSUDO_DEVEL
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
DEVEL="true"
devdir=.
@@ -4426,17 +4445,36 @@ if test "${with_incpath+set}" = set; then :
$as_echo "$as_me: Adding ${with_incpath} to CPPFLAGS" >&6;}
for i in ${with_incpath}; do
- case "${CPPFLAGS}" in
- *"-I${i}"|*"-I${i} ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${i}"
- else
- CPPFLAGS="${CPPFLAGS} -I${i}"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${i} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${i}"; } >&5
+ (: CPPFLAGS already contains -I${i}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${i}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${i}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
done
;;
@@ -6772,7 +6810,38 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
case "$host_os" in
aix4.[23]|aix4.[23].*|aix[5-9]*)
- LDFLAGS="${LDFLAGS}${LDFLAGS+ }-Wl,-brtl"
+
+if ${LDFLAGS+:} false; then :
+
+ case " $LDFLAGS " in #(
+ *" -Wl,-brtl "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -Wl,-brtl"; } >&5
+ (: LDFLAGS already contains -Wl,-brtl) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS " -Wl,-brtl"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS=-Wl,-brtl
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
;;
esac
@@ -15095,8 +15164,38 @@ done
;;
*-dec-osf*)
# ignore envariables wrt dynamic lib path
- # XXX - sudo LDFLAGS instead?
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -Wl,-no_library_replacement"
+
+if ${SUDO_LDFLAGS+:} false; then :
+
+ case " $SUDO_LDFLAGS " in #(
+ *" -Wl,-no_library_replacement "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS already contains -Wl,-no_library_replacement"; } >&5
+ (: SUDO_LDFLAGS already contains -Wl,-no_library_replacement) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDO_LDFLAGS " -Wl,-no_library_replacement"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS=\"\$SUDO_LDFLAGS\""; } >&5
+ (: SUDO_LDFLAGS="$SUDO_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDO_LDFLAGS=-Wl,-no_library_replacement
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS=\"\$SUDO_LDFLAGS\""; } >&5
+ (: SUDO_LDFLAGS="$SUDO_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
: ${CHECKSIA='true'}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable sia support on Digital UNIX" >&5
@@ -15276,60 +15375,136 @@ _ACEOF
*-*-riscos*)
LIBS="${LIBS} -lsun -lbsd"
- case "${CPPFLAGS}" in
- *"-I/usr/include"|*"-I/usr/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I/usr/include"
- else
- CPPFLAGS="${CPPFLAGS} -I/usr/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+ case " $CPPFLAGS " in #(
+ *" -I/usr/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I/usr/include"; } >&5
+ (: CPPFLAGS already contains -I/usr/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
- case "${CPPFLAGS}" in
- *"-I/usr/include/bsd"|*"-I/usr/include/bsd ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I/usr/include/bsd"
- else
- CPPFLAGS="${CPPFLAGS} -I/usr/include/bsd"
- fi
- ;;
- esac
+ as_fn_append CPPFLAGS " -I/usr/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+ CPPFLAGS=-I/usr/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I/usr/include/bsd "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I/usr/include/bsd"; } >&5
+ (: CPPFLAGS already contains -I/usr/include/bsd) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I/usr/include/bsd"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I/usr/include/bsd
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
- case "${CPPFLAGS}" in
- *"-D_MIPS"|*"-D_MIPS ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-D_MIPS"
- else
- CPPFLAGS="${CPPFLAGS} -D_MIPS"
- fi
- ;;
- esac
+
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -D_MIPS "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -D_MIPS"; } >&5
+ (: CPPFLAGS already contains -D_MIPS) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -D_MIPS"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-D_MIPS
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
: ${mansectsu='1m'}
: ${mansectform='4'}
;;
*-*-isc*)
- case "${CPPFLAGS}" in
- *"-D_ISC"|*"-D_ISC ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-D_ISC"
- else
- CPPFLAGS="${CPPFLAGS} -D_ISC"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -D_ISC "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -D_ISC"; } >&5
+ (: CPPFLAGS already contains -D_ISC) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -D_ISC"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-D_ISC
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
LIB_CRYPT=1
SUDOERS_LIBS="${SUDOERS_LIBS} -lcrypt"
@@ -15564,7 +15739,38 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__force_flat_namespace" >&5
$as_echo "$ax_cv_check_ldflags___Wl__force_flat_namespace" >&6; }
if test x"$ax_cv_check_ldflags___Wl__force_flat_namespace" = xyes; then :
- SUDO_LDFLAGS="${SUDO_LDFLAGS}${SUDO_LDFLAGS+ }-Wl,-force_flat_namespace"
+
+if ${SUDO_LDFLAGS+:} false; then :
+
+ case " $SUDO_LDFLAGS " in #(
+ *" -Wl,-force_flat_namespace "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS already contains -Wl,-force_flat_namespace"; } >&5
+ (: SUDO_LDFLAGS already contains -Wl,-force_flat_namespace) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDO_LDFLAGS " -Wl,-force_flat_namespace"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS=\"\$SUDO_LDFLAGS\""; } >&5
+ (: SUDO_LDFLAGS="$SUDO_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDO_LDFLAGS=-Wl,-force_flat_namespace
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDO_LDFLAGS=\"\$SUDO_LDFLAGS\""; } >&5
+ (: SUDO_LDFLAGS="$SUDO_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
else
:
fi
@@ -15631,16 +15837,72 @@ fi
if test -n "$with_libpath"; then
for i in ${with_libpath}; do
- case "${LDFLAGS}" in
- *"-L$i"|*"-L$i ")
- ;;
- *)
- LDFLAGS="${LDFLAGS} -L$i"
- if test X"$enable_rpath" = X"yes"; then
- LDFLAGS_R="${LDFLAGS_R} -R$i"
- fi
- ;;
- esac
+
+if ${LDFLAGS+:} false; then :
+
+ case " $LDFLAGS " in #(
+ *" -L$i "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -L\$i"; } >&5
+ (: LDFLAGS already contains -L$i) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS " -L$i"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS=-L$i
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${LDFLAGS_R+:} false; then :
+
+ case " $LDFLAGS_R " in #(
+ *" -R$i "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R already contains -R\$i"; } >&5
+ (: LDFLAGS_R already contains -R$i) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS_R " -R$i"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R=\"\$LDFLAGS_R\""; } >&5
+ (: LDFLAGS_R="$LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS_R=-R$i
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R=\"\$LDFLAGS_R\""; } >&5
+ (: LDFLAGS_R="$LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
done
fi
@@ -20722,29 +20984,104 @@ fi
if test "$enable_nls" != "no"; then
if test "$enable_nls" != "yes"; then
- case "${CPPFLAGS}" in
- *"-I${enable_nls}/include"|*"-I${enable_nls}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${enable_nls}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${enable_nls}/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+ case " $CPPFLAGS " in #(
+ *" -I${enable_nls}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${enable_nls}/include"; } >&5
+ (: CPPFLAGS already contains -I${enable_nls}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
- case "${LDFLAGS}" in
- *"-L$enable_nls/lib"|*"-L$enable_nls/lib ")
- ;;
- *)
- LDFLAGS="${LDFLAGS} -L$enable_nls/lib"
- if test X"$enable_rpath" = X"yes"; then
- LDFLAGS_R="${LDFLAGS_R} -R$enable_nls/lib"
- fi
- ;;
- esac
+ as_fn_append CPPFLAGS " -I${enable_nls}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${enable_nls}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+
+
+if ${LDFLAGS+:} false; then :
+
+ case " $LDFLAGS " in #(
+ *" -L$enable_nls/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -L\$enable_nls/lib"; } >&5
+ (: LDFLAGS already contains -L$enable_nls/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS " -L$enable_nls/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS=-L$enable_nls/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${LDFLAGS_R+:} false; then :
+
+ case " $LDFLAGS_R " in #(
+ *" -R$enable_nls/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R already contains -R\$enable_nls/lib"; } >&5
+ (: LDFLAGS_R already contains -R$enable_nls/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS_R " -R$enable_nls/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R=\"\$LDFLAGS_R\""; } >&5
+ (: LDFLAGS_R="$LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS_R=-R$enable_nls/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS_R=\"\$LDFLAGS_R\""; } >&5
+ (: LDFLAGS_R="$LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
fi
OLIBS="$LIBS"
@@ -20908,29 +21245,104 @@ fi
$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
- case "${CPPFLAGS}" in
- *"-I${enable_zlib}/include"|*"-I${enable_zlib}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${enable_zlib}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${enable_zlib}/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+ case " $CPPFLAGS " in #(
+ *" -I${enable_zlib}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${enable_zlib}/include"; } >&5
+ (: CPPFLAGS already contains -I${enable_zlib}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
- case "${ZLIB}" in
- *"-L$enable_zlib/lib"|*"-L$enable_zlib/lib ")
- ;;
- *)
- ZLIB="${ZLIB} -L$enable_zlib/lib"
- if test X"$enable_rpath" = X"yes"; then
- ZLIB_R="${ZLIB_R} -R$enable_zlib/lib"
- fi
- ;;
- esac
+ as_fn_append CPPFLAGS " -I${enable_zlib}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${enable_zlib}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+
+
+if ${ZLIB+:} false; then :
+
+ case " $ZLIB " in #(
+ *" -L$enable_zlib/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB already contains -L\$enable_zlib/lib"; } >&5
+ (: ZLIB already contains -L$enable_zlib/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append ZLIB " -L$enable_zlib/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB=\"\$ZLIB\""; } >&5
+ (: ZLIB="$ZLIB") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ ZLIB=-L$enable_zlib/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB=\"\$ZLIB\""; } >&5
+ (: ZLIB="$ZLIB") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${ZLIB_R+:} false; then :
+
+ case " $ZLIB_R " in #(
+ *" -R$enable_zlib/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB_R already contains -R\$enable_zlib/lib"; } >&5
+ (: ZLIB_R already contains -R$enable_zlib/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append ZLIB_R " -R$enable_zlib/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB_R=\"\$ZLIB_R\""; } >&5
+ (: ZLIB_R="$ZLIB_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ ZLIB_R=-R$enable_zlib/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : ZLIB_R=\"\$ZLIB_R\""; } >&5
+ (: ZLIB_R="$ZLIB_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
ZLIB="${ZLIB} -lz"
;;
@@ -20939,6 +21351,7 @@ case "$enable_zlib" in
builtin|static|dynamic)
$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
+ # XXX - can't use AX_APPEND_FLAG due to use of $(top_foo) and quoting
CPPFLAGS='-I$(top_builddir)/lib/zlib -I$(top_srcdir)/lib/zlib '"${CPPFLAGS}"
ZLIB="${ZLIB}"' $(top_builddir)/lib/zlib/libsudo_z.la'
ZLIB_SRC=lib/zlib
@@ -21615,29 +22028,104 @@ fi
if test ${with_fwtk-'no'} != "no"; then
if test "$with_fwtk" != "yes"; then
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_fwtk}"|*"-L${with_fwtk} ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_fwtk}"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_fwtk}"
- fi
- ;;
- esac
+if ${SUDOERS_LDFLAGS+:} false; then :
- case "${CPPFLAGS}" in
- *"-I${with_fwtk}"|*"-I${with_fwtk} ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_fwtk}"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_fwtk}"
- fi
- ;;
- esac
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_fwtk} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_fwtk}"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_fwtk}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_fwtk}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_fwtk}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_fwtk} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_fwtk}"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_fwtk}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_fwtk}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_fwtk}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
+
+
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${with_fwtk} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_fwtk}"; } >&5
+ (: CPPFLAGS already contains -I${with_fwtk}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${with_fwtk}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_fwtk}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
with_fwtk=yes
fi
@@ -21654,29 +22142,104 @@ if test ${with_SecurID-'no'} != "no"; then
with_SecurID=/usr/ace
fi
- case "${CPPFLAGS}" in
- *"-I${with_SecurID}"|*"-I${with_SecurID} ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_SecurID}"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_SecurID}"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+ case " $CPPFLAGS " in #(
+ *" -I${with_SecurID} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_SecurID}"; } >&5
+ (: CPPFLAGS already contains -I${with_SecurID}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_SecurID}"|*"-L${with_SecurID} ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_SecurID}"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_SecurID}"
- fi
- ;;
- esac
+ as_fn_append CPPFLAGS " -I${with_SecurID}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_SecurID}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_SecurID} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_SecurID}"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_SecurID}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_SecurID}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_SecurID}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_SecurID} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_SecurID}"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_SecurID}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_SecurID}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_SecurID}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
SUDOERS_LIBS="${SUDOERS_LIBS} -laceclnt -lpthread"
AUTH_OBJS="$AUTH_OBJS securid5.lo";
@@ -21734,7 +22297,38 @@ fi
$as_echo "#define HAVE_KERB5 1" >>confdefs.h
AUTH_OBJS="$AUTH_OBJS kerb5.lo"
- CPPFLAGS="$CPPFLAGS `krb5-config --cflags`"
+
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" `krb5-config --cflags` "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \`krb5-config --cflags\`"; } >&5
+ (: CPPFLAGS already contains `krb5-config --cflags`) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " `krb5-config --cflags`"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=`krb5-config --cflags`
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
SUDOERS_LIBS="$SUDOERS_LIBS `krb5-config --libs`"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
$as_echo_n "checking whether we are using Heimdal... " >&6; }
@@ -21795,29 +22389,104 @@ $as_echo "$as_me: WARNING: Unable to locate Kerberos V include files, you will h
fi
else
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_kerb5}/lib"|*"-L${with_kerb5}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_kerb5}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_kerb5}/lib"
- fi
- ;;
- esac
+if ${SUDOERS_LDFLAGS+:} false; then :
- case "${CPPFLAGS}" in
- *"-I${with_kerb5}/include"|*"-I${with_kerb5}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_kerb5}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_kerb5}/include"
- fi
- ;;
- esac
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_kerb5}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_kerb5}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_kerb5}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_kerb5}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_kerb5}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_kerb5}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_kerb5}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_kerb5}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_kerb5}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_kerb5}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
+
+
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${with_kerb5}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_kerb5}/include"; } >&5
+ (: CPPFLAGS already contains -I${with_kerb5}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${with_kerb5}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_kerb5}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
fi
@@ -22014,16 +22683,72 @@ if test ${with_AFS-'no'} = "yes"; then
for i in $AFSLIBDIRS; do
if test -d ${i}; then
- case "${SUDOERS_LDFLAGS}" in
- *"-L$i"|*"-L$i ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L$i"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R$i"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L$i "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\$i"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L$i) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L$i"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L$i
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R$i "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\$i"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R$i) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R$i"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R$i
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
FOUND_AFSLIBDIR=true
fi
@@ -22052,17 +22777,36 @@ $as_echo "$as_me: WARNING: Unable to locate AFS libraries, you will have to edit
for i in /usr/afsws/include; do
if test -d ${i}; then
- case "${CPPFLAGS}" in
- *"-I${i}"|*"-I${i} ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${i}"
- else
- CPPFLAGS="${CPPFLAGS} -I${i}"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${i} "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${i}"; } >&5
+ (: CPPFLAGS already contains -I${i}) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${i}"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${i}
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
FOUND_AFSINCDIR=true
fi
@@ -22086,30 +22830,105 @@ if test "${with_skey-'no'}" = "yes"; then
O_LDFLAGS="$LDFLAGS"
if test "$with_skey" != "yes"; then
- case "${CPPFLAGS}" in
- *"-I${with_skey}/include"|*"-I${with_skey}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_skey}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_skey}/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${with_skey}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_skey}/include"; } >&5
+ (: CPPFLAGS already contains -I${with_skey}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${with_skey}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_skey}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
LDFLAGS="$LDFLAGS -L${with_skey}/lib"
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_skey}/lib"|*"-L${with_skey}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_skey}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_skey}/lib"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_skey}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_skey}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_skey}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_skey}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_skey}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_skey}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_skey}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_skey}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_skey}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_skey}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
ac_fn_c_check_header_compile "$LINENO" "skey.h" "ac_cv_header_skey_h" "#include <stdio.h>
"
@@ -22138,16 +22957,72 @@ fi
else
LDFLAGS="$LDFLAGS -L${dir}/lib"
- case "${SUDOERS_LDFLAGS}" in
- *"-L${dir}/lib"|*"-L${dir}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${dir}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${dir}/lib"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${dir}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${dir}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${dir}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${dir}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${dir}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${dir}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${dir}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${dir}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${dir}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${dir}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
fi
if test "$found" = "no"; then
@@ -22275,30 +23150,105 @@ if test "${with_opie-'no'}" = "yes"; then
O_LDFLAGS="$LDFLAGS"
if test "$with_opie" != "yes"; then
- case "${CPPFLAGS}" in
- *"-I${with_opie}/include"|*"-I${with_opie}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_opie}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${with_opie}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_opie}/include"; } >&5
+ (: CPPFLAGS already contains -I${with_opie}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${with_opie}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_opie}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
LDFLAGS="$LDFLAGS -L${with_opie}/lib"
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_opie}/lib"|*"-L${with_opie}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_opie}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_opie}/lib"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_opie}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_opie}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_opie}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_opie}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_opie}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_opie}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_opie}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_opie}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_opie}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_opie}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22343,16 +23293,72 @@ rm -f conftest.err conftest.i conftest.$ac_ext
else
LDFLAGS="$LDFLAGS -L${dir}/lib"
- case "${SUDOERS_LDFLAGS}" in
- *"-L${dir}/lib"|*"-L${dir}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${dir}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${dir}/lib"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${dir}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${dir}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${dir}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${dir}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${dir}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${dir}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${dir}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${dir}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${dir}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${dir}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
fi
if test "$found" = "no"; then
@@ -22672,30 +23678,105 @@ if test ${with_ldap-'no'} != "no"; then
O_LDFLAGS="$LDFLAGS"
if test "$with_ldap" != "yes"; then
- case "${SUDOERS_LDFLAGS}" in
- *"-L${with_ldap}/lib"|*"-L${with_ldap}/lib ")
- ;;
- *)
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_ldap}/lib"
- if test X"$enable_rpath" = X"yes"; then
- SUDOERS_LDFLAGS_R="${SUDOERS_LDFLAGS_R} -R${with_ldap}/lib"
- fi
- ;;
- esac
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -L${with_ldap}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -L\${with_ldap}/lib"; } >&5
+ (: SUDOERS_LDFLAGS already contains -L${with_ldap}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -L${with_ldap}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-L${with_ldap}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ if test X"$enable_rpath" = X"yes"; then
+
+if ${SUDOERS_LDFLAGS_R+:} false; then :
+
+ case " $SUDOERS_LDFLAGS_R " in #(
+ *" -R${with_ldap}/lib "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R already contains -R\${with_ldap}/lib"; } >&5
+ (: SUDOERS_LDFLAGS_R already contains -R${with_ldap}/lib) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS_R " -R${with_ldap}/lib"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS_R=-R${with_ldap}/lib
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS_R=\"\$SUDOERS_LDFLAGS_R\""; } >&5
+ (: SUDOERS_LDFLAGS_R="$SUDOERS_LDFLAGS_R") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+ fi
LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
- case "${CPPFLAGS}" in
- *"-I${with_ldap}/include"|*"-I${with_ldap}/include ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-I${with_ldap}/include"
- else
- CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -I${with_ldap}/include "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -I\${with_ldap}/include"; } >&5
+ (: CPPFLAGS already contains -I${with_ldap}/include) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -I${with_ldap}/include"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-I${with_ldap}/include
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
with_ldap=yes
fi
@@ -23165,7 +24246,38 @@ case "$lt_cv_dlopen" in
SUDO_OBJS="${SUDO_OBJS} preload.o"
STATIC_SUDOERS="\$(top_builddir)/plugins/sudoers/sudoers.la"
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} --tag=disable-shared -static"
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" --tag=disable-shared -static "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains --tag=disable-shared -static"; } >&5
+ (: SUDOERS_LDFLAGS already contains --tag=disable-shared -static) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " --tag=disable-shared -static"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=--tag=disable-shared -static
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
LT_STATIC=""
else
LT_STATIC="--tag=disable-static"
@@ -23179,7 +24291,38 @@ case "$lt_cv_dlopen" in
SUDO_OBJS="${SUDO_OBJS} preload.o"
STATIC_SUDOERS="\$(top_builddir)/plugins/sudoers/sudoers.la"
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} --tag=disable-shared -static"
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" --tag=disable-shared -static "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains --tag=disable-shared -static"; } >&5
+ (: SUDOERS_LDFLAGS already contains --tag=disable-shared -static) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " --tag=disable-shared -static"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=--tag=disable-shared -static
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
LT_STATIC=""
else
LT_STATIC="--tag=disable-static"
@@ -23214,8 +24357,70 @@ if test "$enable_shared_libutil" = "no"; then
as_fn_error $? "\"--disable-shared-libutil may only be specified with --enable-static-sudoers or when dynamic linking is disabled.\"" "$LINENO" 5
else
# Do not install sudoers or libsudo_util.
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS}${SUDOERS_LDFLAGS+ }-no-install"
- LIBUTIL_LDFLAGS="${LIBUTIL_LDFLAGS}${LIBUTIL_LDFLAGS+ }-no-install"
+
+if ${SUDOERS_LDFLAGS+:} false; then :
+
+ case " $SUDOERS_LDFLAGS " in #(
+ *" -no-install "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS already contains -no-install"; } >&5
+ (: SUDOERS_LDFLAGS already contains -no-install) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append SUDOERS_LDFLAGS " -no-install"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ SUDOERS_LDFLAGS=-no-install
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : SUDOERS_LDFLAGS=\"\$SUDOERS_LDFLAGS\""; } >&5
+ (: SUDOERS_LDFLAGS="$SUDOERS_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+
+if ${LIBUTIL_LDFLAGS+:} false; then :
+
+ case " $LIBUTIL_LDFLAGS " in #(
+ *" -no-install "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LIBUTIL_LDFLAGS already contains -no-install"; } >&5
+ (: LIBUTIL_LDFLAGS already contains -no-install) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LIBUTIL_LDFLAGS " -no-install"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LIBUTIL_LDFLAGS=\"\$LIBUTIL_LDFLAGS\""; } >&5
+ (: LIBUTIL_LDFLAGS="$LIBUTIL_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LIBUTIL_LDFLAGS=-no-install
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LIBUTIL_LDFLAGS=\"\$LIBUTIL_LDFLAGS\""; } >&5
+ (: LIBUTIL_LDFLAGS="$LIBUTIL_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
fi
fi
@@ -23404,17 +24609,36 @@ fi
if test "$enable_hardening" != "no"; then
O_CPPFLAGS="$CPPFLAGS"
- case "${CPPFLAGS}" in
- *"-D_FORTIFY_SOURCE=2"|*"-D_FORTIFY_SOURCE=2 ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="-D_FORTIFY_SOURCE=2"
- else
- CPPFLAGS="${CPPFLAGS} -D_FORTIFY_SOURCE=2"
- fi
- ;;
- esac
+if ${CPPFLAGS+:} false; then :
+
+ case " $CPPFLAGS " in #(
+ *" -D_FORTIFY_SOURCE=2 "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -D_FORTIFY_SOURCE=2"; } >&5
+ (: CPPFLAGS already contains -D_FORTIFY_SOURCE=2) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CPPFLAGS " -D_FORTIFY_SOURCE=2"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CPPFLAGS=-D_FORTIFY_SOURCE=2
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS\""; } >&5
+ (: CPPFLAGS="$CPPFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _FORTIFY_SOURCE may be specified" >&5
$as_echo_n "checking whether _FORTIFY_SOURCE may be specified... " >&6; }
@@ -23506,7 +24730,38 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___static_libgcc" >&5
$as_echo "$ax_cv_check_cflags___static_libgcc" >&6; }
if test x"$ax_cv_check_cflags___static_libgcc" = xyes; then :
- LT_LDFLAGS="$LT_LDFLAGS -Wc,-static-libgcc"
+
+if ${LT_LDFLAGS+:} false; then :
+
+ case " $LT_LDFLAGS " in #(
+ *" -Wc,-static-libgcc "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LT_LDFLAGS already contains -Wc,-static-libgcc"; } >&5
+ (: LT_LDFLAGS already contains -Wc,-static-libgcc) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LT_LDFLAGS " -Wc,-static-libgcc"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LT_LDFLAGS=\"\$LT_LDFLAGS\""; } >&5
+ (: LT_LDFLAGS="$LT_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LT_LDFLAGS=-Wc,-static-libgcc
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LT_LDFLAGS=\"\$LT_LDFLAGS\""; } >&5
+ (: LT_LDFLAGS="$LT_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
else
:
fi
@@ -24145,7 +25400,38 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_aslr" >&5
$as_echo "$ax_cv_check_ldflags___Wl__z_aslr" >&6; }
if test x"$ax_cv_check_ldflags___Wl__z_aslr" = xyes; then :
- PIE_LDFLAGS="${PIE_LDFLAGS}${PIE_LDFLAGS+ }-Wl,-z,aslr"
+
+if ${PIE_LDFLAGS+:} false; then :
+
+ case " $PIE_LDFLAGS " in #(
+ *" -Wl,-z,aslr "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : PIE_LDFLAGS already contains -Wl,-z,aslr"; } >&5
+ (: PIE_LDFLAGS already contains -Wl,-z,aslr) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append PIE_LDFLAGS " -Wl,-z,aslr"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : PIE_LDFLAGS=\"\$PIE_LDFLAGS\""; } >&5
+ (: PIE_LDFLAGS="$PIE_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ PIE_LDFLAGS=-Wl,-z,aslr
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : PIE_LDFLAGS=\"\$PIE_LDFLAGS\""; } >&5
+ (: PIE_LDFLAGS="$PIE_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
else
:
fi
@@ -24288,7 +25574,38 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_relro" >&5
$as_echo "$ax_cv_check_ldflags___Wl__z_relro" >&6; }
if test x"$ax_cv_check_ldflags___Wl__z_relro" = xyes; then :
- LDFLAGS="${LDFLAGS} -Wl,-z,relro"
+
+if ${LDFLAGS+:} false; then :
+
+ case " $LDFLAGS " in #(
+ *" -Wl,-z,relro "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -Wl,-z,relro"; } >&5
+ (: LDFLAGS already contains -Wl,-z,relro) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append LDFLAGS " -Wl,-z,relro"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ LDFLAGS=-Wl,-z,relro
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
+ (: LDFLAGS="$LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
else
:
fi
diff --git a/configure.ac b/configure.ac
index f2564219c..86912f231 100644
--- a/configure.ac
+++ b/configure.ac
@@ -291,7 +291,7 @@ dnl
AC_ARG_WITH(devel, [AS_HELP_STRING([--with-devel], [add development options])],
[case $with_devel in
yes) AC_MSG_NOTICE([Setting up for development: -Wall, flex, yacc])
- SUDO_APPEND_CPPFLAGS(-DSUDO_DEVEL)
+ AX_APPEND_FLAG([-DSUDO_DEVEL], [CPPFLAGS])
DEVEL="true"
devdir=.
;;
@@ -390,7 +390,7 @@ AC_ARG_WITH(incpath, [AS_HELP_STRING([--with-incpath], [additional places to loo
;;
*) AC_MSG_NOTICE([Adding ${with_incpath} to CPPFLAGS])
for i in ${with_incpath}; do
- SUDO_APPEND_CPPFLAGS(-I${i})
+ AX_APPEND_FLAG([-I${i}], [CPPFLAGS])
done
;;
esac])
@@ -1562,7 +1562,7 @@ dnl before the call to LT_INIT
dnl
case "$host_os" in
aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- LDFLAGS="${LDFLAGS}${LDFLAGS+ }-Wl,-brtl"
+ AX_APPEND_FLAG([-Wl,-brtl], [LDFLAGS])
;;
esac
@@ -1854,8 +1854,7 @@ case "$host" in
;;
*-dec-osf*)
# ignore envariables wrt dynamic lib path
- # XXX - sudo LDFLAGS instead?
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -Wl,-no_library_replacement"
+ AX_APPEND_FLAG([-Wl,-no_library_replacement], [SUDO_LDFLAGS])
: ${CHECKSIA='true'}
AC_MSG_CHECKING(whether to disable sia support on Digital UNIX)
@@ -1954,14 +1953,14 @@ case "$host" in
;;
*-*-riscos*)
LIBS="${LIBS} -lsun -lbsd"
- SUDO_APPEND_CPPFLAGS(-I/usr/include)
- SUDO_APPEND_CPPFLAGS(-I/usr/include/bsd)
- SUDO_APPEND_CPPFLAGS(-D_MIPS)
+ AX_APPEND_FLAG([-I/usr/include], [CPPFLAGS])
+ AX_APPEND_FLAG([-I/usr/include/bsd], [CPPFLAGS])
+ AX_APPEND_FLAG([-D_MIPS], [CPPFLAGS])
: ${mansectsu='1m'}
: ${mansectform='4'}
;;
*-*-isc*)
- SUDO_APPEND_CPPFLAGS(-D_ISC)
+ AX_APPEND_FLAG([-D_ISC], [CPPFLAGS])
LIB_CRYPT=1
SUDOERS_LIBS="${SUDOERS_LIBS} -lcrypt"
@@ -2111,7 +2110,7 @@ case "$host" in
# We need to force a flat namespace to make libc
# symbol hooking work like it does on ELF.
- AX_CHECK_LINK_FLAG([-Wl,-force_flat_namespace], [SUDO_LDFLAGS="${SUDO_LDFLAGS}${SUDO_LDFLAGS+ }-Wl,-force_flat_namespace"])
+ AX_CHECK_LINK_FLAG([-Wl,-force_flat_namespace], [AX_APPEND_FLAG([-Wl,-force_flat_namespace], [SUDO_LDFLAGS])])
# Examples go in share/examples/sudo
if test X"$with_exampledir" = X""; then
@@ -2901,7 +2900,7 @@ fi
# make sure we use the gettext() that matches the include file.
if test "$enable_nls" != "no"; then
if test "$enable_nls" != "yes"; then
- SUDO_APPEND_CPPFLAGS(-I${enable_nls}/include)
+ AX_APPEND_FLAG([-I${enable_nls}/include], [CPPFLAGS])
SUDO_APPEND_LIBPATH(LDFLAGS, [$enable_nls/lib])
fi
OLIBS="$LIBS"
@@ -2976,7 +2975,7 @@ case "$enable_zlib" in
;;
*)
AC_DEFINE(HAVE_ZLIB_H)
- SUDO_APPEND_CPPFLAGS(-I${enable_zlib}/include)
+ AX_APPEND_FLAG([-I${enable_zlib}/include], [CPPFLAGS])
SUDO_APPEND_LIBPATH(ZLIB, [$enable_zlib/lib])
ZLIB="${ZLIB} -lz"
;;
@@ -2984,6 +2983,7 @@ esac
case "$enable_zlib" in
builtin|static|dynamic)
AC_DEFINE(HAVE_ZLIB_H)
+ # XXX - can't use AX_APPEND_FLAG due to use of $(top_foo) and quoting
CPPFLAGS='-I$(top_builddir)/lib/zlib -I$(top_srcdir)/lib/zlib '"${CPPFLAGS}"
ZLIB="${ZLIB}"' $(top_builddir)/lib/zlib/libsudo_z.la'
ZLIB_SRC=lib/zlib
@@ -3272,7 +3272,7 @@ dnl
if test ${with_fwtk-'no'} != "no"; then
if test "$with_fwtk" != "yes"; then
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_fwtk}])
- SUDO_APPEND_CPPFLAGS(-I${with_fwtk})
+ AX_APPEND_FLAG([-I${with_fwtk}], [CPPFLAGS])
with_fwtk=yes
fi
SUDOERS_LIBS="${SUDOERS_LIBS} -lauth -lfwall"
@@ -3290,7 +3290,7 @@ if test ${with_SecurID-'no'} != "no"; then
else
with_SecurID=/usr/ace
fi
- SUDO_APPEND_CPPFLAGS(-I${with_SecurID})
+ AX_APPEND_FLAG([-I${with_SecurID}], [CPPFLAGS])
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_SecurID}])
SUDOERS_LIBS="${SUDOERS_LIBS} -laceclnt -lpthread"
AUTH_OBJS="$AUTH_OBJS securid5.lo";
@@ -3322,7 +3322,7 @@ if test ${with_kerb5-'no'} != "no"; then
if test -n "$KRB5CONFIG"; then
AC_DEFINE(HAVE_KERB5)
AUTH_OBJS="$AUTH_OBJS kerb5.lo"
- CPPFLAGS="$CPPFLAGS `krb5-config --cflags`"
+ AX_APPEND_FLAG([`krb5-config --cflags`], [CPPFLAGS])
SUDOERS_LIBS="$SUDOERS_LIBS `krb5-config --libs`"
dnl
dnl Try to determine whether we have Heimdal or MIT Kerberos
@@ -3354,7 +3354,7 @@ if test ${with_kerb5-'no'} != "no"; then
else
dnl XXX - try to include krb5.h here too
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_kerb5}/lib])
- SUDO_APPEND_CPPFLAGS(-I${with_kerb5}/include)
+ AX_APPEND_FLAG([-I${with_kerb5}/include], [CPPFLAGS])
fi
dnl
@@ -3442,7 +3442,7 @@ if test ${with_AFS-'no'} = "yes"; then
# AFS includes may live in /usr/include on some machines...
for i in /usr/afsws/include; do
if test -d ${i}; then
- SUDO_APPEND_CPPFLAGS(-I${i})
+ AX_APPEND_FLAG([-I${i}], [CPPFLAGS])
FOUND_AFSINCDIR=true
fi
done
@@ -3470,7 +3470,7 @@ dnl
if test "${with_skey-'no'}" = "yes"; then
O_LDFLAGS="$LDFLAGS"
if test "$with_skey" != "yes"; then
- SUDO_APPEND_CPPFLAGS(-I${with_skey}/include)
+ AX_APPEND_FLAG([-I${with_skey}/include], [CPPFLAGS])
LDFLAGS="$LDFLAGS -L${with_skey}/lib"
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_skey}/lib])
AC_CHECK_HEADER([skey.h], [found=yes], [found=no], [#include <stdio.h>])
@@ -3519,7 +3519,7 @@ dnl
if test "${with_opie-'no'}" = "yes"; then
O_LDFLAGS="$LDFLAGS"
if test "$with_opie" != "yes"; then
- SUDO_APPEND_CPPFLAGS(-I${with_opie}/include)
+ AX_APPEND_FLAG([-I${with_opie}/include], [CPPFLAGS])
LDFLAGS="$LDFLAGS -L${with_opie}/lib"
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_opie}/lib])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <opie.h>]])], [found=yes], [found=no])
@@ -3619,7 +3619,7 @@ if test ${with_ldap-'no'} != "no"; then
if test "$with_ldap" != "yes"; then
SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_ldap}/lib])
LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
- SUDO_APPEND_CPPFLAGS(-I${with_ldap}/include)
+ AX_APPEND_FLAG([-I${with_ldap}/include], [CPPFLAGS])
with_ldap=yes
fi
SUDOERS_OBJS="${SUDOERS_OBJS} ldap.lo"
@@ -3713,7 +3713,7 @@ case "$lt_cv_dlopen" in
AC_DEFINE(STATIC_SUDOERS_PLUGIN)
SUDO_OBJS="${SUDO_OBJS} preload.o"
STATIC_SUDOERS="\$(top_builddir)/plugins/sudoers/sudoers.la"
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} --tag=disable-shared -static"
+ AX_APPEND_FLAG([--tag=disable-shared -static], [SUDOERS_LDFLAGS])
LT_STATIC=""
else
LT_STATIC="--tag=disable-static"
@@ -3725,7 +3725,7 @@ case "$lt_cv_dlopen" in
AC_DEFINE(STATIC_SUDOERS_PLUGIN)
SUDO_OBJS="${SUDO_OBJS} preload.o"
STATIC_SUDOERS="\$(top_builddir)/plugins/sudoers/sudoers.la"
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} --tag=disable-shared -static"
+ AX_APPEND_FLAG([--tag=disable-shared -static], [SUDOERS_LDFLAGS])
LT_STATIC=""
else
LT_STATIC="--tag=disable-static"
@@ -3759,8 +3759,8 @@ if test "$enable_shared_libutil" = "no"; then
AC_MSG_ERROR(["--disable-shared-libutil may only be specified with --enable-static-sudoers or when dynamic linking is disabled."])
else
# Do not install sudoers or libsudo_util.
- SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS}${SUDOERS_LDFLAGS+ }-no-install"
- LIBUTIL_LDFLAGS="${LIBUTIL_LDFLAGS}${LIBUTIL_LDFLAGS+ }-no-install"
+ AX_APPEND_FLAG([-no-install], [SUDOERS_LDFLAGS])
+ AX_APPEND_FLAG([-no-install], [LIBUTIL_LDFLAGS])
fi
fi
@@ -3794,7 +3794,7 @@ dnl it but libc does not, __sprintf_chk should be an undefined symbol.
dnl
if test "$enable_hardening" != "no"; then
O_CPPFLAGS="$CPPFLAGS"
- SUDO_APPEND_CPPFLAGS(-D_FORTIFY_SOURCE=2)
+ AX_APPEND_FLAG([-D_FORTIFY_SOURCE=2], [CPPFLAGS])
AC_CACHE_CHECK([whether _FORTIFY_SOURCE may be specified],
[sudo_cv_use_fortify_source],
[AC_LINK_IFELSE([
@@ -3830,7 +3830,7 @@ dnl GNU ld (which can avoid linking in libgcc when it is not needed).
dnl This test relies on AC_LANG_WERROR
dnl
if test -n "$GCC" -a "$lt_cv_prog_gnu_ld" != "yes" -a -n "$GCC"; then
- AX_CHECK_COMPILE_FLAG([-static-libgcc], [LT_LDFLAGS="$LT_LDFLAGS -Wc,-static-libgcc"])
+ AX_CHECK_COMPILE_FLAG([-static-libgcc], [AX_APPEND_FLAG([-Wc,-static-libgcc], [LT_LDFLAGS])])
fi
dnl
@@ -4014,7 +4014,7 @@ if test "$enable_pie" != "yes"; then
# Solaris 11.1 and higher supports tagging binaries to use ASLR
case "$host_os" in
solaris2.1[[1-9]]|solaris2.[[2-9]][[0-9]])
- AX_CHECK_LINK_FLAG([-Wl,-z,aslr], [PIE_LDFLAGS="${PIE_LDFLAGS}${PIE_LDFLAGS+ }-Wl,-z,aslr"])
+ AX_CHECK_LINK_FLAG([-Wl,-z,aslr], [AX_APPEND_FLAG([-Wl,-z,aslr], [PIE_LDFLAGS])])
;;
esac
fi
@@ -4072,7 +4072,7 @@ if test "$enable_hardening" != "no"; then
SSP_CFLAGS="$sudo_cv_var_stack_protector"
SSP_LDFLAGS="-Wc,$sudo_cv_var_stack_protector"
fi
- AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="${LDFLAGS} -Wl,-z,relro"])
+ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [AX_APPEND_FLAG([-Wl,-z,relro], [LDFLAGS])])
fi
dnl
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
new file mode 100644
index 000000000..08f2e07ec
--- /dev/null
+++ b/m4/ax_append_flag.m4
@@ -0,0 +1,71 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+# added in between.
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
+# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+# FLAG.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 6
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS,[" $1"])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
diff --git a/m4/sudo.m4 b/m4/sudo.m4
index 3111b7225..97e62a316 100644
--- a/m4/sudo.m4
+++ b/m4/sudo.m4
@@ -346,33 +346,10 @@ dnl Append a libpath to an LDFLAGS style variable if not already present.
dnl Also appends to the _R version unless rpath is disabled.
dnl
AC_DEFUN([SUDO_APPEND_LIBPATH], [
- case "${$1}" in
- *"-L$2"|*"-L$2 ")
- ;;
- *)
- $1="${$1} -L$2"
- if test X"$enable_rpath" = X"yes"; then
- $1_R="${$1_R} -R$2"
- fi
- ;;
- esac
-])
-
-dnl
-dnl Append a directory to CPPFLAGS if not already present.
-dnl
-AC_DEFUN([SUDO_APPEND_CPPFLAGS], [
- case "${CPPFLAGS}" in
- *"$1"|*"$1 ")
- ;;
- *)
- if test X"${CPPFLAGS}" = X""; then
- CPPFLAGS="$1"
- else
- CPPFLAGS="${CPPFLAGS} $1"
- fi
- ;;
- esac
+ AX_APPEND_FLAG([-L$2], [$1])
+ if test X"$enable_rpath" = X"yes"; then
+ AX_APPEND_FLAG([-R$2], [$1_R])
+ fi
])
dnl