From ad8efca061f2d4462e681fb6f5de8864f59795da Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 19 Jul 2007 09:42:57 -0400 Subject: BUG: fix #5329, if /usr/xpg4/bin/tail exists, use this one -> on SunOS /usr/bin/tail doesn't understand the -n + syntax -remove standard searchd dirs from FindPHP4.cmake Alex --- Modules/CPack.STGZ_Header.sh.in | 10 +++++++++- Modules/FindPHP4.cmake | 7 +------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in index 3372dd0..d0d239f 100755 --- a/Modules/CPack.STGZ_Header.sh.in +++ b/Modules/CPack.STGZ_Header.sh.in @@ -123,7 +123,15 @@ echo "" # take the archive portion of this file and pipe it to tar # the NUMERIC parameter in this command should be one more # than the number of lines in this header file -tail -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@" +# on SunOS there are two tails, the one in /usr/bin doesn't understand +# the -n + syntax, the one in /usr/xpg4/bin/ does +tail_executable=tail +if [ -x /usr/xpg4/bin/tail ] +then + tail_executable=/usr/xpg4/bin/tail +fi + +"$tail_executable" -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@" echo "Unpacking finished successfully" diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake index b7d0714..d4ccd1f 100644 --- a/Modules/FindPHP4.cmake +++ b/Modules/FindPHP4.cmake @@ -30,12 +30,7 @@ IF(PHP4_FOUND_INCLUDE_PATH) SET(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths") ENDIF(PHP4_FOUND_INCLUDE_PATH) -FIND_PROGRAM(PHP4_EXECUTABLE - NAMES php4 php - PATHS - /usr/bin - /usr/local/bin - ) +FIND_PROGRAM(PHP4_EXECUTABLE NAMES php4 php ) MARK_AS_ADVANCED( PHP4_EXECUTABLE -- cgit v0.12