Add znc-config --cxx and use it in znc-buildmod

Plus this makes sure that znc-buildmod tries to use the znc-config we installed
first, then others from $PATH.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1255 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-10-19 16:31:26 +00:00
parent b94e784301
commit fa2a9819d0
2 changed files with 14 additions and 6 deletions
+9 -5
View File
@@ -9,17 +9,13 @@ OK="[ ok ]"
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
PATH="$PATH:$bindir"
PATH="$bindir:$PATH"
# Check if we got everything we need
SED=sed
ZNC_CONFIG=znc-config
if test "x$CXX" = "x" ; then
CXX=g++
fi
check_binary()
{
which $1 > /dev/null 2>&1
@@ -31,6 +27,14 @@ check_binary()
check_binary ${SED}
check_binary ${ZNC_CONFIG} "Please (re)install ZNC."
if test "x$CXX" = "x" ; then
CXX=`${ZNC_CONFIG} --cxx`
fi
if test "x$CXX" = "x" ; then
CXX=g++
fi
check_binary ${CXX} "What happened to your compiler?"
if test -z "$1"; then
+5 -1
View File
@@ -6,6 +6,7 @@ datarootdir="@datarootdir@"
bindir="@bindir@"
datadir="@datadir@"
CXX="@CXX@"
CXXFLAGS="@CPPFLAGS@ @MODFLAGS@ -I@prefix@/include/znc"
# LIBS="@LIBS@"
# No libs needed, ZNC links against $LIBS and thus modules don't need to.
@@ -15,7 +16,8 @@ DATADIR="@DATADIR@"
VERSION="@VERSION@"
if test -z "$1"; then
echo "USAGE: $0 <--cflags|--include|--libs|--moddir|--datadir|--version|--prefix>"
echo "USAGE: $0 <flag>"
echo " --cxx [$CXX]"
echo " --cflags [$CXXFLAGS]"
echo " --libs [$LIBS]"
echo " --moddir [$MODDIR]"
@@ -26,6 +28,8 @@ if test -z "$1"; then
fi
case $1 in
--cxx)
echo $CXX;;
--cflags)
echo $CXXFLAGS;;
--include)