znc-buildmod: Work on cygwin

On windows/cygwin we have to use a libznc.dll because window's linker works
differently than everyone else's. With this commit znc-buildmod links in
libznc.dll which makes it work!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1688 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-01-05 21:20:53 +00:00
parent 416cd2cfe8
commit 521917efdb
2 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -45,6 +45,7 @@ fi
CXXFLAGS="`${ZNC_CONFIG} --cflags` $CXXFLAGS"
INCLUDES="`${ZNC_CONFIG} --include` $INCLUDES"
LIBS="`${ZNC_CONFIG} --libs` $LIBS"
LDFLAGS="`${ZNC_CONFIG} --libznc` $LDFLAGS"
# Get the first word and strip away the first two chars (which is -I)
INC_PATH=`echo ${INCLUDES} | ${SED} 's: .*::' | ${SED} 's:^..::'`
@@ -66,7 +67,7 @@ do
echo "${ERROR} Building ${MOD}.so... File not found"
else
printf "Building ${MOD}.so... "
if ${CXX} ${CXXFLAGS} ${INCLUDES} ${LIBS} -shared -o ${MOD}.so ${FILE} ; then
if ${CXX} ${CXXFLAGS} ${INCLUDES} ${LDFLAGS} ${LIBS} -shared -o ${MOD}.so ${FILE} ; then
echo "${OK}"
else
echo "${ERROR} Error while building ${MOD}.so"
+12
View File
@@ -16,6 +16,15 @@ MODDIR="@MODDIR@"
DATADIR="@DATADIR@"
VERSION="@PACKAGE_VERSION@"
# Ugly cygwin stuff :(
LIBZNC="@LIBZNC@"
LIBZNCDIR="@LIBZNCDIR@"
if test "x" = "x$LIBZNC"; then
LIBZNCFLAGS=""
else
LIBZNCFLAGS="-L\"$LIBZNCDIR\" -lznc"
fi
if test -z "$1"; then
echo "USAGE: $0 <flag>"
echo " --cxx [$CXX]"
@@ -26,6 +35,7 @@ if test -z "$1"; then
echo " --datadir [$DATADIR]"
echo " --version [$VERSION]"
echo " --prefix [$prefix]"
echo " --libznc [$LIBZNCFLAGS]"
exit 1
fi
@@ -49,6 +59,8 @@ case $1 in
echo $VERSION;;
--prefix)
echo $prefix;;
--libznc)
echo $LIBZNCFLAGS;;
esac
exit 0