mirror of https://framagit.org/bortzmeyer/echoping
First autoconf/automakization.
parent
349c376032
commit
b859d45a5c
@ -0,0 +1 @@
|
||||
Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
|
@ -1,22 +0,0 @@
|
||||
echoping now uses a numbering scheme analog to the
|
||||
Linux kernel one's. Even versions like 2.2 are stable (or supposed to),
|
||||
odd versions like 2.1 are unstable, beta.
|
||||
|
||||
2.2.1 :
|
||||
Portability fixes
|
||||
|
||||
2.2 :
|
||||
Stable release, apart from ICP
|
||||
|
||||
2.0.1 -> 2.1.0 :
|
||||
Timeouts even on TCP connections.
|
||||
Support of HTTP 1.1
|
||||
|
||||
2.0.0 -> 2.0.1 :
|
||||
|
||||
Bug with getservbyname for HTTP connections fixed.
|
||||
|
||||
1.3 -> 2.0.0 :
|
||||
HTTP support. For testing of Web servers and Web proxies.
|
||||
Much better portability.
|
||||
|
@ -1,76 +0,0 @@
|
||||
# Choose your C compiler
|
||||
CC = gcc
|
||||
#CC = cc
|
||||
|
||||
# Possible options:
|
||||
# HTTP : supports the HTTP protocol (Add HTTP10 is for the old HTTP 1.0 protocol,
|
||||
# HTTP 0.9 is not supported)
|
||||
# TTCP : supports the T/TCP protocol (few systems support it)
|
||||
# ICP : supports the ICP protocol (Web proxy/caches). Requires HTTP.
|
||||
# USE_SIGACTION: uses sigaction instead of signal. Necessary on pure BSD
|
||||
# machines because we need to change the semantic of signals.
|
||||
OPTIONS = -DHTTP -DUSE_SIGACTION
|
||||
|
||||
# Flags for gcc
|
||||
CFLAGS = -c -O3 $(OPTIONS) -Wall
|
||||
# Flags for cc
|
||||
#CFLAGS = -c -O $(OPTIONS)
|
||||
|
||||
# Flags for the linker
|
||||
LD = $(CC)
|
||||
LDFLAGS = -o echoping
|
||||
# For Solaris
|
||||
#LDFLAGS = -o echoping -lsocket -lnsl
|
||||
|
||||
INSTALL=install
|
||||
INSTALL_BIN_FLAGS=-m 755
|
||||
INSTALL_MAN_FLAGS=-m 644
|
||||
|
||||
ROOT=/usr/local
|
||||
DESTBIN=$(ROOT)/bin
|
||||
DESTMAN=$(ROOT)/man/man1
|
||||
|
||||
########## Do not touch below this line #########
|
||||
|
||||
OBJS = echoping.o error.o readline.o writen.o util.o http.o icp.o HTParse.o
|
||||
HEADERS = echoping.h icp.h HTParse.h
|
||||
SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c $(HEADERS)
|
||||
MISC = README Makefile
|
||||
DISTRIB= README INSTALL CHANGES DETAILS CREDITS Makefile echoping.ptk $(SOURCES) echoping.1
|
||||
VERSION=`grep VERSION echoping.h | cut -d ' ' -f 3 | sed s/\"//g`
|
||||
|
||||
all: echoping
|
||||
|
||||
echoping: $(OBJS)
|
||||
@ echo Linking $@ with new $?
|
||||
$(LD) $(LDFLAGS) $(OBJS)
|
||||
|
||||
.c.o: $(HEADERS)
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
-rm echoping $(OBJS)
|
||||
@ echo Erased
|
||||
|
||||
distrib.old:
|
||||
@(cd .. ; \
|
||||
tar cvf "echoping/echoping.tar" $(DISTRIB); \
|
||||
gzip -v -9 -f "echoping/echoping.tar"; \
|
||||
uuencode echoping/echoping.tar.gz echoping.tar.gz > echoping/echoping.tar.gz.uu)
|
||||
|
||||
distrib:
|
||||
@(echo Echoping is version ${VERSION}; \
|
||||
mkdir echoping-${VERSION}; \
|
||||
cp $(DISTRIB) echoping-${VERSION};\
|
||||
tar cvf echoping-${VERSION}.tar echoping-${VERSION}; \
|
||||
rm -rf echoping-${VERSION}; \
|
||||
gzip -v -9 -f echoping-${VERSION}.tar; \
|
||||
uuencode echoping-${VERSION}.tar.gz echoping-${VERSION}.tar.gz > \
|
||||
echoping-${VERSION}.tar.gz.uu)
|
||||
|
||||
checkout:
|
||||
co -l $(SOURCES) README
|
||||
|
||||
install: echoping
|
||||
$(INSTALL) $(INSTALL_BIN_FLAGS) echoping $(DESTBIN)
|
||||
$(INSTALL) $(INSTALL_MAN_FLAGS) echoping.1 $(DESTMAN)
|
@ -1,18 +1,9 @@
|
||||
# $Id$
|
||||
|
||||
bin_PROGRAMS = echoping
|
||||
HEADERS = echoping.h icp.h HTParse.h
|
||||
echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c $(HEADERS)
|
||||
echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c echoping.h icp.h HTParse.h
|
||||
echoping_LDADD =
|
||||
|
||||
distrib:
|
||||
@(echo Echoping is version ${VERSION}; \
|
||||
mkdir echoping-${VERSION}; \
|
||||
cp $(DISTRIB) echoping-${VERSION};\
|
||||
tar cvf echoping-${VERSION}.tar echoping-${VERSION}; \
|
||||
rm -rf echoping-${VERSION}; \
|
||||
gzip -v -9 -f echoping-${VERSION}.tar; \
|
||||
uuencode echoping-${VERSION}.tar.gz echoping-${VERSION}.tar.gz > \
|
||||
echoping-${VERSION}.tar.gz.uu)
|
||||
|
||||
checkout:
|
||||
co -l $(SOURCES) README
|
||||
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
@BOTTOM@
|
||||
/* Is sys_errlist declared? */
|
||||
#undef DECL_SYS_ERRLIST
|
||||
|
||||
/* Is sys_nerr declared? */
|
||||
#undef DECL_SYS_NERR
|
||||
|
@ -0,0 +1,87 @@
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Make an uppercase version of a variable
|
||||
dnl $1=uppercase($2)
|
||||
AC_DEFUN([CF_UPPER],
|
||||
[
|
||||
changequote(,)dnl
|
||||
$1=`echo $2 | tr '[a-z]' '[A-Z]'`
|
||||
changequote([,])dnl
|
||||
])dnl
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Check for existence of external data in the current set of libraries. If
|
||||
dnl we can modify it, it's real enough.
|
||||
dnl $1 = the name to check
|
||||
dnl $2 = its type
|
||||
AC_DEFUN([CF_CHECK_EXTERN_DATA],
|
||||
[
|
||||
AC_MSG_CHECKING(if external $1 exists)
|
||||
AC_CACHE_VAL(cf_cv_have_$1,[
|
||||
AC_TRY_LINK([
|
||||
#undef $1
|
||||
extern $2 $1;
|
||||
],
|
||||
[$1 = 2],
|
||||
[eval 'cf_cv_have_'$1'=yes'],
|
||||
[eval 'cf_cv_have_'$1'=no'])])
|
||||
|
||||
eval 'cf_result=$cf_cv_have_'$1
|
||||
AC_MSG_RESULT($cf_result)
|
||||
|
||||
if test "$cf_result" = yes ; then
|
||||
eval 'cf_result=HAVE_'$1
|
||||
CF_UPPER(cf_result,$cf_result)
|
||||
AC_DEFINE_UNQUOTED($cf_result)
|
||||
fi
|
||||
|
||||
])dnl
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g.,
|
||||
dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it
|
||||
dnl ourselves.
|
||||
dnl
|
||||
dnl (I would use AC_CACHE_CHECK here, but it will not work when called in a
|
||||
dnl loop from CF_SYS_ERRLIST).
|
||||
dnl
|
||||
dnl $1 = the name to check
|
||||
AC_DEFUN([CF_CHECK_ERRNO],
|
||||
[
|
||||
AC_MSG_CHECKING(if external $1 is declared)
|
||||
AC_CACHE_VAL(cf_cv_dcl_$1,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h> ],
|
||||
[long x = (long) $1],
|
||||
[eval 'cf_cv_dcl_'$1'=yes'],
|
||||
[eval 'cf_cv_dcl_'$1'=no]')
|
||||
])
|
||||
eval 'cf_result=$cf_cv_dcl_'$1
|
||||
AC_MSG_RESULT($cf_result)
|
||||
|
||||
if test "$cf_result" = no ; then
|
||||
eval 'cf_result=DECL_'$1
|
||||
CF_UPPER(cf_result,$cf_result)
|
||||
AC_DEFINE_UNQUOTED($cf_result)
|
||||
fi
|
||||
|
||||
# It's possible (for near-UNIX clones) that the data doesn't exist
|
||||
CF_CHECK_EXTERN_DATA($1,int)
|
||||
])dnl
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Check for declaration of sys_nerr and sys_errlist in one of stdio.h and
|
||||
dnl errno.h. Declaration of sys_errlist on BSD4.4 interferes with our
|
||||
dnl declaration. Reported by Keith Bostic.
|
||||
AC_DEFUN([CF_SYS_ERRLIST],
|
||||
[
|
||||
for cf_name in sys_nerr sys_errlist
|
||||
do
|
||||
CF_CHECK_ERRNO($cf_name)
|
||||
done
|
||||
])dnl
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
||||
dnl $Id$
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(echoping.h)
|
||||
AM_INIT_AUTOMAKE(echoping, 3.0.0)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(sys/time.h unistd.h)
|
||||
CF_SYS_ERRLIST
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_HEADER_TIME
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(gettimeofday socket)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
Binary file not shown.
@ -0,0 +1,190 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing - GNU libit 0.0"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`configure.in'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`configure.in'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`configure.in'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
Loading…
Reference in New Issue