summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-01-05 10:51:22 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-01-05 10:51:22 +0000
commit3c910165678f4accb5d4c161ed83a8e125ffb803 (patch)
tree8101cdbb961e3206303baecaa50c3f814e97d661 /Build/source/texk/web2c
parent58ec6ee9f72e68fe95a270a2295b102a7e138e40 (diff)
luaTeX: Check for hstrerror()
git-svn-id: svn://tug.org/texlive/trunk@28737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rwxr-xr-xBuild/source/texk/web2c/configure73
-rw-r--r--Build/source/texk/web2c/configure.ac5
3 files changed, 82 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index c997ce17a7b..ea94e0a7d05 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,5 +1,9 @@
2013-01-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * configure.ac: Check for hstrerror() needed by luaTeX.
+
+2013-01-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
* configure.ac: Check if system defines and declares strndup().
2013-01-04 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index efde2090e4e..8d4ca4f7ce3 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -18479,6 +18479,62 @@ if test "$ac_res" != no; then :
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing hstrerror" >&5
+$as_echo_n "checking for library containing hstrerror... " >&6; }
+if ${ac_cv_search_hstrerror+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char hstrerror ();
+int
+main ()
+{
+return hstrerror ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; 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
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_hstrerror=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_hstrerror+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_hstrerror+:} false; then :
+
+else
+ ac_cv_search_hstrerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hstrerror" >&5
+$as_echo "$ac_cv_search_hstrerror" >&6; }
+ac_res=$ac_cv_search_hstrerror
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_aton" >&5
$as_echo_n "checking for library containing inet_aton... " >&6; }
if ${ac_cv_search_inet_aton+:} false; then :
@@ -18669,6 +18725,23 @@ done
fi
fi
LIBS=$kpse_save_LIBS
+ case $ac_cv_search_hstrerror in #(
+ "none required") :
+ ;; #(
+ no) :
+ if test "x$enable_luatex" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, no hstrerror(): disabling luatex" >&5
+$as_echo "$as_me: WARNING: Sorry, no hstrerror(): disabling luatex" >&2;}
+if test "x$enable_missing" = xno; then :
+ as_fn_error $? "terminating." "$LINENO" 5
+fi
+
+ enable_luatex=no
+fi
+ ;; #(
+ *) :
+ lua_socketlibs="$lua_socketlibs $ac_cv_search_hstrerror" ;;
+esac
case $ac_cv_search_inet_aton in #(
"none required") :
;; #(
diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac
index 574cd7e6546..7250f7aa87e 100644
--- a/Build/source/texk/web2c/configure.ac
+++ b/Build/source/texk/web2c/configure.ac
@@ -100,6 +100,7 @@ lua_socketlibs=$socketlibs
if test "x$kpse_cv_have_win32" = xno; then
kpse_save_LIBS=$LIBS
AC_SEARCH_LIBS([gethostbyname], [nsl])
+ AC_SEARCH_LIBS([hstrerror], [resolv])
AC_SEARCH_LIBS([inet_aton], [resolv])
LIBS=$kpse_save_LIBS
AC_SEARCH_LIBS([nanosleep], [rt])
@@ -114,6 +115,10 @@ if test "x$kpse_cv_have_win32" = xno; then
fi
fi
LIBS=$kpse_save_LIBS
+ AS_CASE([$ac_cv_search_hstrerror],
+ ["none required"], [],
+ [no], [WEB2C_DISABLE([luatex], [no hstrerror()])],
+ [lua_socketlibs="$lua_socketlibs $ac_cv_search_hstrerror"])
AS_CASE([$ac_cv_search_inet_aton],
["none required"], [],
[no], [WEB2C_DISABLE([luatex], [no inet_aton()])],