summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2020-05-14 10:50:36 +1000
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2020-05-14 10:50:36 +1000
commitaf4781d12060f78d4b8631a2ba81e1f0cd9fc431 (patch)
tree6d64384c1762747cccb1c41457129882798fdc5c /configure
parentf689fea24c46b683ec8caba8d3471d4e307b120e (diff)
downloadmod_wsgi-af4781d12060f78d4b8631a2ba81e1f0cd9fc431.tar.gz
Use case statement for wildcard check and error early if can't find apxs.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure37
1 files changed, 21 insertions, 16 deletions
diff --git a/configure b/configure
index 7fd7d1e..c1c77c1 100755
--- a/configure
+++ b/configure
@@ -1938,22 +1938,27 @@ XCODE_BIN_PATTERN="${XCODE_PREFIX}.*/usr/bin/"
if test -x "${APXS}"; then
APXS_CC=`${APXS} -q CC`
APXS_LIBTOOL=`${APXS} -q LIBTOOL | sed -e "s/ .*$//"`
- if [[ ${APXS_CC} = ${XCODE_PREFIX}* ]]; then
- if test ! -x ${XCODE_CC}; then
- cat "${APXS_LIBTOOL}" | sed -e \
- "s%${XCODE_BIN_PATTERN}%/usr/bin/%" > ./libtool
- cat "${APXS}" | sed -e "s%get_vars(\"CC\")%\"/usr/bin/cc\"%" \
- -e 's%^my $libtool = .*;%my $libtool = \"./libtool\";%' > ./apxs
- else
- cat "${APXS_LIBTOOL}" | sed -e \
- "s%OSX10.[0-9][0-9]*.xctoolchain%XcodeDefault.xctoolchain%" > ./libtool
- cat "${APXS}" | sed -e "s%get_vars(\"CC\")%\"${XCODE_CC}\"%" \
- -e 's%^my $libtool = .*;%my $libtool = \"./libtool\";%' > ./apxs
- fi
-
- chmod +x ./apxs ./libtool
- APXS=./apxs
- fi
+ case ${APXS_CC} in
+ ${XCODE_PREFIX}*)
+ if test ! -x ${XCODE_CC}; then
+ cat "${APXS_LIBTOOL}" | sed -e \
+ "s%${XCODE_BIN_PATTERN}%/usr/bin/%" > ./libtool
+ cat "${APXS}" | sed -e "s%get_vars(\"CC\")%\"/usr/bin/cc\"%" \
+ -e 's%^my $libtool = .*;%my $libtool = \"./libtool\";%' > ./apxs
+ else
+ cat "${APXS_LIBTOOL}" | sed -e \
+ "s%OSX10.[0-9][0-9]*.xctoolchain%XcodeDefault.xctoolchain%" > ./libtool
+ cat "${APXS}" | sed -e "s%get_vars(\"CC\")%\"${XCODE_CC}\"%" \
+ -e 's%^my $libtool = .*;%my $libtool = \"./libtool\";%' > ./apxs
+ fi
+
+ chmod +x ./apxs ./libtool
+ APXS=./apxs
+ ;;
+ *)
+ esac
+else
+ as_fn_error $? "Apache tool 'apxs' or 'apxs2' is required to build mod_wsgi." "$LINENO" 5
fi