Commit eb907319 authored by eddietwo's avatar eddietwo

update makefile boilerplate, including using the true aclocal

parent 90ba4708
......@@ -14,7 +14,8 @@ subdir = .
conf_auxdir = @conf_auxdir@
AUTOCONF = @AUTOCONF@
ACLOCAL = cp m4/click.m4 aclocal.m4
# ACLOCAL = aclocal -I m4
ACLOCAL = :
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
......@@ -176,7 +177,6 @@ dist: distdir
distdir: $(srcdir)/configure
cd doc && $(MAKE) info
cp $(srcdir)/m4/click.m4 $(srcdir)/etc/samplepackage/m4
cp $(srcdir)/aclocal.m4 $(srcdir)/etc/samplepackage
cd $(srcdir)/etc/samplepackage && $(AUTOCONF)
-rm -rf $(distdir)
mkdir $(distdir)
......
This diff is collapsed.
......@@ -880,6 +880,7 @@ Optional Features:
--disable-tcpudp do not include TCP and UDP elements
--enable-test include regression test elements
--enable-wifi include wifi elements and support
--enable-netflow include netflow elements and support
--disable-int64 disable 64-bit integer support
--enable-nanotimestamp enable nanosecond timestamps
--enable-tools=WHERE enable tools (host/build/mixed/no) [mixed]
......@@ -4384,6 +4385,17 @@ fi; test "x$enable_all_elements" = xyes -a "x$enable_wifi" = xNO && enable_wifi=
if test "x$enable_wifi" = xyes; then
:
fi
# Check whether --enable-netflow or --disable-netflow was given.
if test "${enable_netflow+set}" = set; then
enableval="$enable_netflow"
else
enable_netflow=NO
fi; test "x$enable_all_elements" = xyes -a "x$enable_netflow" = xNO && enable_netflow=yes
if test "x$enable_netflow" = xyes; then
:
fi
for i in `(cd $srcdir/elements; ls | sed '/^CVS$/d;/^bsdmodule$/d;/^exopc$/d;/^linuxmodule$/d;/^ns$/d;/^userlevel$/d')`; do
......@@ -7859,7 +7871,7 @@ else
ac_cv_endian=0
cat > conftest.$ac_ext <<EOF
#line 7862 "configure"
#line 7874 "configure"
#include "confdefs.h"
#include <$endian_hdr>
#ifdef __BYTE_ORDER
......
......@@ -135,7 +135,7 @@ AC_ARG_ENABLE(all-elements, [ --enable-all-elements include all provided elem
dnl ELEMENTS_ARG_ENABLE(COLLECTION, HELP-STRING, DEFAULT-VALUE)
element_groups=""
AC_SUBST(element_groups)
AC_DEFUN(ELEMENTS_ARG_ENABLE,
AC_DEFUN([ELEMENTS_ARG_ENABLE],
[AC_ARG_ENABLE($1, [ --]builtin(substr, builtin(ifelse, [$3], yes, dis, en)[able-$1 ], 0, 21)[ ]builtin(ifelse, [$3], yes, [do not ], [])[$2], ,
[enable_]patsubst([$1], -, _)=$3)dnl
test "x$enable_all_elements" = xyes -a ["x$enable_]patsubst([$1], -, _)["] = xNO && [enable_]patsubst([$1], -, _)[=yes]
......
......@@ -14,7 +14,7 @@ subdir = etc/libclick
conf_auxdir = @conf_auxdir@
AUTOCONF = @AUTOCONF@
ACLOCAL = cp m4/click.m4 aclocal.m4
ACLOCAL = aclocal -I m4
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
......
......@@ -14,7 +14,7 @@ subdir = .
conf_auxdir = @conf_auxdir@
AUTOCONF = @AUTOCONF@
ACLOCAL = cp m4/click.m4 aclocal.m4
ACLOCAL = aclocal -I m4
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
......
......@@ -60,6 +60,13 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
endif
ifneq ($(wildcard $(top_srcdir)/configure.ac),)
$(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && ./config.status --recheck
$(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/m4/click.m4
cd $(top_srcdir) && autoconf
endif
elemlist:
for i in $(DRIVERS); do $(MAKE) CLICK_PACKAGE_MAKING=$$i elemlist; done
......
......@@ -5,7 +5,7 @@ SHELL = @SHELL@
# THESE VARIABLES MAY CHANGE BETWEEN PACKAGES
# Set 'package' to the name of your package.
package := sample
package := @CLICKPACKAGENAME@
# Set these variables appropriately.
top_builddir := .
......
dnl -*- mode: shell-script -*-
dnl 'configure.in' file for a sample package
dnl 'configure.ac' file for a sample package
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
......@@ -13,10 +13,10 @@ dnl notice is a summary of the Click LICENSE file; the license in that file is
dnl legally binding.
dnl
dnl the usual 'configure.in' boilerplate
dnl the usual 'configure.ac' boilerplate
dnl
AC_INIT(samplepackage, 2.0)
AC_INIT(click-samplepackage, 2.0)
AC_CONFIG_HEADER(config.h)
AC_SUBST(ac_configure_args)
......@@ -26,6 +26,9 @@ AH_TOP([#ifndef CLICK_]AC_PACKAGE_TARNAME[_CONFIG_H
#define CLICK_]AC_PACKAGE_TARNAME[_CONFIG_H 1])
AH_BOTTOM([#endif /* CLICK_]AC_PACKAGE_TARNAME[_CONFIG_H */])
CLICKPACKAGENAME=sample
AC_SUBST(CLICKPACKAGENAME)
dnl
dnl locate Click install directory
......
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Modified by: Eddie Kohler
scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
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=$?
chmod 755 "$pathcomp"
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
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
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# mkinstalldirs ends here
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Modified by: Eddie Kohler
scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
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=$?
chmod 755 "$pathcomp"
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
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
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# mkinstalldirs ends here
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
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