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
<fcgiapp.h> (see previous commit for further commentary).

Signed-off-by: Tim Serong <tserong@suse.com>
This commit is contained in:
Tim Serong 2016-06-29 12:19:17 +10:00
parent 3cf6c534ff
commit 34fc83ce19
5 changed files with 6 additions and 13 deletions

View File

@ -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])])

View File

@ -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

View File

@ -4,12 +4,7 @@
#include "rgw_fcgi.h"
#include "acconfig.h"
#ifdef FASTCGI_INCLUDE_DIR
# include "fastcgi/fcgiapp.h"
#else
# include <fcgiapp.h>
#endif
#include <fcgiapp.h>
int RGWFCGX::write_data(const char *buf, int len)
{

View File

@ -5,11 +5,7 @@
#define CEPH_RGW_FCGI_H
#include "acconfig.h"
#ifdef FASTCGI_INCLUDE_DIR
# include "fastcgi/fcgiapp.h"
#else
# include <fcgiapp.h>
#endif
#include <fcgiapp.h>
#include "rgw_client_io.h"

View File

@ -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