Check for the -rpath linker flag.

This makes it build on MacOS X which neither
supports nor needs this flag.
This commit is contained in:
Jilles Tjoelker 2008-05-17 17:46:37 +02:00
parent ac48b7c300
commit 794816af01
3 changed files with 14 additions and 2 deletions

View file

@ -1020,6 +1020,17 @@ if test "$shared_modules" = yes; then
fi fi
fi fi
# rpath, for finding libratbox.so at run time
hold_ldflags=$LDFLAGS
AC_MSG_CHECKING(for the ld -rpath flag)
LDFLAGS="${LDFLAGS} -Wl,-rpath=${libdir}"
AC_LINK_IFELSE(AC_LANG_PROGRAM([],[int i;]), found=yes, found=no)
LDFLAGS=$hold_ldflags
AC_MSG_RESULT($found)
if test "$found" = yes; then
LDFLAGS="${LDFLAGS} -Wl,-rpath=\${libdir}"
fi
# This must be down here, or it will mess up checks like the ones # This must be down here, or it will mess up checks like the ones
# for -Wl,-export-dynamic # for -Wl,-export-dynamic
# -- jilles # -- jilles

View file

@ -33,7 +33,7 @@ PROGS = $(IRCD_EXE)
SSL_LIBS = @SSL_LIBS@ SSL_LIBS = @SSL_LIBS@
SSL_INCLUDES = @SSL_INCLUDES@ SSL_INCLUDES = @SSL_INCLUDES@
IRCDLIBS = @MODULES_LIBS@ -Wl,-rpath=@libdir@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS)
INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES) INCLUDES = -I../include -I../libratbox/include $(SSL_INCLUDES)
CPPFLAGS = ${INCLUDES} @CPPFLAGS@ CPPFLAGS = ${INCLUDES} @CPPFLAGS@

View file

@ -20,13 +20,14 @@ RM = @RM@
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
confdir = @confdir@ confdir = @confdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
ZIP_LIB = @ZLIB_LD@ ZIP_LIB = @ZLIB_LD@
IRCDLIBS = @MODULES_LIBS@ -Wl,-rpath=@libdir@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) $(ZIP_LIB) IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) $(ZIP_LIB)
INCLUDES = -I. -I../include -I../libratbox/include $(SSL_INCLUDES) INCLUDES = -I. -I../include -I../libratbox/include $(SSL_INCLUDES)
CPPFLAGS = ${INCLUDES} @CPPFLAGS@ CPPFLAGS = ${INCLUDES} @CPPFLAGS@