Commit 3e92462f authored by Niels Möller's avatar Niels Möller

* src/argp/configure.in: Don't check for getopt.

* configure.in: Use AC_LIB_ARGP.

Rev: ChangeLog:1.279
Rev: configure.in:1.95
parent cb7edab9
2000-11-30 Niels Mller <nisse@cuckoo.localdomain>
* src/argp/argp-parse.c (match_option): Better abbreviations.
Replaced try_getopt with args_only, changed calling convention for
parser_parse_arg.
* src/argp/configure.in: Don't check for getopt.
* src/argp/argp.h: Don't include getopt.h.
* src/argp/argp-parse.c (calc_sizes): Updated comment.
2000-11-29 Niels Mller <nisse@cuckoo.localdomain>
* src/argp/configure.in: Use AC_REPLACE_FUNCS for mempcpy, strndup
and strchrnul.
(AC_CHECK_VAR): Changed second argument to take the type of the
variable.
* src/argp/argp-parse.c (struct parser): New fields
posixly_correct and ordering.
(parser_init): Choose ordering.
(enum arg_type): New value ARG_LONG_ONLY.
(parser_parse_next): Added error messages similar to getopt's.
* src/argp/argp-help.c (STRNDUP): New macro to refer to strndup
or __strndup, as appropriate.
(STRERROR): Define this macro as a wrapper for strerror or
sys_errlist.
(__argp_basename): New function.
* src/argp/argp-namefrob.h (__argp_basename): Added
__argp_basename.
* src/argp/Makefile.am (libargp_a_LIBADD): Include LIBOBJS in
libargp.a.
* src/argp/argp.h: Added prototype for _argp_basename and
__argp_basename.
* src/argp/strndup.c, src/argp/strchrnul.c src/argp/mempcpy.c:
Moved replacement functions to separate files.
2000-11-28 Niels Mller <nisse@cuckoo.localdomain>
* src/argp/argp-parse.c: Deleted getopt-related code.
(struct parser): New field nextchar. Deleted fields try_getotp and long_opts.
(find_short_option): New function.
(match_option): New function.
(find_long_option): New function.
(struct parser_convert_state): Deleted field long_end.
(convert_options): Don't build getopt_long-style option array.
(parser_convert): Deleted FLAGS arument.
(struct parser_sizes): Deleted field long_len.
(parser_init): Set short_opts to NULL, unless ARGP_LONG_ONLY is
used.
(classify_arg): New function.
(parser_parse_next): Don't use getopt_long().
2000-11-27 Niels Mller <nisse@cuckoo.localdomain>
* configure.in: Use AC_LIB_ARGP.
......
......@@ -4,7 +4,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/lsh_types.h)
AM_INIT_AUTOMAKE(lsh, 1.1.3)
AM_INIT_AUTOMAKE(lsh, 1.1.4)
AM_CONFIG_HEADER(config.h)
......@@ -283,17 +283,6 @@ dnl question is not defined in sys/types.h.
AC_TYPE_SOCKLEN_T
dnl AC_CACHE_CHECK([for socklen_t in sys/socket.h],
dnl lsh_cv_type_socklen_t,
dnl [ AC_EGREP_HEADER(socklen_t, sys/socket.h,
dnl lsh_cv_type_socklen_t=yes,
dnl lsh_cv_type_socklen_t=no]))
dnl if test x$lsh_cv_type_socklen_t = xno ; then
dnl AC_DEFINE(socklen_t, int)
dnl fi
dnl Find the SSH1 daemon; try 'sshd1' first; if it fails, look for 'sshd'
dnl ## if test x$with_sshd1 = xyes ; then
dnl ## AC_DEFINE(SSH1_FALLBACK)
......@@ -336,12 +325,6 @@ dnl ## AC_DEFINE_UNQUOTED(SSHD1,"$SSHD1BIN")
dnl ## fi
dnl Checks for libraries.
dnl AC_CHECK_LIBGMP(gmp,,
dnl dnl Some debian systems have both gmp1 and gmp2.
dnl [AC_CHECK_LIBGMP(gmp2,,
dnl AC_ERROR([GMP is missing (ftp://ftp.gnu.org/pub/gnu/gmp/gmp-2.0.2.tar.gz)]))])
AC_SEARCH_LIBGMP(gmp gmp2,
LSH_RPATH_FIX,
[AC_ERROR([GMP is missing. Get gmp-2.0.2 or better from ftp://ftp.gnu.org/pub/gnu/gmp]) ])
......@@ -432,13 +415,13 @@ if test x$lsh_cv_sys_ai_numerichost = xyes ; then
AC_DEFINE(HAVE_AI_NUMERICHOST)
fi
dnl Needed by argp
AC_CHECK_FUNCS(mempcpy strndup)
AC_CHECK_FUNCS(flockfile putc_unlocked)
AC_CHECK_FUNCS(fputs_unlocked fwrite_unlocked)
AC_CHECK_VAR(program_invocation_name, [#include <errno.h>])
AC_CHECK_VAR(program_invocation_short_name, [#include <errno.h>])
dnl dnl Needed by argp
dnl AC_CHECK_FUNCS(mempcpy strndup)
dnl AC_CHECK_FUNCS(flockfile putc_unlocked)
dnl AC_CHECK_FUNCS(fputs_unlocked fwrite_unlocked)
dnl
dnl AC_CHECK_VAR(program_invocation_name, [char *])
dnl AC_CHECK_VAR(program_invocation_short_name, [char *])
AC_CHECK_FUNCS(poll,,[LIBOBJS="jpoll.o $LIBOBJS"])
......@@ -446,26 +429,24 @@ dnl This macro is mentioned in the automake manual, but where is it
dnl supposed to be defined?
dnl AC_REPLACE_GNU_GETOPT
dnl AC_CHECK_FUNCS(getopt_long,,[LIBOBJS="getopt.o $LIBOBJS"])
AC_CHECK_FUNCS(getopt_long,,[LIBOBJS="getopt.o getopt1.o $LIBOBJS"])
dnl dnl AC_CHECK_FUNCS(getopt_long,,[LIBOBJS="getopt.o $LIBOBJS"])
dnl AC_CHECK_FUNCS(getopt_long,,[LIBOBJS="getopt.o getopt1.o $LIBOBJS"])
# Use system argp only if we can actually link with it.
# Test if the libc includes a good enough argp.
if test x$with_system_argp = xyes ; then
dnl AC_CHECK_FUNCS(argp_parse,, with_system_argp=no)
AC_LIB_ARGP(,with_system_argp=no)
fi
# FIXME: If the system already has argp, it's unnecessary to build our own.
# As we want to load the objects into liblsh.a, we list all the objects
# rather than libargp.a.
## LIBOBJS="$LIBOBJS argp/libargp.a"
# We don't use LIBOBJS for this, as the LIBOBJS are added to
# liblsh.a, and we can't add an archive to an archive.
LIBARGP=""
if test x$with_system_argp = xno ; then
LIBOBJS="$LIBOBJS argp/argp-ba.o argp/argp-fmtstream.o \
argp/argp-help.o argp/argp-parse.o argp/argp-pin.o argp/argp-pv.o \
argp/argp-pvh.o argp/argp-eexst.o"
LIBARGP="argp/libargp.a"
fi
AC_SUBST(LIBARGP)
dnl Check for broken shutdown
AC_CACHE_CHECK(for working shutdown on AF_UNIX sockets,
lsh_cv_func_shutdown_works_on_unix_sockets,
......@@ -708,6 +689,8 @@ if test x$enable_ipv6 = xyes ; then
AC_DEFINE(WITH_IPV6)
fi
AC_CONFIG_SUBDIRS(src/argp)
# Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then
CFLAGS="$CFLAGS -ggdb3 -Wall -W \
......@@ -721,7 +704,7 @@ if test x$GCC = xyes ; then
fi
AC_OUTPUT(Makefile doc/Makefile misc/Makefile
src/Makefile src/argp/Makefile src/scm/Makefile
src/Makefile src/scm/Makefile
src/testsuite/Makefile src/rsync/Makefile
src/symmetric/Makefile src/symmetric/include/Makefile
contrib/Makefile contrib/lsh.spec)
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