mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
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:
+9
-5
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user