| 1 |
# Public macros for the TeX Live (TL) tree. |
| 2 |
# Copyright (C) 1997 Karl Berry <[email protected]> |
| 3 |
# Copyright (C) 2009 Peter Breitenlohner <[email protected]> |
| 4 |
# with help from Taco Hoekwater <[email protected]> |
| 5 |
# |
| 6 |
# This file is free software; the copyright holders |
| 7 |
# give unlimited permission to copy and/or distribute it, |
| 8 |
# with or without modifications, as long as this notice is preserved. |
| 9 |
|
| 10 |
# serial 0 |
| 11 |
|
| 12 |
# KPSE_CHECK_SOCKET_LIBS |
| 13 |
# ---------------------- |
| 14 |
# Set ac_cv_search_connect as AC_SEARCH_LIBS([connect], [LIB...]) |
| 15 |
# would do. |
| 16 |
# -lsocket is needed on Solaris, at least. Maybe -lnsl on SCO, too? |
| 17 |
# See AC_PATH_XTRA. |
| 18 |
# For WIN32 systems we need -lwsock32 but AC_SEARCH_LIBS would fail. |
| 19 |
AC_DEFUN([KPSE_CHECK_SOCKET_LIBS], |
| 20 |
[AC_REQUIRE([KPSE_CHECK_WIN32]) |
| 21 |
AS_IF([test "x$kpse_cv_have_win32" = xno], |
| 22 |
[kpse_save_LIBS=$LIBS |
| 23 |
AC_SEARCH_LIBS([connect], [socket nsl]) |
| 24 |
LIBS=$kpse_save_LIBS], |
| 25 |
[AC_CHECK_LIB([wsock32], [main], |
| 26 |
[ac_cv_search_connect=-lwsock32], |
| 27 |
[ac_cv_search_connect=no])]) |
| 28 |
]) # KPSE_CHECK_SOCKET_LIBS |