aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-19 16:06:07 +0200
committerKim Alvefur <zash@zash.se>2016-08-19 16:06:07 +0200
commit0aee10c391f6096c535333620e2a55bc2f5f9cf3 (patch)
tree72c7cfc2e8942084278365e9081793f1ac41e7f7 /configure
parent62af1c957ca82a95983fef881f56052751842779 (diff)
downloadprosody-im-server-0aee10c391f6096c535333620e2a55bc2f5f9cf3.tar
prosody-im-server-0aee10c391f6096c535333620e2a55bc2f5f9cf3.zip
configure: Add initial attempt at pkg-config preset
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure b/configure
index 48ac5fa4..e9e62a84 100755
--- a/configure
+++ b/configure
@@ -146,6 +146,20 @@ do
LUA_INCDIR="/usr/local/include";
LUA_INCDIR_SET="yes"
fi
+ if [ "$OSTYPE" = "pkg-config" ]; then
+ if [ "$LUA_SUFFIX_SET" != "yes" ]; then
+ LUA_SUFFIX="5.1";
+ LUA_SUFFIX_SET=yes
+ fi
+ LUA_CF="$(pkg-config --cflags-only-I lua$LUA_SUFFIX)"
+ LUA_CF="${LUA_CF#*-I}"
+ LUA_CF="${LUA_CF%% *}"
+ if [ "$LUA_CF" != "" ]; then
+ LUA_INCDIR="$LUA_CF"
+ LUA_INCDIR_SET=yes
+ fi
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ fi
;;
--libdir=*)
LIBDIR="$value"