diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-19 16:06:07 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-19 16:06:07 +0200 |
commit | 74635e9edbd1426ff7feff4713d69d8e90b0d1ea (patch) | |
tree | 8dc067ba3a01edf5733863217faaddfa14dd3a5f /configure | |
parent | bfb6b3b7e0e165cfef099c71001579dee6592533 (diff) | |
download | prosody-74635e9edbd1426ff7feff4713d69d8e90b0d1ea.tar.gz prosody-74635e9edbd1426ff7feff4713d69d8e90b0d1ea.zip |
configure: Add initial attempt at pkg-config preset
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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" |