Commit 058e2225 authored by Lev Walkin's avatar Lev Walkin

check for iberty before mkstemps: mingw fix

parent f68b9323
...@@ -22501,38 +22501,18 @@ _ACEOF ...@@ -22501,38 +22501,18 @@ _ACEOF
fi fi
{ echo "$as_me:$LINENO: checking for library containing getopt" >&5
echo $ECHO_N "checking for library containing getopt... $ECHO_C" >&6; }
for ac_func in strtoimax strtoll if test "${ac_cv_search_getopt+set}" = set; then
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error. /* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC Use char because int might match the return type of a GCC
...@@ -22540,23 +22520,23 @@ cat >>conftest.$ac_ext <<_ACEOF ...@@ -22540,23 +22520,23 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
char $ac_func (); char getopt ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int int
main () main ()
{ {
return $ac_func (); return getopt ();
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext for ac_lib in '' iberty; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
...@@ -22590,30 +22570,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ...@@ -22590,30 +22570,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
eval "$as_ac_var=yes" ac_cv_search_getopt=$ac_res
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
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
if test "${ac_cv_search_getopt+set}" = set; then
break
fi fi
ac_res=`eval echo '${'$as_ac_var'}'` done
{ echo "$as_me:$LINENO: result: $ac_res" >&5 if test "${ac_cv_search_getopt+set}" = set; then
echo "${ECHO_T}$ac_res" >&6; } :
if test `eval echo '${'$as_ac_var'}'` = yes; then else
cat >>confdefs.h <<_ACEOF ac_cv_search_getopt=no
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 fi
_ACEOF rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_search_getopt" >&5
echo "${ECHO_T}$ac_cv_search_getopt" >&6; }
ac_res=$ac_cv_search_getopt
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi fi
done
for ac_func in mergesort
for ac_func in strtoimax strtoll
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5 { echo "$as_me:$LINENO: checking for $ac_func" >&5
...@@ -22723,7 +22713,7 @@ fi ...@@ -22723,7 +22713,7 @@ fi
done done
for ac_func in mkstemps for ac_func in mergesort
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5 { echo "$as_me:$LINENO: checking for $ac_func" >&5
...@@ -22833,18 +22823,36 @@ fi ...@@ -22833,18 +22823,36 @@ fi
done done
{ echo "$as_me:$LINENO: checking for library containing getopt" >&5 for ac_func in mkstemps
echo $ECHO_N "checking for library containing getopt... $ECHO_C" >&6; } do
if test "${ac_cv_search_getopt+set}" = set; then as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error. /* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC Use char because int might match the return type of a GCC
...@@ -22852,23 +22860,23 @@ cat >>conftest.$ac_ext <<_ACEOF ...@@ -22852,23 +22860,23 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
char getopt (); char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int int
main () main ()
{ {
return getopt (); return $ac_func ();
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
for ac_lib in '' iberty; do rm -f conftest.$ac_objext conftest$ac_exeext
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
...@@ -22902,35 +22910,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ...@@ -22902,35 +22910,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_search_getopt=$ac_res eval "$as_ac_var=yes"
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest$ac_exeext conftest.$ac_ext
if test "${ac_cv_search_getopt+set}" = set; then
break
fi
done
if test "${ac_cv_search_getopt+set}" = set; then
:
else
ac_cv_search_getopt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi fi
{ echo "$as_me:$LINENO: result: $ac_cv_search_getopt" >&5 ac_res=`eval echo '${'$as_ac_var'}'`
echo "${ECHO_T}$ac_cv_search_getopt" >&6; } { echo "$as_me:$LINENO: result: $ac_res" >&5
ac_res=$ac_cv_search_getopt echo "${ECHO_T}$ac_res" >&6; }
if test "$ac_res" != no; then if test `eval echo '${'$as_ac_var'}'` = yes; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi fi
done
ac_config_headers="$ac_config_headers config.h" ac_config_headers="$ac_config_headers config.h"
......
...@@ -75,13 +75,13 @@ AC_TYPE_SIZE_T ...@@ -75,13 +75,13 @@ AC_TYPE_SIZE_T
AC_STRUCT_TM AC_STRUCT_TM
AC_CHECK_TYPE(intmax_t, int64_t) AC_CHECK_TYPE(intmax_t, int64_t)
dnl For mingw
AC_SEARCH_LIBS(getopt, iberty)
AC_CHECK_FUNCS(strtoimax strtoll) AC_CHECK_FUNCS(strtoimax strtoll)
AC_CHECK_FUNCS(mergesort) AC_CHECK_FUNCS(mergesort)
AC_CHECK_FUNCS(mkstemps) AC_CHECK_FUNCS(mkstemps)
dnl For mingw
AC_SEARCH_LIBS(getopt, iberty)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_OUTPUT( \ AC_OUTPUT( \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment