patch for using system libz
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
61
configure.in
61
configure.in
@@ -288,6 +288,48 @@ AC_DEFUN(WX_ARG_CACHE_FLUSH,
|
||||
mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
|
||||
])
|
||||
|
||||
dnl this macro checks for a three-valued command line --with argument:
|
||||
dnl possible arguments are 'yes', 'no', or 'sys'
|
||||
dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name)
|
||||
AC_DEFUN(WX_ARG_SYS_WITH,
|
||||
[
|
||||
AC_MSG_CHECKING("for --with-$1")
|
||||
no_cache=0
|
||||
AC_ARG_WITH($1, $2,
|
||||
[
|
||||
if test "$withval" = yes; then
|
||||
ac_cv_use_$1='$3=yes'
|
||||
elif test "$withval" = sys; then
|
||||
ac_cv_use_$1='$3=sys'
|
||||
else
|
||||
ac_cv_use_$1='$3=no'
|
||||
fi
|
||||
],
|
||||
[
|
||||
LINE=`grep "$3" ${wx_arg_cache_file}`
|
||||
if test "x$LINE" != x ; then
|
||||
eval "DEFAULT_$LINE"
|
||||
else
|
||||
no_cache=1
|
||||
fi
|
||||
|
||||
ac_cv_use_$1='$3='$DEFAULT_$3
|
||||
])
|
||||
|
||||
eval "$ac_cv_use_$1"
|
||||
if test "$no_cache" != 1; then
|
||||
echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
|
||||
fi
|
||||
|
||||
if test "$$3" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
elif test "$$3" = no; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(system version)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl this macro checks for a command line argument and caches the result
|
||||
dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
|
||||
AC_DEFUN(WX_ARG_WITH,
|
||||
@@ -916,7 +958,7 @@ fi
|
||||
dnl for GUI only
|
||||
|
||||
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (www.letters.com/dmalloc)], wxUSE_DMALLOC)
|
||||
WX_ARG_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
|
||||
WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
|
||||
WX_ARG_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
|
||||
|
||||
dnl ====================
|
||||
@@ -1783,8 +1825,8 @@ if test "$wxUSE_MOTIF" = 1; then
|
||||
version = XpmLibraryVersion();
|
||||
],
|
||||
[
|
||||
XPM_LINK="-lXpm "
|
||||
AC_DEFINE(wxHAVE_LIB_XPM)
|
||||
XPM_LINK="-lXpm "
|
||||
AC_DEFINE(wxHAVE_LIB_XPM)
|
||||
AC_MSG_RESULT(found in default search path)
|
||||
COMPILED_X_PROGRAM=0
|
||||
],
|
||||
@@ -2503,9 +2545,18 @@ dnl Optional libraries
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
ZLIB_INCLUDE=
|
||||
if test "$wxUSE_ZLIB" = "yes" ; then
|
||||
if test "$wxUSE_ZLIB" = "yes" -o "$wxUSE_ZLIB" = "sys" ; then
|
||||
AC_DEFINE(wxUSE_ZLIB)
|
||||
ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib"
|
||||
if test "$wxUSE_ZLIB" = "yes" ; then
|
||||
ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib"
|
||||
else
|
||||
ZLIB_LINK=
|
||||
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, deflate, [ ZLIB_LINK="-lz" ]))
|
||||
|
||||
if test "x$ZLIB_LINK" = "x" ; then
|
||||
AC_MSG_ERROR(system zlib compression library not found! Use --with-zlib=yes to use built-in zlib)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
PNG_INCLUDE=
|
||||
|
Reference in New Issue
Block a user