summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@mailme.dk>2013-01-07 22:56:30 +0100
committerEmil Renner Berthing <esmil@mailme.dk>2013-01-07 23:05:57 +0100
commit95a5025a2080a5925c55c1f9346da14dd98ea89f (patch)
tree924736507a3cefea19b76acec79f3a8f0dc38569
parent314aeedc740be792145c732980a225290252db6b (diff)
downloadlem-95a5025a2080a5925c55c1f9346da14dd98ea89f.tar.gz
lem-95a5025a2080a5925c55c1f9346da14dd98ea89f.tar.xz
lem-95a5025a2080a5925c55c1f9346da14dd98ea89f.zip
export proper CPPFLAGS to pkg-config file
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure7
-rw-r--r--configure.ac5
-rw-r--r--lem.pc.in2
4 files changed, 11 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index 5f8e333..7e928b6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
CC = @CC@
CFLAGS ?= @CFLAGS@
-CFLAGS += -Iinclude @CPPFLAGS@
+CFLAGS += @CPPFLAGS_PRIVATE@ @CPPFLAGS@
SHARED = @SHARED@
PKG_CONFIG = @PKG_CONFIG@
@@ -81,6 +81,7 @@ lem.pc: lem.pc.in
-e 's|@lmoddir[@]|$(lmoddir)|' \
-e 's|@cmoddir[@]|$(cmoddir)|' \
-e 's|@includedir[@]|$(includedir)|' \
+ -e 's|@CPPFLAGS[@]|@CPPFLAGS@|' \
$< > $@
%-strip: %
diff --git a/configure b/configure
index 9af1007..076551b 100755
--- a/configure
+++ b/configure
@@ -660,6 +660,7 @@ build
pkgconfigdir
cmoddir
lmoddir
+CPPFLAGS_PRIVATE
SHARED
objects
headers
@@ -2164,6 +2165,8 @@ objects='bin/lem.o'
SHARED='-shared'
+CPPFLAGS_PRIVATE='-Iinclude'
+
# Check whether --with-lua was given.
@@ -4716,7 +4719,7 @@ fi
objects="bin/lua.o $objects"
headers="luaconf.h lua.h lauxlib.h $headers"
- CPPFLAGS="$CPPFLAGS -Ilua"
+ CPPFLAGS_PRIVATE="$CPPFLAGS_PRIVATE -Ilua"
if test "x$lmoddir" = 'x'; then :
lmoddir="\${datarootdir}/lua/$builtin_lua_version"
fi
@@ -4764,7 +4767,7 @@ done
objects="bin/libev.o $objects"
headers="ev-config.h ev.h $headers"
-CPPFLAGS="$CPPFLAGS -Ilibev"
+CPPFLAGS_PRIVATE="$CPPFLAGS_PRIVATE -Ilibev"
if test "x$ac_cv_header_sys_eventfd_h" = 'xyes'; then :
ac_fn_c_check_func "$LINENO" "eventfd" "ac_cv_func_eventfd"
diff --git a/configure.ac b/configure.ac
index a7fbe28..59f9ff0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,7 @@ AC_CONFIG_HEADERS([libev/ev-config.h:ev-config.h.in])
AC_SUBST([headers], ['lem.h lem-io.h'])
AC_SUBST([objects], ['bin/lem.o'])
AC_SUBST([SHARED], ['-shared'])
+AC_SUBST([CPPFLAGS_PRIVATE], ['-Iinclude'])
AC_ARG_WITH([lua],
[AS_HELP_STRING([--with-lua],
@@ -88,7 +89,7 @@ AS_IF([test "x$with_lua" = 'xbuiltin'],
[AC_SEARCH_LIBS([dlopen], [dl])]
[objects="bin/lua.o $objects"]
[headers="luaconf.h lua.h lauxlib.h $headers"]
- [CPPFLAGS="$CPPFLAGS -Ilua"]
+ [CPPFLAGS_PRIVATE="$CPPFLAGS_PRIVATE -Ilua"]
[AS_IF([test "x$lmoddir" = 'x'], [lmoddir="\${datarootdir}/lua/$builtin_lua_version"])]
[AS_IF([test "x$cmoddir" = 'x'], [cmoddir="\${libdir}/lua/$builtin_lua_version"])])
@@ -107,7 +108,7 @@ AC_CHECK_HEADERS([sys/eventfd.h sys/epoll.h sys/event.h])
objects="bin/libev.o $objects"
headers="ev-config.h ev.h $headers"
-CPPFLAGS="$CPPFLAGS -Ilibev"
+CPPFLAGS_PRIVATE="$CPPFLAGS_PRIVATE -Ilibev"
AS_IF([test "x$ac_cv_header_sys_eventfd_h" = 'xyes'],
[AC_CHECK_FUNC([eventfd],
diff --git a/lem.pc.in b/lem.pc.in
index ec319bc..54b54ce 100644
--- a/lem.pc.in
+++ b/lem.pc.in
@@ -7,4 +7,4 @@ Name: lem
Description: A Lua Event Machine
Version: 0.3
URL: https://github.com/esmil/lem
-Cflags: -I${includedir}
+Cflags: -I${includedir} @CPPFLAGS@