Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added usage() and -h option

  • Loading branch information...
commit 3493e27e3b3dd7c86ee5d57e045a2c6a01a04536 1 parent 092f8dc
@sekimura authored
Showing with 36 additions and 22 deletions.
  1. +20 −21 configure
  2. +1 −1  configure.ac
  3. +15 −0 evpsgi.c
View
41 configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for FULL-PACKAGE-NAME VERSION.
+# Generated by GNU Autoconf 2.64 for evpsgi 1.0.0.
#
-# Report bugs to <BUG-REPORT-ADDRESS>.
+# Report bugs to <sekimura@gmail.com>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -228,7 +228,7 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and BUG-REPORT-ADDRESS
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and sekimura@gmail.com
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -547,11 +547,11 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='FULL-PACKAGE-NAME'
-PACKAGE_TARNAME='full-package-name'
-PACKAGE_VERSION='VERSION'
-PACKAGE_STRING='FULL-PACKAGE-NAME VERSION'
-PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
+PACKAGE_NAME='evpsgi'
+PACKAGE_TARNAME='evpsgi'
+PACKAGE_VERSION='1.0.0'
+PACKAGE_STRING='evpsgi 1.0.0'
+PACKAGE_BUGREPORT='sekimura@gmail.com'
PACKAGE_URL=''
ac_unique_file="evpsgi.c"
@@ -1231,7 +1231,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures FULL-PACKAGE-NAME VERSION to adapt to many kinds of systems.
+\`configure' configures evpsgi 1.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1279,8 +1279,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root
- [DATAROOTDIR/doc/full-package-name]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/evpsgi]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1298,7 +1297,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of FULL-PACKAGE-NAME VERSION:";;
+ short | recursive ) echo "Configuration of evpsgi 1.0.0:";;
esac
cat <<\_ACEOF
@@ -1327,7 +1326,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <BUG-REPORT-ADDRESS>.
+Report bugs to <sekimura@gmail.com>.
_ACEOF
ac_status=$?
fi
@@ -1390,7 +1389,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-FULL-PACKAGE-NAME configure VERSION
+evpsgi configure 1.0.0
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1593,7 +1592,7 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( cat <<\_ASBOX
## --------------------------------- ##
-## Report this to BUG-REPORT-ADDRESS ##
+## Report this to sekimura@gmail.com ##
## --------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
@@ -1815,7 +1814,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by FULL-PACKAGE-NAME $as_me VERSION, which was
+It was created by evpsgi $as_me 1.0.0, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -2623,8 +2622,8 @@ fi
# Define the identity of the package.
- PACKAGE=FULL-PACKAGE-NAME
- VERSION=VERSION
+ PACKAGE=evpsgi
+ VERSION=1.0.0
cat >>confdefs.h <<_ACEOF
@@ -5025,7 +5024,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by FULL-PACKAGE-NAME $as_me VERSION, which was
+This file was extended by evpsgi $as_me 1.0.0, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5084,12 +5083,12 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <BUG-REPORT-ADDRESS>."
+Report bugs to <sekimura@gmail.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-FULL-PACKAGE-NAME config.status VERSION
+evpsgi config.status 1.0.0
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
View
2  configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.64)
m4_include([version.m4])
-AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
+AC_INIT([evpsgi], [1.0.0], [sekimura@gmail.com])
AC_CONFIG_SRCDIR([evpsgi.c])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_CONFIG_HEADER([config.h])
View
15 evpsgi.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <err.h>
#include <stdarg.h>
+#include <sysexits.h>
#include <netdb.h>
#include <event.h>
@@ -487,6 +488,16 @@ static void settings_init(void) {
settings.server_name = NULL;
}
+static void usage(void) {
+ printf(PACKAGE " " VERSION "\n");
+ printf("-p <num> TCP port number to listen on (default: 80)\n"
+ "-f <file> PSGI script file\n"
+ "-a <mask> alias\n"
+ "-l <ip_addr> interface to listen on (default: INADDR_ANY, all addresses)\n"
+ );
+ return;
+}
+
int main(int argc, char **argv, char**env)
{
int c;
@@ -513,6 +524,7 @@ int main(int argc, char **argv, char**env)
"p:" /* TCP port number to listen on */
"f:" /* psgi script file */
"l:" /* interface to listen on */
+ "h" /* usage */
))) {
switch (c) {
case 'a':
@@ -527,6 +539,9 @@ int main(int argc, char **argv, char**env)
case 'l':
settings.inter= optarg;
break;
+ case 'h':
+ usage();
+ exit(EXIT_SUCCESS);
default:
warnx("Illegal argument \"%c\"", c);
return 1;
Please sign in to comment.
Something went wrong with that request. Please try again.