Updated DSO stuff in configure.in (soname, -fPIC, etc)

Added LDFLAGS to LDLIBS in makeinclude.in.


git-svn-id: file:///fltk/svn/fltk/trunk@355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 1999-03-04 14:48:08 +00:00
parent 70dd4ee71e
commit d38b07ca26
2 changed files with 14 additions and 8 deletions

View File

@ -1,7 +1,7 @@
dnl# -*- sh -*- dnl# -*- sh -*-
dnl# the "configure" script is made from this by running GNU "autoconf" dnl# the "configure" script is made from this by running GNU "autoconf"
dnl# dnl#
dnl# "$Id: configure.in,v 1.26 1999/02/25 19:47:31 carl Exp $" dnl# "$Id: configure.in,v 1.27 1999/03/04 14:48:07 mike Exp $"
dnl# dnl#
dnl# Configuration script for the Fast Light Tool Kit (FLTK). dnl# Configuration script for the Fast Light Tool Kit (FLTK).
dnl# dnl#
@ -48,6 +48,7 @@ dnl# Clear debugging flags and only enable debugging if the user asks for
dnl# it. dnl# it.
DEBUGFLAG="" DEBUGFLAG=""
PICFLAG=0
CFLAGS="${CFLAGS:=}" CFLAGS="${CFLAGS:=}"
CXXFLAGS="${CXXFLAGS:=}" CXXFLAGS="${CXXFLAGS:=}"
@ -57,10 +58,11 @@ fi])
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[ AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[
if eval "test x$enable_shared = xyes"; then if eval "test x$enable_shared = xyes"; then
RANLIB=":" RANLIB=":"
PICFLAG=1
case $uname in case $uname in
SunOS* | UNIX_S*) SunOS* | UNIX_S*)
LIBNAME="libfltk.so.1" LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -G $DEBUGFLAG -o" LIBCOMMAND="\$(CXX) -Wl,-soname,$LIBNAME $(LDLIBS) -G $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so ln -s libfltk.so.1 lib/libfltk.so
;; ;;
HP-UX*) HP-UX*)
@ -70,14 +72,14 @@ if eval "test x$enable_shared = xyes"; then
;; ;;
OSF1* | IRIX*) OSF1* | IRIX*)
LIBNAME="libfltk.so.1" LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -shared $DEBUGFLAG -o" LIBCOMMAND="\$(CXX) -soname $LIBNAME $(LDLIBS) -shared $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so ln -s libfltk.so.1 lib/libfltk.so
;; ;;
*) *)
echo "Warning: shared libraries may not be supported. Trying -shared" echo "Warning: shared libraries may not be supported. Trying -shared"
echo " option to compiler." echo " option to compiler."
LIBNAME="libfltk.so.1" LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -shared $DEBUGFLAG -o" LIBCOMMAND="\$(CXX) -Wl,-soname,$LIBNAME $(LDLIBS) -shared $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so ln -s libfltk.so.1 lib/libfltk.so
;; ;;
esac esac
@ -170,6 +172,10 @@ if test -n "$GXX"; then
CFLAGS="-O2 $CFLAGS" CFLAGS="-O2 $CFLAGS"
CXXFLAGS="-O2 $CXXFLAGS" CXXFLAGS="-O2 $CXXFLAGS"
fi fi
if test $PICFLAG = 1; then
CFLAGS="-fPIC $CFLAGS"
CXXFLAGS="-fPIC $CXXFLAGS"
fi
else else
case `(uname) 2>/dev/null` in case `(uname) 2>/dev/null` in
IRIX*) IRIX*)
@ -223,5 +229,5 @@ AC_CONFIG_HEADER(config.h:configh.in)
AC_OUTPUT(makeinclude) AC_OUTPUT(makeinclude)
dnl# dnl#
dnl# End of "$Id: configure.in,v 1.26 1999/02/25 19:47:31 carl Exp $". dnl# End of "$Id: configure.in,v 1.27 1999/03/04 14:48:07 mike Exp $".
dnl# dnl#

View File

@ -1,5 +1,5 @@
# #
# "$Id: makeinclude.in,v 1.5 1999/01/07 19:16:49 mike Exp $" # "$Id: makeinclude.in,v 1.6 1999/03/04 14:48:08 mike Exp $"
# #
# Make include file for the Fast Light Tool Kit (FLTK). # Make include file for the Fast Light Tool Kit (FLTK).
# @configure_input@ # @configure_input@
@ -47,8 +47,8 @@ LIBCOMMAND =@LIBCOMMAND@
RANLIB =@RANLIB@ RANLIB =@RANLIB@
# libraries to link with: # libraries to link with:
LDLIBS =@LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm LDLIBS =@LDFLAGS@ @LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
# #
# End of "$Id: makeinclude.in,v 1.5 1999/01/07 19:16:49 mike Exp $". # End of "$Id: makeinclude.in,v 1.6 1999/03/04 14:48:08 mike Exp $".
# #