# HG changeset patch # User Kim Alvefur # Date 1471615567 -7200 # Node ID c6d18ee93e344989c608db22a066289bec3a8022 # Parent a53ae6c998cf0ef47b3719f90876c9eb888b99f8 configure: Add initial attempt at pkg-config preset diff -r a53ae6c998cf -r c6d18ee93e34 configure --- a/configure Fri Aug 19 16:05:36 2016 +0200 +++ b/configure Fri Aug 19 16:06:07 2016 +0200 @@ -146,6 +146,20 @@ 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"