Cache the result of inotify check in configure
Wrap AC_LINK_IFELSE() in AC_CACHE_CHECK() to skip it if the result is already cached.
This commit is contained in:
19
configure
vendored
19
configure
vendored
@@ -1028,6 +1028,7 @@ infodir
|
|||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
|
runstatedir
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
@@ -1454,6 +1455,7 @@ datadir='${datarootdir}'
|
|||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
|
runstatedir='${localstatedir}/run'
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
@@ -1706,6 +1708,15 @@ do
|
|||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||||
|
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||||
|
| --run | --ru | --r)
|
||||||
|
ac_prev=runstatedir ;;
|
||||||
|
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||||
|
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||||
|
| --run=* | --ru=* | --r=*)
|
||||||
|
runstatedir=$ac_optarg ;;
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
@@ -1843,7 +1854,7 @@ fi
|
|||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir
|
libdir localedir mandir runstatedir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
@@ -1996,6 +2007,7 @@ Fine tuning of the installation directories:
|
|||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
|
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
@@ -32969,6 +32981,9 @@ if test "$wxUSE_FSWATCHER" = "yes"; then
|
|||||||
if test "$wxUSE_UNIX" = "yes"; then
|
if test "$wxUSE_UNIX" = "yes"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inotify is usable" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inotify is usable" >&5
|
||||||
$as_echo_n "checking whether inotify is usable... " >&6; }
|
$as_echo_n "checking whether inotify is usable... " >&6; }
|
||||||
|
if ${wx_cv_inotify_usable+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
int main() { return inotify_init(); }
|
int main() { return inotify_init(); }
|
||||||
@@ -32982,6 +32997,8 @@ else
|
|||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_inotify_usable" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_inotify_usable" >&5
|
||||||
$as_echo "$wx_cv_inotify_usable" >&6; }
|
$as_echo "$wx_cv_inotify_usable" >&6; }
|
||||||
if test "$wx_cv_inotify_usable" = "no"; then
|
if test "$wx_cv_inotify_usable" = "no"; then
|
||||||
|
@@ -5479,13 +5479,15 @@ if test "$wxUSE_FSWATCHER" = "yes"; then
|
|||||||
dnl inotify header may be present from a compatibility library so
|
dnl inotify header may be present from a compatibility library so
|
||||||
dnl check that the function is usable. We don't try to link with,
|
dnl check that the function is usable. We don't try to link with,
|
||||||
dnl e.g. -linotify so native kqueue support is used in preference.
|
dnl e.g. -linotify so native kqueue support is used in preference.
|
||||||
AC_MSG_CHECKING([whether inotify is usable])
|
AC_CACHE_CHECK(
|
||||||
|
[whether inotify is usable],
|
||||||
|
wx_cv_inotify_usable,
|
||||||
AC_LINK_IFELSE(
|
AC_LINK_IFELSE(
|
||||||
[AC_LANG_SOURCE([int main() { return inotify_init(); }])],
|
[AC_LANG_SOURCE([int main() { return inotify_init(); }])],
|
||||||
[wx_cv_inotify_usable=yes; AC_DEFINE(wxHAS_INOTIFY) ],
|
[wx_cv_inotify_usable=yes; AC_DEFINE(wxHAS_INOTIFY) ],
|
||||||
[wx_cv_inotify_usable=no]
|
[wx_cv_inotify_usable=no]
|
||||||
)
|
)
|
||||||
AC_MSG_RESULT($wx_cv_inotify_usable)
|
)
|
||||||
if test "$wx_cv_inotify_usable" = "no"; then
|
if test "$wx_cv_inotify_usable" = "no"; then
|
||||||
AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
|
AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
|
||||||
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
||||||
|
Reference in New Issue
Block a user