From 70518622058f43af432d8c94df66b92e691f4a10 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 23 May 2020 06:46:55 +0000 Subject: [PATCH] added clearenv check in configure.ac --- mio/Makefile.in | 1 + mio/bin/Makefile.in | 1 + mio/configure | 23 ++++++++++++++++++----- mio/configure.ac | 2 +- mio/lib/mio-cfg.h.in | 3 +++ 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/mio/Makefile.in b/mio/Makefile.in index c321188..4e90611 100644 --- a/mio/Makefile.in +++ b/mio/Makefile.in @@ -347,6 +347,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/mio/bin/Makefile.in b/mio/bin/Makefile.in index 6830e16..240f5ef 100644 --- a/mio/bin/Makefile.in +++ b/mio/bin/Makefile.in @@ -337,6 +337,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/mio/configure b/mio/configure index 71e6bba..37aa5ce 100755 --- a/mio/configure +++ b/mio/configure @@ -770,6 +770,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -861,6 +862,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1113,6 +1115,15 @@ do | -silent | --silent | --silen | --sile | --sil) 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) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1250,7 +1261,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1403,6 +1414,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -17752,12 +17764,13 @@ done -for ac_func in uselocale +for ac_func in uselocale clearenv do : - ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" -if test "x$ac_cv_func_uselocale" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_USELOCALE 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi diff --git a/mio/configure.ac b/mio/configure.ac index e2d7ea9..4ae8665 100644 --- a/mio/configure.ac +++ b/mio/configure.ac @@ -146,7 +146,7 @@ dnl [], dnl [#include ]) dnl check functions -AC_CHECK_FUNCS([uselocale]) +AC_CHECK_FUNCS([uselocale clearenv]) AC_CHECK_FUNCS([mbrlen mbrtowc wcrtomb]) AC_CHECK_FUNCS([mbsnrtowcs mbsrtowcs wcsnrtombs wcsrtombs]) AC_CHECK_FUNCS([wctype iswctype wctrans towctrans]) diff --git a/mio/lib/mio-cfg.h.in b/mio/lib/mio-cfg.h.in index cf402b9..a845e13 100644 --- a/mio/lib/mio-cfg.h.in +++ b/mio/lib/mio-cfg.h.in @@ -72,6 +72,9 @@ /* Define to 1 if you have the `ceilq' function. */ #undef HAVE_CEILQ +/* Define to 1 if you have the `clearenv' function. */ +#undef HAVE_CLEARENV + /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME