]> granicus.if.org Git - sudo/commitdiff
Use AC_PROG_AWK
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 27 Oct 2014 20:54:13 +0000 (14:54 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 27 Oct 2014 20:54:13 +0000 (14:54 -0600)
configure
configure.ac
lib/util/Makefile.in
lib/zlib/Makefile.in
plugins/group_file/Makefile.in
plugins/sample/Makefile.in
plugins/sudoers/Makefile.in
plugins/system_group/Makefile.in

index 132ba04242db8b6fca60f7836356d90009558dc8..e3e490d8f95ff89134368835c65b0800281aa5c6 100755 (executable)
--- a/configure
+++ b/configure
@@ -15231,6 +15231,48 @@ $as_echo "$as_me: WARNING: Your C preprocessor doesn't support variadic macros,
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
 for ac_prog in 'bison -y' byacc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
index 420ef4bdd3db2a71d039409264b0cc43a4707692..0e384dc79912514a29f5051250357d8d89e9ddb0 100644 (file)
@@ -2152,6 +2152,7 @@ AC_INCLUDES_DEFAULT
 dnl
 dnl Program checks
 dnl
+AC_PROG_AWK
 AC_PROG_YACC
 AC_PATH_PROG([FLEX], [flex], [flex])
 SUDO_PROG_MV
index e7cc4451e54db9d1b9cb27c4ed01f854398ab367..e6e97e1024092f15b26a9e9b8096ad9789b79a17 100644 (file)
@@ -47,6 +47,7 @@ shlib_opt = util.opt
 CC = @CC@
 LIBTOOL = @LIBTOOL@ @LT_STATIC@
 SED = @SED@
+AWK = @AWK@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
@@ -128,7 +129,7 @@ Makefile: $(srcdir)/Makefile.in
        $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@
@@ -155,12 +156,12 @@ mksigname: $(srcdir)/mksigname.c $(srcdir)/mksigname.h $(incdir)/sudo_compat.h $
 
 $(srcdir)/mksiglist.h: $(srcdir)/siglist.in
        @if [ -n "$(DEVEL)" ]; then \
-           awk 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (sudo_sys_siglist[SIG%s] == NULL)\n\tsudo_sys_siglist[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, substr($$0, 13))}' < $(srcdir)/siglist.in > $@; \
+           $(AWK) 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (sudo_sys_siglist[SIG%s] == NULL)\n\tsudo_sys_siglist[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, substr($$0, 13))}' < $(srcdir)/siglist.in > $@; \
        fi
 
 $(srcdir)/mksigname.h: $(srcdir)/siglist.in
        @if [ -n "$(DEVEL)" ]; then \
-           awk 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (sudo_sys_signame[SIG%s] == NULL)\n\tsudo_sys_signame[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, $$1)}' < $(srcdir)/siglist.in > $@; \
+           $(AWK) 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (sudo_sys_signame[SIG%s] == NULL)\n\tsudo_sys_signame[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, $$1)}' < $(srcdir)/siglist.in > $@; \
        fi
 
 atofoo_test: $(ATOFOO_TEST_OBJS) libsudo_util.la
index bf493fa6989e6856a5ce4b33f755b19a5940b46e..e5d889baa01d5a8cbc9919736505a3f87f243567 100644 (file)
@@ -44,6 +44,7 @@ shlib_opt = zlib.opt
 # Compiler & tools to use
 CC = @CC@
 LIBTOOL = @LIBTOOL@
+AWK = @AWK@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
@@ -96,7 +97,7 @@ Makefile: $(srcdir)/Makefile.in
        $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@
index 4fb4ed6ab1e1363fa5890dc61466ea21c5cfc9df..87a22d21aff34615573c95d22a0c1ac4e3754ef1 100644 (file)
@@ -30,6 +30,7 @@ cross_compiling = @CROSS_COMPILING@
 CC = @CC@
 LIBTOOL = @LIBTOOL@ --tag=disable-static
 SED = @SED@
+AWK = @AWK@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
@@ -106,7 +107,7 @@ Makefile: $(srcdir)/Makefile.in
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@
index 80a2656b978fcee3ec9ea9c6b7e241785ba96acd..0bd1283799d129579bf6332ff6a2f6f820a21bf4 100644 (file)
@@ -30,6 +30,7 @@ cross_compiling = @CROSS_COMPILING@
 CC = @CC@
 LIBTOOL = @LIBTOOL@ --tag=disable-static
 SED = @SED@
+AWK = @AWK@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
@@ -105,7 +106,7 @@ Makefile: $(srcdir)/Makefile.in
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@
index 1b2ace888d5ccd520539f30ce677275f221ad57b..b85a0ae85e74664b1aa4c56d9b37e662a0a28acb 100644 (file)
@@ -42,6 +42,7 @@ LIBTOOL = @LIBTOOL@
 FLEX = @FLEX@
 YACC = @YACC@
 SED = @SED@
+AWK = @AWK@
 PERL = perl
 
 # Our install program supports extra flags...
@@ -187,7 +188,7 @@ all: $(PROGS)
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@
index be5721ac4299ba95f6c799d9db45bcaeafb8e314..3345a29acbcf7448013a2030a5530c01ae619281 100644 (file)
@@ -30,6 +30,7 @@ cross_compiling = @CROSS_COMPILING@
 CC = @CC@
 LIBTOOL = @LIBTOOL@ --tag=disable-static
 SED = @SED@
+AWK = @AWK@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
@@ -106,7 +107,7 @@ Makefile: $(srcdir)/Makefile.in
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<
 
 $(shlib_map): $(shlib_exp)
-       @awk 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
+       @$(AWK) 'BEGIN { print "{\n\tglobal:" } { print "\t\t"$$0";" } END { print "\tlocal:\n\t\t*;\n};" }' $(shlib_exp) > $@
 
 $(shlib_opt): $(shlib_exp)
        @$(SED) 's/^/+e /' $(shlib_exp) > $@