Permalink
Browse files

fcgiwrap to rely on definitions provided by autoconf/autoreconf

  • Loading branch information...
1 parent 21e729d commit 35364e13de7f992baaed35916dc1ef8a0b4d3edd @wmark wmark committed May 25, 2010
Showing with 12 additions and 7 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 Makefile.in
  3. +1 −1 README.rst
  4. +4 −1 configure.ac
  5. +4 −4 fcgiwrap.c
View
@@ -1,4 +1,6 @@
*.cache
+config.h
+config.h.in
config.log
config.status
configure
View
@@ -17,7 +17,7 @@ clean:
#>+ 21
distclean: clean
-rm -rf config.log config.status autom4te.cache
- -rm -f configure Makefile
+ -rm -f configure Makefile config.h config.h.in
#>+ 21
uninstall:
View
@@ -27,7 +27,7 @@ procedure
---------
To install::
- autoconf
+ autoreconf -i
./configure
make
make install
View
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT(fcgiwrap, 1.0, root@localdomain.pl)
+AC_INIT([fcgiwrap], [1.0.1], [root@localdomain.pl])
AM_CFLAGS="-std=gnu99 -Wall -Wextra -Werror -pedantic"
if test x"$CFLAGS" = x""; then
AM_CFLAGS="$AM_CFLAGS -O2 -g3"
@@ -15,6 +15,9 @@ AC_SUBST([AM_CFLAGS])
# Checks for programs.
AC_PROG_CC
+# Create the config.h.
+AC_CONFIG_HEADERS([config.h])
+
# Checks for libraries.
AC_CHECK_LIB([fcgi], [FCGX_Init],, [AC_MSG_ERROR([FastCGI library is missing])])
View
@@ -24,8 +24,8 @@
*/
#define NO_FCGI_DEFINES
-#define FCGIWRAP_VERSION "1.0"
+#include "config.h"
#include <stdarg.h>
#include <fcgi_stdio.h>
#include <stdio.h>
@@ -628,12 +628,12 @@ int main(int argc, char **argv)
switch (c) {
case 'h':
printf("Usage: %s [OPTION]\nInvokes CGI scripts as FCGI.\n\n"
- "fcgiwrap version "FCGIWRAP_VERSION"\n\n"
+ PACKAGE_NAME" version "PACKAGE_VERSION"\n\n"
"Options are:\n"
" -c 1..x\t\tNumber of processes to prefork\n"
" -h\t\t\tShow this help message and exit\n"
- "\nReport bugs to Grzegorz Nosek <root@localdomain.pl>.\n"
- "fcgiwrap home page: <http://nginx.localdomain.pl/wiki/FcgiWrap>\n",
+ "\nReport bugs to Grzegorz Nosek <"PACKAGE_BUGREPORT">.\n"
+ PACKAGE_NAME" home page: <http://nginx.localdomain.pl/wiki/FcgiWrap>\n",
argv[0]
);
return 0;

0 comments on commit 35364e1

Please sign in to comment.