From 34fc83ce199c92ab8db5c2051d68f5a589acdce0 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Wed, 29 Jun 2016 12:19:17 +1000 Subject: [PATCH] autotools: Simplify fcgiapp.h include for rgw This commit updates autotools to add /usr/include/fastcgi to the include directories if necessary for rgw, so we can always just include (see previous commit for further commentary). Signed-off-by: Tim Serong --- configure.ac | 3 ++- src/rgw/Makefile.am | 1 + src/rgw/rgw_fcgi.cc | 7 +------ src/rgw/rgw_fcgi.h | 6 +----- src/test/Makefile-client.am | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 9aaef7d8b91..b24c35eb4e8 100644 --- a/configure.ac +++ b/configure.ac @@ -516,7 +516,7 @@ AS_IF([test "x$with_radosgw" != xno], [AC_CHECK_LIB([curl], [curl_easy_init], [RADOSGW=1 AC_CHECK_HEADER([fastcgi/fcgiapp.h], - [AC_DEFINE([FASTCGI_INCLUDE_DIR], [1], [FastCGI headers are in /usr/include/fastcgi])]) + [RGW_CXXFLAGS="-I/usr/include/fastcgi"]) ], [if test "x$with_radosgw" != "xcheck"; then AC_MSG_FAILURE([--with-radosgw was given but libcurl (libcurl-dev on debian) not found]) @@ -529,6 +529,7 @@ AS_IF([test "x$with_radosgw" != xno], [if test "x$with_radosgw" != "xcheck"; then AC_MSG_FAILURE([--with-radosgw was given but libfcgi (libfcgi-dev on debian) not found]) fi])]) +AC_SUBST(RGW_CXXFLAGS) AM_CONDITIONAL(WITH_RADOSGW, test "$RADOSGW" = "1") AS_IF([test "$RADOSGW" = "1"], [AC_DEFINE([WITH_RADOSGW], [1], [define if radosgw enabled])]) diff --git a/src/rgw/Makefile.am b/src/rgw/Makefile.am index 25931cfefd3..c9c2ced482a 100644 --- a/src/rgw/Makefile.am +++ b/src/rgw/Makefile.am @@ -158,6 +158,7 @@ radosgw_SOURCES = \ rgw/rgw_main.cc radosgw_CFLAGS = -I$(srcdir)/civetweb/include -fPIC -I$(srcdir)/xxHash +radosgw_CXXFLAGS = ${RGW_CXXFLAGS} ${AM_CXXFLAGS} radosgw_LDADD = $(LIBRGW) $(LIBCIVETWEB) $(LIBCIVETWEB_DEPS) $(LIBRGW_DEPS) $(RESOLV_LIBS) \ $(CEPH_GLOBAL) bin_PROGRAMS += radosgw diff --git a/src/rgw/rgw_fcgi.cc b/src/rgw/rgw_fcgi.cc index 245d4075613..8e89ffe181a 100644 --- a/src/rgw/rgw_fcgi.cc +++ b/src/rgw/rgw_fcgi.cc @@ -4,12 +4,7 @@ #include "rgw_fcgi.h" #include "acconfig.h" -#ifdef FASTCGI_INCLUDE_DIR -# include "fastcgi/fcgiapp.h" -#else -# include -#endif - +#include int RGWFCGX::write_data(const char *buf, int len) { diff --git a/src/rgw/rgw_fcgi.h b/src/rgw/rgw_fcgi.h index 7b906840d97..90928c4f7be 100644 --- a/src/rgw/rgw_fcgi.h +++ b/src/rgw/rgw_fcgi.h @@ -5,11 +5,7 @@ #define CEPH_RGW_FCGI_H #include "acconfig.h" -#ifdef FASTCGI_INCLUDE_DIR -# include "fastcgi/fcgiapp.h" -#else -# include -#endif +#include #include "rgw_client_io.h" diff --git a/src/test/Makefile-client.am b/src/test/Makefile-client.am index 983047102a2..a5164a3eab8 100644 --- a/src/test/Makefile-client.am +++ b/src/test/Makefile-client.am @@ -802,7 +802,7 @@ librgw_file_aw_LDADD = $(UNITTEST_LDADD) \ noinst_PROGRAMS += librgw_file_aw librgw_file_nfsns_SOURCES = test/librgw_file_nfsns.cc -librgw_file_nfsns_CXXFLAGS = -I$(srcdir)/xxHash $(UNITTEST_CXXFLAGS) +librgw_file_nfsns_CXXFLAGS = -I$(srcdir)/xxHash $(UNITTEST_CXXFLAGS) ${RGW_CXXFLAGS} librgw_file_nfsns_LDADD = $(UNITTEST_LDADD) \ $(LIBRGW) $(LIBRGW_DEPS) librados.la $(PTHREAD_LIBS) $(CEPH_GLOBAL) $(EXTRALIBS) noinst_PROGRAMS += librgw_file_nfsns