diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-29 14:34:22 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-29 14:34:22 +0000 |
commit | 6be9f4dc7c015da2a94183970394935fd6ae72a2 (patch) | |
tree | e0e54cc331861f34533d6a240400f9cef789a287 /Build/source/texk/web2c/configure | |
parent | 5d10ffc76a7d39e7523819add5a8cd46542b672f (diff) |
fix Cygwin and Solaris build problems
git-svn-id: svn://tug.org/texlive/trunk@12856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/configure')
-rwxr-xr-x | Build/source/texk/web2c/configure | 111 |
1 files changed, 106 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure index 0f8d5db0a57..06af77c9b5a 100755 --- a/Build/source/texk/web2c/configure +++ b/Build/source/texk/web2c/configure @@ -893,7 +893,7 @@ XETEX_MACOSX_TRUE FONTCONFIG_LIBS FONTCONFIG_INCLUDES ipc_socketlibs -socketlibs +lua_socketlibs MINGW32_FALSE MINGW32_TRUE WIN32_FALSE @@ -18036,9 +18036,99 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -# On Solaris we may need -lrt for nanosleep in luaTeX. +# We may need additional libraries for luaTeX. +# On Solaris -lnsl for gethostbyname() and -lrt for nanosleep(). +lua_socketlibs=$socketlibs if test "x$kpse_cv_have_win32" = xno; then kpse_save_LIBS=$LIBS + { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if test "${ac_cv_search_gethostbyname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; 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" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_gethostbyname=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_gethostbyname+set}" = set; then + break +fi +done +if test "${ac_cv_search_gethostbyname+set}" = set; then + : +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + LIBS=$kpse_save_LIBS { $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } if test "${ac_cv_search_nanosleep+set}" = set; then @@ -18127,15 +18217,26 @@ if test "$ac_res" != no; then fi LIBS=$kpse_save_LIBS + case $ac_cv_search_gethostbyname in + "none required") : ;; + no) if test "x$enable_luatex" = xyes; then + { $as_echo "$as_me:$LINENO: WARNING: Sorry, no gethostbyname(): can not build luaTeX" >&5 +$as_echo "$as_me: WARNING: Sorry, no gethostbyname(): can not build luaTeX" >&2;} + enable_luatex=no +fi + ;; + *) lua_socketlibs="$lua_socketlibs ac_cv_search_gethostbyname" ;; +esac + case $ac_cv_search_nanosleep in "none required") : ;; no) if test "x$enable_luatex" = xyes; then - { $as_echo "$as_me:$LINENO: WARNING: Sorry, no nanosleep: can not build luaTeX" >&5 -$as_echo "$as_me: WARNING: Sorry, no nanosleep: can not build luaTeX" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Sorry, no nanosleep(): can not build luaTeX" >&5 +$as_echo "$as_me: WARNING: Sorry, no nanosleep(): can not build luaTeX" >&2;} enable_luatex=no fi ;; - *) socketlibs="$socketlibs ac_cv_search_nanosleep" ;; + *) lua_socketlibs="$lua_socketlibs ac_cv_search_nanosleep" ;; esac fi |