aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-02-28 14:33:05 +0000
committerStefan Bühler <stbuehler@web.de>2009-02-28 14:33:05 +0000
commit1e010ec3e64761e3660eb605a57a2ed6dd3fa352 (patch)
treed89fc7e5681a23056d10afa37b8346693c30684b
parente1f40012d65d2e15a5c070042670b26a9b0cdbcb (diff)
downloadspawn-fcgi-1e010ec3e64761e3660eb605a57a2ed6dd3fa352.tar.gz
spawn-fcgi-1e010ec3e64761e3660eb605a57a2ed6dd3fa352.zip
Added more warning options; added build instructions to README.
git-svn-id: svn://svn.lighttpd.net/spawn-fcgi/trunk@23 4a9f3682-ca7b-49a8-9a55-ba4640e46f83
-rw-r--r--CMakeLists.txt1
-rw-r--r--README23
-rw-r--r--configure.ac17
-rw-r--r--src/CMakeLists.txt2
4 files changed, 42 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68c70b6..7d68ca9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@ SET(CMAKE_MAN_DIR "share/man" CACHE STRING
"Install location for man pages (relative to prefix).")
MARK_AS_ADVANCED(CMAKE_MAN_DIR)
+# Set Default build type to RelWithDebInfo
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
diff --git a/README b/README
index e18df8d..f696dde 100644
--- a/README
+++ b/README
@@ -11,3 +11,26 @@ spawn-fcgi
Features
--------
- binds to IPv4 and unix sockets
+
+
+Build
+=====
+
+If ./configure is missing, run ./autogen.sh.
+
+ ./configure
+ make
+ make install
+
+Alternatively you can use the cmake build system (may not work
+on every platform):
+
+ cmake .
+ make
+ make install
+
+
+Usage
+=====
+
+See man page.
diff --git a/configure.ac b/configure.ac
index ab45e0e..01e46ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,5 +37,22 @@ AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_CHECK_FUNCS([dup2 memset putenv select socket strerror strtol])
+# check for extra compiler options (warning options)
+if test "${GCC}" = "yes"; then
+ CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
+fi
+
+AC_ARG_ENABLE(extra-warnings,
+ AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]),
+ [case "${enableval}" in
+ yes) extrawarnings=true ;;
+ no) extrawarnings=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;;
+ esac],[extrawarnings=false])
+
+if test x$extrawarnings = xtrue; then
+ CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"
+fi
+
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6f05143..ef5b0da 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,7 +9,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
OPTION(BUILD_EXTRA_WARNINGS "extra warnings")
IF(BUILD_EXTRA_WARNINGS)
- SET(WARN_FLAGS "-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed")
+ SET(WARN_FLAGS "-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security")
# -Werror -Wbad-function-cast -Wmissing-prototypes
ELSE(BUILD_EXTRA_WARNINGS)
SET(WARN_FLAGS "")