changeset 80:5465e5a55631

* acinclude.m4 (FIND_TOOL): New macro. * configure.ac: Use FIND_TOOL for essential tools, add gawk check. * configure: Regenerated. * Makefile.in: Likewise.
author Mark Wielaard <mark@klomp.org>
date Sun, 08 Jul 2007 16:01:54 +0200
parents 26caa7940a09
children 6b3987f26dce
files ChangeLog Makefile.in acinclude.m4 configure configure.ac
diffstat 5 files changed, 168 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jul 08 14:50:48 2007 +0200
+++ b/ChangeLog	Sun Jul 08 16:01:54 2007 +0200
@@ -1,3 +1,10 @@
+2007-07-08  Mark Wielaard  <mark@klomp.org>
+
+	* acinclude.m4 (FIND_TOOL): New macro.
+	* configure.ac: Use FIND_TOOL for essential tools, add gawk check.
+	* configure: Regenerated.
+	* Makefile.in: Likewise.
+
 2007-07-08  Mark Wielaard  <mark@klomp.org>
 
 	* acinclude.m4 (CHECK_HEADERS): Add check for alsa/asoundlib.h.
--- a/Makefile.in	Sun Jul 08 14:50:48 2007 +0200
+++ b/Makefile.in	Sun Jul 08 16:01:54 2007 +0200
@@ -83,6 +83,7 @@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FIND = @FIND@
+GAWK = @GAWK@
 GREP = @GREP@
 INSTALL = @INSTALL@
 INSTALL_ARCH_DIR = @INSTALL_ARCH_DIR@
@@ -144,7 +145,6 @@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
-find = @find@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
--- a/acinclude.m4	Sun Jul 08 14:50:48 2007 +0200
+++ b/acinclude.m4	Sun Jul 08 16:01:54 2007 +0200
@@ -526,3 +526,10 @@
   AM_CONDITIONAL(USE_CCACHE, test -n "${CCACHE}")
 ])
 
+AC_DEFUN([FIND_TOOL],
+[AC_PATH_TOOL([$1],[$2])
+ if test x"$$1" = x ; then
+   AC_MSG_ERROR([$2 program not found in PATH])
+ fi
+ AC_SUBST([$1])
+])
--- a/configure	Sun Jul 08 14:50:48 2007 +0200
+++ b/configure	Sun Jul 08 16:01:54 2007 +0200
@@ -699,11 +699,11 @@
 am__fastdepCC_TRUE
 am__fastdepCC_FALSE
 FIND
-find
 MD5SUM
 PATCH
 UNZIP
 WGET
+GAWK
 BUILD_ARCH_DIR
 INSTALL_ARCH_DIR
 JAVA
@@ -3341,6 +3341,7 @@
 
 
 
+# Essential tools that are used in the build (harness)
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}find", so it can be a program name with args.
 set dummy ${ac_tool_prefix}find; ac_word=$2
@@ -3443,6 +3444,12 @@
   FIND="$ac_cv_path_FIND"
 fi
 
+ if test x"$FIND" = x ; then
+   { { echo "$as_me:$LINENO: error: find program not found in PATH" >&5
+echo "$as_me: error: find program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}md5sum", so it can be a program name with args.
@@ -3546,6 +3553,12 @@
   MD5SUM="$ac_cv_path_MD5SUM"
 fi
 
+ if test x"$MD5SUM" = x ; then
+   { { echo "$as_me:$LINENO: error: md5sum program not found in PATH" >&5
+echo "$as_me: error: md5sum program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}patch", so it can be a program name with args.
@@ -3649,6 +3662,12 @@
   PATCH="$ac_cv_path_PATCH"
 fi
 
+ if test x"$PATCH" = x ; then
+   { { echo "$as_me:$LINENO: error: patch program not found in PATH" >&5
+echo "$as_me: error: patch program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}unzip", so it can be a program name with args.
@@ -3752,6 +3771,12 @@
   UNZIP="$ac_cv_path_UNZIP"
 fi
 
+ if test x"$UNZIP" = x ; then
+   { { echo "$as_me:$LINENO: error: unzip program not found in PATH" >&5
+echo "$as_me: error: unzip program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}wget", so it can be a program name with args.
@@ -3855,6 +3880,123 @@
   WGET="$ac_cv_path_WGET"
 fi
 
+ if test x"$WGET" = x ; then
+   { { echo "$as_me:$LINENO: error: wget program not found in PATH" >&5
+echo "$as_me: error: wget program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
+
+
+# See bug #36, we might just be able to use AC_PROG_AWK
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gawk", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gawk; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GAWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GAWK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GAWK="$GAWK" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GAWK="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GAWK=$ac_cv_path_GAWK
+if test -n "$GAWK"; then
+  { echo "$as_me:$LINENO: result: $GAWK" >&5
+echo "${ECHO_T}$GAWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_GAWK"; then
+  ac_pt_GAWK=$GAWK
+  # Extract the first word of "gawk", so it can be a program name with args.
+set dummy gawk; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_GAWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_GAWK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_GAWK="$ac_pt_GAWK" # Let the user override the test with a path.
+  ;;
+  *)
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_GAWK="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_GAWK=$ac_cv_path_ac_pt_GAWK
+if test -n "$ac_pt_GAWK"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_GAWK" >&5
+echo "${ECHO_T}$ac_pt_GAWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_GAWK" = x; then
+    GAWK=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    GAWK=$ac_pt_GAWK
+  fi
+else
+  GAWK="$ac_cv_path_GAWK"
+fi
+
+ if test x"$GAWK" = x ; then
+   { { echo "$as_me:$LINENO: error: gawk program not found in PATH" >&5
+echo "$as_me: error: gawk program not found in PATH" >&2;}
+   { (exit 1); exit 1; }; }
+ fi
+
 
 
 
@@ -8412,11 +8554,11 @@
 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
 FIND!$FIND$ac_delim
-find!$find$ac_delim
 MD5SUM!$MD5SUM$ac_delim
 PATCH!$PATCH$ac_delim
 UNZIP!$UNZIP$ac_delim
 WGET!$WGET$ac_delim
+GAWK!$GAWK$ac_delim
 BUILD_ARCH_DIR!$BUILD_ARCH_DIR$ac_delim
 INSTALL_ARCH_DIR!$INSTALL_ARCH_DIR$ac_delim
 JAVA!$JAVA$ac_delim
--- a/configure.ac	Sun Jul 08 14:50:48 2007 +0200
+++ b/configure.ac	Sun Jul 08 16:01:54 2007 +0200
@@ -10,16 +10,15 @@
 
 AC_PROG_CC([gcc])
 
-AC_PATH_TOOL([FIND], [find])
-AC_SUBST([find])
-AC_PATH_TOOL([MD5SUM], [md5sum])
-AC_SUBST([MD5SUM])
-AC_PATH_TOOL([PATCH], [patch])
-AC_SUBST([PATCH])
-AC_PATH_TOOL([UNZIP], [unzip])
-AC_SUBST([UNZIP])
-AC_PATH_TOOL([WGET], [wget])
-AC_SUBST([WGET])
+# Essential tools that are used in the build (harness)
+FIND_TOOL([FIND], [find])
+FIND_TOOL([MD5SUM], [md5sum])
+FIND_TOOL([PATCH], [patch])
+FIND_TOOL([UNZIP], [unzip])
+FIND_TOOL([WGET], [wget])
+
+# See bug #36, we might just be able to use AC_PROG_AWK
+FIND_TOOL([GAWK], [gawk])
 
 SET_ARCH_DIRS
 FIND_JAVA