* Porting to Autoconf 2.5 (copnfigure.in -> configure.ac, etc)

* Porting to version 0.3 of libidn
* New autoconf test for GNU libidn
Initial
Stephane Bortzmeyer 21 years ago
parent efcfa00812
commit 9d0fec5e12

@ -17,7 +17,8 @@ may not be available on your platform).
--disable-http (suppress the HTTP support) --disable-http (suppress the HTTP support)
--disable-smtp (suppress the SMTP support) --disable-smtp (suppress the SMTP support)
--enable-icp (add the ICP support, to monitor Web proxies like Squid) --enable-icp (add the ICP support, to monitor Web proxies like Squid)
--disable-idn (suppress the IDN support, the handling of Unicode domaine names, see RFC 3490) --without-libidn (suppress the IDN support, the handling of Unicode - multi-script - domain names, see RFC 3490)
--with-libidn[=/where/is/libidn] (tell the system where to find the GNU libidn library <http://www.josefsson.org/libidn/>)
--with-gnutls[=/where/is/gnutls] (add the SSL/TLS support, you will need --with-gnutls[=/where/is/gnutls] (add the SSL/TLS support, you will need
the GNU TLS library <http://www.gnutls.org/>) the GNU TLS library <http://www.gnutls.org/>)
--with-ssl[=/where/is/ssl] (add the SSL/TLS support, you will need --with-ssl[=/where/is/ssl] (add the SSL/TLS support, you will need

@ -9,7 +9,7 @@ echoping_LDADD =
DOCS=DETAILS DOCS=DETAILS
TESTS=test-echoping-local test-echoping-remote TESTS=test-echoping-local test-echoping-remote
MORE_TESTS=test-echoping-proxy test-echoping-icp test-echoping-crypto test-echoping-tos test-echoping-ipv6 MORE_TESTS=test-echoping-proxy test-echoping-icp test-echoping-crypto test-echoping-tos test-echoping-ipv6 test-echoping-idn
test: check test: check
tests: check tests: check

@ -103,9 +103,9 @@ MANS = $(man_MANS)
NROFF = nroff NROFF = nroff
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 \ Makefile.am Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess \
config.guess config.h.in config.sub configure configure.in install-sh \ config.h.in config.sub configure configure.ac install-sh missing \
missing mkinstalldirs mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@ -120,19 +120,19 @@ OBJECTS = $(echoping_OBJECTS)
all: all-redirect all: all-redirect
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .S .c .o .s .SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4 $(ACLOCAL_M4): configure.ac acinclude.m4
cd $(srcdir) && $(ACLOCAL) cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES) config.status: $(srcdir)/configure.ac $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h config.h: stamp-h
@ -150,7 +150,7 @@ $(srcdir)/config.h.in: $(srcdir)/stamp-h.in
rm -f $(srcdir)/stamp-h.in; \ rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \
else :; fi else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h $(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER) cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null

@ -1,45 +0,0 @@
@BOTTOM@
/* Do we have getaddrinfo()? */
#undef HAVE_GETADDRINFO_PROTO
/* Do we have POSIX signals? */
#undef HAVE_SIGACTION
/* Do we have T/TCP? */
#undef HAVE_TTCP
/* Do we have TOS? */
#undef HAVE_TOS
/* Do we have socket priority? */
#undef HAVE_SOCKET_PRIORITY
/* HTTP support */
#undef HTTP
/* SMTP support */
#undef SMTP
/* ICP support */
#undef ICP
/* IDN (Unicode) */
#undef IDN
/* SSL (crypto) */
#undef OPENSSL
/* TLS (crypto) */
#undef GNUTLS
/* Port name for HTTP. Unused. */
#undef HTTP_TCP_PORT
/* Port name for ICP */
#undef ICP_UDP_PORT
#undef PACKAGE
#undef VERSION
/* $Id$ */

@ -158,6 +158,15 @@ else
fi fi
]) ])
# Check GNU libidn
# TODO: check the patched libc with AI_IDN. See libidn, in libc/getaddrinfo-idn.txt.
AC_DEFUN([CF_LIB_LIBIDN],
[
AC_CHECK_LIB(idn,idna_to_ascii_8z,
[LIBS="${LIBS} -lidn"],
[AC_ERROR([Get the GNU libidn library (http://www.josefsson.org/libidn/) in order to use Unicode - multi-script - domain names or use --without-libidn to disable it])], dnl
)])
# Check OpenSSL # Check OpenSSL
AC_DEFUN([CF_LIB_OPENSSL], AC_DEFUN([CF_LIB_OPENSSL],
[ [
@ -175,14 +184,6 @@ AC_CHECK_LIB(gnutls,gnutls_global_init,
[AC_ERROR([Get the GNU TLS library (http://www.gnutls.org/)])], dnl [AC_ERROR([Get the GNU TLS library (http://www.gnutls.org/)])], dnl
)]) )])
# Check GNU libidn
AC_DEFUN([CF_LIB_GNUIDN],
[
AC_CHECK_LIB(idn,idna_to_ascii_from_utf8,
[LIBS="${LIBS} `pkg-config libidn --libs-only-L` `pkg-config libidn --libs-only-l`"],
[AC_ERROR([Get the GNU IDN library (http://www.josefsson.org/libidn/) or use --disable-idn])], dnl
)])
dnl experimental dnl experimental
AC_DEFUN([CF_CHECK_TCP_SERVICE], AC_DEFUN([CF_CHECK_TCP_SERVICE],
[ [

42
SRC/aclocal.m4 vendored

@ -170,6 +170,14 @@ else
fi fi
]) ])
# Check GNU libidn
AC_DEFUN([CF_LIB_LIBIDN],
[
AC_CHECK_LIB(idn,idna_to_ascii_8z,
[LIBS="${LIBS} -lidn"],
[AC_ERROR([Get the GNU libidn library (http://www.josefsson.org/libidn/) in order to use Unicode - multi-script - domain names or use --without-libidn to disable it])], dnl
)])
# Check OpenSSL # Check OpenSSL
AC_DEFUN([CF_LIB_OPENSSL], AC_DEFUN([CF_LIB_OPENSSL],
[ [
@ -187,14 +195,6 @@ AC_CHECK_LIB(gnutls,gnutls_global_init,
[AC_ERROR([Get the GNU TLS library (http://www.gnutls.org/)])], dnl [AC_ERROR([Get the GNU TLS library (http://www.gnutls.org/)])], dnl
)]) )])
# Check GNU libidn
AC_DEFUN([CF_LIB_GNUIDN],
[
AC_CHECK_LIB(idn,idna_to_ascii_from_utf8,
[LIBS="${LIBS} `pkg-config libidn --libs-only-L` `pkg-config libidn --libs-only-l`"],
[AC_ERROR([Get the GNU IDN library (http://www.josefsson.org/libidn/) or use --disable-idn])], dnl
)])
dnl experimental dnl experimental
AC_DEFUN([CF_CHECK_TCP_SERVICE], AC_DEFUN([CF_CHECK_TCP_SERVICE],
[ [
@ -281,7 +281,7 @@ fi
# lib-prefix.m4 serial 3 (gettext-0.12.2) # lib-prefix.m4 serial 3 (gettext-0.13)
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General dnl General Public License. As a special exception to the GNU General
@ -989,7 +989,7 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
done done
]) ])
# lib-ld.m4 serial 2 (gettext-0.12) # lib-ld.m4 serial 3 (gettext-0.13)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General dnl General Public License. As a special exception to the GNU General
@ -1005,11 +1005,12 @@ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU], AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then case `$LD -v 2>&1 </dev/null` in
acl_cv_prog_gnu_ld=yes *GNU* | *'with BFD'*)
else acl_cv_prog_gnu_ld=yes ;;
acl_cv_prog_gnu_ld=no *)
fi]) acl_cv_prog_gnu_ld=no ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld with_gnu_ld=$acl_cv_prog_gnu_ld
]) ])
@ -1079,11 +1080,12 @@ AC_CACHE_VAL(acl_cv_path_LD,
# Check to see if the program is GNU ld. I'd rather use --version, # Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v. # but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer. # Break only if it was the GNU/non-GNU ld that we prefer.
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
test "$with_gnu_ld" != no && break *GNU* | *'with BFD'*)
else test "$with_gnu_ld" != no && break ;;
test "$with_gnu_ld" != yes && break *)
fi test "$with_gnu_ld" != yes && break ;;
esac
fi fi
done done
IFS="$ac_save_ifs" IFS="$ac_save_ifs"

@ -1,100 +1,121 @@
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* Define to empty if the keyword does not work. */ /* Crypto (TLS) support */
#undef const #undef GNUTLS
/* Define if you don't have vprintf but do have _doprnt. */ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT #undef HAVE_DOPRNT
/* Define if you have the vprintf function. */ /* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_VPRINTF
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO #undef HAVE_GETADDRINFO
/* Define if you have the getnameinfo function. */ /* Define to 1 if you have the `getnameinfo' function. */
#undef HAVE_GETNAMEINFO #undef HAVE_GETNAMEINFO
/* Define if you have the gettimeofday function. */ /* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY #undef HAVE_GETTIMEOFDAY
/* Define if you have the inet_ntop function. */ /* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP #undef HAVE_INET_NTOP
/* Define if you have the sigaction function. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION #undef HAVE_SIGACTION
/* Define if you have the socket function. */ /* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET #undef HAVE_SOCKET
/* Define if you have the strerror function. */ /* Socket priority support */
#undef HAVE_SOCKET_PRIORITY
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR #undef HAVE_STRERROR
/* Define if you have the usleep function. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_USLEEP #undef HAVE_STRINGS_H
/* Define if you have the <sys/time.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H #undef HAVE_SYS_TIME_H
/* Define if you have the <unistd.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Type Of Service support */
#undef HAVE_TOS
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Name of package */ /* Define to 1 if you have the `usleep' function. */
#undef PACKAGE #undef HAVE_USLEEP
/* Version number of package */ /* Define to 1 if you have the `vprintf' function. */
#undef VERSION #undef HAVE_VPRINTF
/* HTTP support */
#undef HTTP
/* Do we have getaddrinfo()? */ /* ICP support */
#undef HAVE_GETADDRINFO_PROTO #undef ICP
/* Do we have POSIX signals? */ /* Internationalized Domain Names support */
#undef HAVE_SIGACTION #undef LIBIDN
/* Do we have T/TCP? */ /* Crypto (SSL) support */
#undef HAVE_TTCP #undef OPENSSL
/* Do we have TOS? */ /* Name of package */
#undef HAVE_TOS #undef PACKAGE
/* Do we have socket priority? */ /* Define to the address where bug reports for this package should be sent. */
#undef HAVE_SOCKET_PRIORITY #undef PACKAGE_BUGREPORT
/* HTTP support */ /* Define to the full name of this package. */
#undef HTTP #undef PACKAGE_NAME
/* SMTP support */ /* Define to the full name and version of this package. */
#undef SMTP #undef PACKAGE_STRING
/* ICP support */ /* Define to the one symbol short name of this package. */
#undef ICP #undef PACKAGE_TARNAME
/* IDN (Unicode) */ /* Define to the version of this package. */
#undef IDN #undef PACKAGE_VERSION
/* SSL (crypto) */ /* Define as the return type of signal handlers (`int' or `void'). */
#undef OPENSSL #undef RETSIGTYPE
/* TLS (crypto) */ /* SMTP support */
#undef GNUTLS #undef SMTP
/* Port name for HTTP. Unused. */ /* Define to 1 if you have the ANSI C header files. */
#undef HTTP_TCP_PORT #undef STDC_HEADERS
/* Port name for ICP */ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef ICP_UDP_PORT #undef TIME_WITH_SYS_TIME
#undef PACKAGE /* Transaction TCP support */
#undef TTCP
/* Version number of package */
#undef VERSION #undef VERSION
/* $Id$ */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const

7520
SRC/configure vendored

File diff suppressed because it is too large Load Diff

@ -3,6 +3,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(echoping.h) AC_INIT(echoping.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_PROG_CC(cc gcc)
AM_INIT_AUTOMAKE(echoping, 5.2.0-BETA) AM_INIT_AUTOMAKE(echoping, 5.2.0-BETA)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
@ -10,40 +11,49 @@ dnl User options
AC_ARG_ENABLE(http, AC_ARG_ENABLE(http,
[--enable-http HTTP (Web's main protocol) support],dnl [--enable-http HTTP (Web's main protocol) support],dnl
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
AC_DEFINE(HTTP) AC_DEFINE(HTTP,,[HTTP support])
HTTP=1 HTTP=1
fi], fi],
dnl Default: enable it dnl Default: enable it
[AC_DEFINE(HTTP) [AC_DEFINE(HTTP,,[HTTP support])
HTTP=1]) HTTP=1])
AC_ARG_ENABLE(icp, AC_ARG_ENABLE(icp,
[--enable-icp ICP (for testing Web proxies/caches) support],dnl [--enable-icp ICP (for testing Web proxies/caches) support],dnl
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
AC_DEFINE(ICP) AC_DEFINE(ICP,,[ICP support])
ICP=1 ICP=1
fi]) fi])
AC_ARG_ENABLE(smtp, AC_ARG_ENABLE(smtp,
[--enable-smtp SMTP (Mail's main protocol) support],dnl [--enable-smtp SMTP (Mail's main protocol) support],dnl
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
AC_DEFINE(SMTP) AC_DEFINE(SMTP,,[SMTP support])
SMTP=1 SMTP=1
fi], fi],
dnl Default: enable it dnl Default: enable it
[AC_DEFINE(SMTP) [AC_DEFINE(SMTP,,[SMTP support])
SMTP=1]) SMTP=1])
AC_ARG_ENABLE(idn, dnl IDN
[--enable-idn IDN (Internationalized Domain Names, host names in Unicode, with GNU libidn) support],dnl dnl Default: enable it
[if test "$enableval" = "yes"; then LIBIDN=1
AC_DEFINE(IDN) AC_ARG_WITH(libidn,
IDN=1 [--with-libidn[=DIR] Internationalized Domain Names support (needs GNU libidn)],dnl
[if test "$withval" != "no"; then
if test "$withval" != "yes"; then
IDNROOT=$withval
LDFLAGS="${LDFLAGS} -L$IDNROOT/lib"
CPPFLAGS="${CPPFLAGS} -I$IDNROOT/include"
fi
else
LIBIDN=0
fi], fi],
dnl Default: enable it )
[AC_DEFINE(IDN) if test "$LIBIDN" = "1"; then
IDN=1]) AC_DEFINE(LIBIDN,,[Internationalized Domain Names support])
fi
AC_ARG_WITH(ssl, AC_ARG_WITH(ssl,
[--with-ssl[=DIR] SSL crypt support (needs OpenSSL)],dnl [--with-ssl[=DIR] SSL crypt support (needs OpenSSL)],dnl
[if test "$withval" != "no"; then [if test "$withval" != "no"; then
AC_DEFINE(OPENSSL) AC_DEFINE(OPENSSL,,[Crypto (SSL) support])
OPENSSL=1 OPENSSL=1
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
SSLROOT=$withval SSLROOT=$withval
@ -56,7 +66,7 @@ AC_ARG_WITH(ssl,
AC_ARG_WITH(gnutls, AC_ARG_WITH(gnutls,
[--with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl [--with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl
[if test "$withval" != "no"; then [if test "$withval" != "no"; then
AC_DEFINE(GNUTLS) AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
GNUTLS=1 GNUTLS=1
CPPFLAGS="${CPPFLAGS} `libgnutls-config --cflags`" CPPFLAGS="${CPPFLAGS} `libgnutls-config --cflags`"
LDFLAGS="${LDFLAGS} `libgnutls-config --libs`" LDFLAGS="${LDFLAGS} `libgnutls-config --libs`"
@ -119,10 +129,9 @@ AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_ntop, ,
AC_CHECK_FUNCS(gettimeofday socket sigaction strerror, , AC_MSG_ERROR(Missing mandatory function)) AC_CHECK_FUNCS(gettimeofday socket sigaction strerror, , AC_MSG_ERROR(Missing mandatory function))
AC_CHECK_FUNCS(usleep) AC_CHECK_FUNCS(usleep)
if test "$IDN" = "1"; then if test "$LIBIDN" = "1"; then
CF_LIB_GNUIDN CF_LIB_LIBIDN
fi fi
if test "$OPENSSL" = "1" && test "$GNUTLS" = "1"; then if test "$OPENSSL" = "1" && test "$GNUTLS" = "1"; then
AC_MSG_ERROR([Choose OpenSSL or GNU TLS but not both]) AC_MSG_ERROR([Choose OpenSSL or GNU TLS but not both])
fi fi
@ -140,7 +149,7 @@ AC_TRY_COMPILE(
#include <sys/socket.h> #include <sys/socket.h>
], ],
[int foobar = MSG_EOF;], [int foobar = MSG_EOF;],
[AC_DEFINE(TTCP) [AC_DEFINE(TTCP,,[Transaction TCP support])
ac_have_ttcp="yes"], ac_have_ttcp="yes"],
ac_have_ttcp=no) ac_have_ttcp=no)
AC_MSG_RESULT($ac_have_ttcp) AC_MSG_RESULT($ac_have_ttcp)
@ -148,7 +157,7 @@ AC_ARG_ENABLE(ttcp,
[--enable-ttcp T/TCP (Transaction TCP) support], [--enable-ttcp T/TCP (Transaction TCP) support],
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
if test $ac_have_ttcp = "yes"; then if test $ac_have_ttcp = "yes"; then
AC_DEFINE(HAVE_TTCP) AC_DEFINE(TTCP,,[Transaction TCP support])
TTCP=1 TTCP=1
else else
AC_MSG_WARN([No T/TCP support on this system, request ignored]) AC_MSG_WARN([No T/TCP support on this system, request ignored])
@ -156,7 +165,7 @@ AC_ARG_ENABLE(ttcp,
fi], fi],
dnl Default: enable it if supported dnl Default: enable it if supported
if test $ac_have_ttcp = "yes"; then if test $ac_have_ttcp = "yes"; then
AC_DEFINE(HAVE_TTCP) AC_DEFINE(TTCP,,[Transaction TCP support])
TTCP=1 TTCP=1
fi) fi)
@ -167,7 +176,7 @@ AC_TRY_COMPILE(
#include <netinet/in.h> #include <netinet/in.h>
], ],
[int foobar = IP_TOS;], [int foobar = IP_TOS;],
[AC_DEFINE(HAVE_TOS) [AC_DEFINE(HAVE_TOS,,[Type Of Service support])
ac_have_tos="yes"], ac_have_tos="yes"],
ac_have_tos="no") ac_have_tos="no")
AC_MSG_RESULT($ac_have_tos) AC_MSG_RESULT($ac_have_tos)
@ -175,7 +184,7 @@ AC_ARG_ENABLE(tos,
[--enable-tos TOS (Type Of Service) support], [--enable-tos TOS (Type Of Service) support],
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
if test $ac_have_tos = "yes"; then if test $ac_have_tos = "yes"; then
AC_DEFINE(HAVE_TOS) AC_DEFINE(HAVE_TOS,,[Type Of Service support])
TOS=1 TOS=1
else else
AC_MSG_WARN([No TOS support on this system, request ignored]) AC_MSG_WARN([No TOS support on this system, request ignored])
@ -183,7 +192,7 @@ AC_ARG_ENABLE(tos,
fi], fi],
dnl Default: enable it if supported dnl Default: enable it if supported
if test $ac_have_tos = "yes"; then if test $ac_have_tos = "yes"; then
AC_DEFINE(HAVE_TOS) AC_DEFINE(HAVE_TOS,,[Type Of Service support])
TOS=1 TOS=1
fi) fi)
@ -203,7 +212,7 @@ AC_ARG_ENABLE(priority,
[--enable-priority PRIORITY (socket priority) support], [--enable-priority PRIORITY (socket priority) support],
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
if test $ac_have_priority = "yes"; then if test $ac_have_priority = "yes"; then
AC_DEFINE(HAVE_SOCKET_PRIORITY) AC_DEFINE(HAVE_SOCKET_PRIORITY,,[Socket priority support])
PRIORITY=1 PRIORITY=1
else else
AC_MSG_WARN([No socket priority support on this system, request ignored]) AC_MSG_WARN([No socket priority support on this system, request ignored])
@ -211,7 +220,7 @@ AC_ARG_ENABLE(priority,
fi], fi],
dnl Default: enable it if supported dnl Default: enable it if supported
if test $ac_have_priority = "yes"; then if test $ac_have_priority = "yes"; then
AC_DEFINE(HAVE_SOCKET_PRIORITY) AC_DEFINE(HAVE_SOCKET_PRIORITY,,[Socket priority support])
PRIORITY=1 PRIORITY=1
fi) fi)
@ -238,7 +247,7 @@ DISPLAY_SETTING(ICP)
DISPLAY_SETTING(OPENSSL) DISPLAY_SETTING(OPENSSL)
DISPLAY_SETTING(GNUTLS) DISPLAY_SETTING(GNUTLS)
DISPLAY_SETTING(SMTP) DISPLAY_SETTING(SMTP)
DISPLAY_SETTING(IDN) DISPLAY_SETTING(LIBIDN)
DISPLAY_SETTING(TTCP) DISPLAY_SETTING(TTCP)
DISPLAY_SETTING(TOS) DISPLAY_SETTING(TOS)
DISPLAY_SETTING(PRIORITY) DISPLAY_SETTING(PRIORITY)

@ -425,7 +425,7 @@ main (argc, argv)
printf ("\nThis is %s, version %s.\n\n", progname, VERSION); printf ("\nThis is %s, version %s.\n\n", progname, VERSION);
} }
server = argv[0]; server = argv[0];
#ifdef IDN #ifdef LIBIDN
locale_server = server; locale_server = server;
utf8_server = stringprep_locale_to_utf8 (server); utf8_server = stringprep_locale_to_utf8 (server);
if (utf8_server) if (utf8_server)
@ -525,10 +525,10 @@ main (argc, argv)
} }
#endif #endif
#ifdef IDN #ifdef LIBIDN
if ((result = if ((result =
idna_to_ascii_from_utf8 (utf8_server, &ace_server, 0, idna_to_ascii_8z (utf8_server, &ace_server, IDNA_USE_STD3_ASCII_RULES
1)) != IDNA_SUCCESS) )) != IDNA_SUCCESS)
{ {
err_quit ("IDN error for host: %s %d", server, result); err_quit ("IDN error for host: %s %d", server, result);
} }

@ -49,7 +49,7 @@
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#endif #endif
#ifdef IDN #ifdef LIBIDN
#include <stringprep.h> /* stringprep_locale_to_utf8() */ #include <stringprep.h> /* stringprep_locale_to_utf8() */
#include <idna.h> /* idna_to_ascii_from_utf8() */ #include <idna.h> /* idna_to_ascii_from_utf8() */
#endif #endif
@ -142,7 +142,7 @@ struct timeval max_timeval;
#define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"; #define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg";
char *server; char *server;
#ifdef IDN #ifdef LIBIDN
char *locale_server, *ace_server, *utf8_server; char *locale_server, *ace_server, *utf8_server;
#endif #endif

@ -11,4 +11,4 @@ echo "dependent but you typically 'export LC_CTYPE=xx_XX.utf8'. 'locale -a' to g
echo "possible values." echo "possible values."
./echoping -h / -v café.gennic.net ./echoping -h / -v café.gennic.net
./echoping -h / -v www.trườngđạihọcbáchkhoahànội.edu.vn

Loading…
Cancel
Save