Skip to content

Commit de8ff31

Browse files
author
foobar
committed
Fixed bug: php#13556
1 parent 8a06f66 commit de8ff31

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ext/crack/config.m4

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ PHP_ARG_WITH(crack, whether to include crack support,
44
[ --with-crack[=DIR] Include crack support.])
55

66
if test "$PHP_CRACK" != "no"; then
7+
78
for i in /usr/local/lib /usr/lib $PHP_CRACK $PHP_CRACK/cracklib; do
8-
if test -f $i/libcrack.a; then
9-
CRACK_LIBDIR=$i
10-
fi
9+
test -f $i/lib/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/lib/libcrack.a && CRACK_LIBDIR=$i
1110
done
11+
1212
for i in /usr/local/include /usr/include $PHP_CRACK $PHP_CRACK/cracklib; do
13-
if test -f $i/packer.h; then
14-
CRACK_INCLUDEDIR=$i
15-
fi
13+
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
1614
done
1715

1816
if test -z "$CRACK_LIBDIR"; then
1917
AC_MSG_ERROR(Cannot find the cracklib library file)
2018
fi
19+
2120
if test -z "$CRACK_INCLUDEDIR"; then
2221
AC_MSG_ERROR(Cannot find a cracklib header file)
2322
fi
@@ -26,8 +25,7 @@ if test "$PHP_CRACK" != "no"; then
2625
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
2726

2827
PHP_EXTENSION(crack, $ext_shared)
29-
28+
PHP_SUBST(CRACK_SHARED_LIBADD)
3029
AC_DEFINE(HAVE_CRACK, 1, [ ])
3130
fi
3231

33-
PHP_SUBST(CRACK_SHARED_LIBADD)

0 commit comments

Comments
 (0)