Use AC_PROG_SED

Change-Id: I879e2457b8127404b8ddf12ed2d2ff8c90a49dc3
Reviewed-on: https://code.wireshark.org/review/14755
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2016-03-25 21:26:47 +00:00 committed by João Valverde
parent 04a4b53509
commit 07f4258a50
2 changed files with 7 additions and 55 deletions

View File

@ -810,21 +810,6 @@ AC_DEFUN([AC_WIRESHARK_RPM_CHECK],
fi
])
#
# AC_WIRESHARK_GNU_SED_CHECK
# Checks if GNU sed is the first sed in PATH.
#
AC_DEFUN([AC_WIRESHARK_GNU_SED_CHECK],
[
AC_MSG_CHECKING(for GNU sed as first sed in PATH)
if ( sh -c "sed --version" </dev/null 2> /dev/null | grep "GNU sed" 2>&1 > /dev/null ) ; then
AC_MSG_RESULT(yes)
HAVE_GNU_SED=yes
else
AC_MSG_RESULT(no)
HAVE_GNU_SED=no
fi
])
#
# AC_WIRESHARK_C_ARES_CHECK

View File

@ -66,6 +66,13 @@ then
fi
AC_PROG_CXX
AC_PROG_CPP
#
# Check for versions of "sed" inadequate to handle, in libtool, a list
# of object files as large as the list in Wireshark.
#
AC_PROG_SED
AC_PROG_MKDIR_P
# Set CC_FOR_BUILD (the *local* gcc to use for building e.g. lemon)
@ -1466,46 +1473,6 @@ case "$host_os" in
;;
esac
#
# Check for versions of "sed" inadequate to handle, in libtool, a list
# of object files as large as the list in Wireshark.
#
# On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
# as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
# symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
# their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
# is the only "sed" that comes with Solaris that can handle Wireshark.
#
# Add any checks here that are necessary for other OSes.
#
AC_PATH_PROG(SED, sed)
if test "x$SED" = x
then
AC_MSG_ERROR(I couldn't find sed; make sure it's installed and in your path)
fi
AC_WIRESHARK_GNU_SED_CHECK
if test "$HAVE_GNU_SED" = no ; then
case "$host_os" in
solaris*)
AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
case `which sed` in
/bin/sed|/usr/bin/sed|/usr/ucb/sed)
AC_MSG_RESULT(yes)
AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
;;
*)
AC_MSG_RESULT(no)
;;
esac
;;
*)
:
;;
esac
fi
# Enable/disable wireshark
AC_ARG_ENABLE(wireshark,
AC_HELP_STRING( [--enable-wireshark],