Updated Linux DSO rules.

Changed configure.in, makeinclude, and src/Makefile to use DSOCOMMAND
instead of replacing LIBCOMMAND.

src/Makefile now creates both static and shared libraries if
--enable-shared is requested.

fluid/Makefile always uses the static library so that a CVS build will
always work, even if libfltk.so.1 isn't installed (problem for Solaris
and Linux, which don't support LD_LIBRARY_PATH).


git-svn-id: file:///fltk/svn/fltk/trunk@387 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 1999-03-09 18:32:44 +00:00
parent 8a0c2ce373
commit 022e5d90f1
4 changed files with 26 additions and 20 deletions

View File

@ -1,7 +1,7 @@
dnl# -*- sh -*-
dnl# the "configure" script is made from this by running GNU "autoconf"
dnl#
dnl# "$Id: configure.in,v 1.30 1999/03/09 17:55:05 mike Exp $"
dnl# "$Id: configure.in,v 1.31 1999/03/09 18:32:41 mike Exp $"
dnl#
dnl# Configuration script for the Fast Light Tool Kit (FLTK).
dnl#
@ -57,34 +57,33 @@ AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
fi])
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[
if eval "test x$enable_shared = xyes"; then
RANLIB=":"
PICFLAG=1
case $uname in
SunOS* | UNIX_S*)
LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -Wl,-h,\$(LIBNAME) \$(LDLIBS) -G $DEBUGFLAG -o"
DSOCOMMAND="\$(CXX) -Wl,-h,\$(LIBNAME) \$(LDLIBS) -G $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so
;;
HP-UX*)
LIBNAME="libfltk.sl.1"
LIBCOMMAND="ld -b -z +h libfltk.sl.1 \$DEBUGFLAG -o"
DSOCOMMAND="ld -b -z +h libfltk.sl.1 \$DEBUGFLAG -o"
ln -s libfltk.sl.1 lib/libfltk.sl
;;
OSF1*)
LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -Wl,-soname,\$(LIBNAME) \$(LDLIBS) -shared $DEBUGFLAG -o"
DSOCOMMAND="\$(CXX) -Wl,-soname,\$(LIBNAME) \$(LDLIBS) -shared $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so
;;
IRIX*)
LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) -soname \$(LIBNAME) \$(LDLIBS) -shared $DEBUGFLAG -o"
DSOCOMMAND="\$(CXX) -soname \$(LIBNAME) \$(LDLIBS) -shared $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so
;;
*)
echo "Warning: shared libraries may not be supported. Trying -shared"
echo " option with compiler."
LIBNAME="libfltk.so.1"
LIBCOMMAND="\$(CXX) \$(LDLIBS) -shared $DEBUGFLAG -o"
DSOCOMMAND="\$(CXX) -Wl,-soname,\$(LIBNAME) \$(LDLIBS) -shared $DEBUGFLAG -o"
ln -s libfltk.so.1 lib/libfltk.so
;;
esac
@ -234,5 +233,5 @@ AC_CONFIG_HEADER(config.h:configh.in)
AC_OUTPUT(makeinclude)
dnl#
dnl# End of "$Id: configure.in,v 1.30 1999/03/09 17:55:05 mike Exp $".
dnl# End of "$Id: configure.in,v 1.31 1999/03/09 18:32:41 mike Exp $".
dnl#

View File

@ -1,5 +1,5 @@
#
# "$Id: Makefile,v 1.9 1999/02/19 13:10:20 mike Exp $"
# "$Id: Makefile,v 1.10 1999/03/09 18:32:42 mike Exp $"
#
# Fluid makefile for the Fast Light Tool Kit (FLTK).
#
@ -58,8 +58,8 @@ include ../makeinclude
.cxx :
$(CXX) -I.. $(CXXFLAGS) -o $@ $< -L../lib -lfltk $(LDLIBS)
$(PROGRAM) : $(OBJECTS) ../lib/$(LIBNAME)
$(CXX) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) -L../lib -lfltk $(LDLIBS)
$(PROGRAM) : $(OBJECTS) ../lib/libfltk.a
$(CXX) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) ../lib/libfltk.a $(LDLIBS)
clean :
-@ rm -f *.o $(PROGRAM) $(CLEAN) core *~ makedepend
@ -90,5 +90,5 @@ rebuild:
./fluid -c widget_panel.fl
#
# End of "$Id: Makefile,v 1.9 1999/02/19 13:10:20 mike Exp $".
# End of "$Id: Makefile,v 1.10 1999/03/09 18:32:42 mike Exp $".
#

View File

@ -1,5 +1,5 @@
#
# "$Id: makeinclude.in,v 1.6 1999/03/04 14:48:08 mike Exp $"
# "$Id: makeinclude.in,v 1.7 1999/03/09 18:32:42 mike Exp $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
# @configure_input@
@ -45,10 +45,11 @@ CXXFLAGS =@CXXFLAGS@ @X_CFLAGS@
LIBNAME =@LIBNAME@
LIBCOMMAND =@LIBCOMMAND@
RANLIB =@RANLIB@
DSOCOMMAND =@DSOCOMMAND@
# libraries to link with:
LDLIBS =@LDFLAGS@ @LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
#
# End of "$Id: makeinclude.in,v 1.6 1999/03/04 14:48:08 mike Exp $".
# End of "$Id: makeinclude.in,v 1.7 1999/03/09 18:32:42 mike Exp $".
#

View File

@ -1,5 +1,5 @@
#
# "$Id: Makefile,v 1.16 1999/03/04 14:54:18 mike Exp $"
# "$Id: Makefile,v 1.17 1999/03/09 18:32:44 mike Exp $"
#
# Library makefile for the Fast Light Tool Kit (FLTK).
#
@ -150,10 +150,16 @@ LIBRARY = ../lib/$(LIBNAME)
OBJECTS = $(CPPFILES:.cxx=.o) $(CFILES:.c=.o)
$(LIBRARY) : $(OBJECTS)
@echo $(LIBCOMMAND) $(LIBRARY) ...
@$(LIBCOMMAND) $(LIBRARY) $(OBJECTS)
@$(RANLIB) $(LIBRARY)
all: $(LIBRARY) ../lib/libfltk.a
../lib/libfltk.a: $(OBJECTS)
@echo $(LIBCOMMAND) ../lib/libfltk.a ...
@$(LIBCOMMAND) ../lib/libfltk.a $(OBJECTS)
@$(RANLIB) ../lib/libfltk.a
../lib/libfltk.sl.1 ../lib/libfltk.so.1: $(OBJECTS)
@echo $(DSOCOMMAND) $(LIBRARY) ...
@$(DSOCOMMAND) $(LIBRARY) $(OBJECTS)
.SUFFIXES: .cxx .h .o
@ -195,5 +201,5 @@ install: ../lib/$(LIBNAME)
-ln -s FL $(includedir)/Fl
#
# End of "$Id: Makefile,v 1.16 1999/03/04 14:54:18 mike Exp $".
# End of "$Id: Makefile,v 1.17 1999/03/09 18:32:44 mike Exp $".
#