]> granicus.if.org Git - libevent/commitdiff
Fix missing AC_PROG_SED on older Autoconfs
authorTay Ray Chuan <raychuan@iweb.nus.edu.sg>
Tue, 15 Jan 2013 04:52:08 +0000 (12:52 +0800)
committerTay Ray Chuan <raychuan@iweb.nus.edu.sg>
Tue, 15 Jan 2013 16:47:02 +0000 (00:47 +0800)
For pre-2.59b Autoconfs, AC_PROG_SED is not available [1]; on such
systems, avoid calling AC_PROG_SED, while providing a sensible SED.

This aids backporting to Autoconf 2.59.

[1] http://lists.gnu.org/archive/html/autotools-announce/2004-08/msg00002.html

configure.in

index a69650f654810e76c728e6bd404cc3d1791c629f..9904bdb117491bd90468225d59009ef1c2ae6a8c 100644 (file)
@@ -35,11 +35,16 @@ esac
 dnl Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_PROG_SED
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MKDIR_P
 
+# AC_PROG_SED is only available in Autoconf >= 2.59b; workaround for older
+# versions
+ifdef([AC_PROG_SED], [AC_PROG_SED], [
+AC_CHECK_PROGS(SED, [gsed sed])
+])
+
 AC_PROG_GCC_TRADITIONAL
 
 # We need to test for at least gcc 2.95 here, because older versions don't