Until we use libtool, we need to specify in configure.in how to create and

use shared libraries (-rdynamic and -shared does not work everywhere)

We also have to use this information in */Makefile.in
This commit is contained in:
Loring Holden 2000-02-17 16:21:23 +00:00
parent 1b7369d462
commit 6b9563b880
3 changed files with 35 additions and 2 deletions

View file

@ -500,19 +500,52 @@ dnl Quakeforge code has lots of C++ comments, which cause
dnl problems with any compiler that is ANSI/ISO-C compliant.
dnl Make the compiler swallow its pride...
if test "x$GCC" != xyes; then
AC_MSG_CHECKING(for how to deal with C++ comments)
case "$target" in
*-aix*)
CFLAGS="$CFLAGS -qcpluscmt"
AC_MSG_RESULT([-qcpluscmt])
;;
*-irix6*)
CFLAGS="$CFLAGS -Xcpluscomm"
AC_MSG_RESULT([-Xcpluscomm])
;;
*-solaris*)
CFLAGS="$CFLAGS -xCC"
AC_MSG_RESULT([-xCC])
;;
default)
AC_MSG_RESULT(nothing needed or no switch known)
;;
esac
fi
dnl Until we use libtool, hardcode commands for creating a shared library
AC_MSG_CHECKING(for how to build shared libraries)
case "$target" in
*-aix*)
SHARED=''
USE_SHARED_LIBS=''
;;
i?86-*-*)
SHARED=-shared
USE_SHARED_LIBS=-rdynamic
;;
*-irix6*)
SHARED=-shared
USE_SHARED_LIBS=
;;
*-solaris*)
SHARED=-G
USE_SHARED_LIBS=
;;
esac
AC_MSG_RESULT(creating: $SHARED, using: $USE_SHARED_LIBS)
dnl Parameter to linker to make sure a shared library is created
AC_SUBST(SHARED)
dnl Parameter to linker to make sure a binary can use shared libraries
AC_SUBST(USE_SHARED_LIBS)
dnl We want warnings, lots of warnings...
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -Werror"

View file

@ -27,7 +27,7 @@ DEP_PATTERN := $(BUILD_DIR)/%.d $(BUILD_DIR)/common_lib/%.d
GL_OBJ_PATTERN := $(BUILD_DIR)/gl/%.@OBJEXT@
GL_DEP_PATTERN := $(BUILD_DIR)/gl/%.d
LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm -rdynamic
LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm @USE_SHARED_LIBS@
LIBS = @LIBS@
CC = @CC@
INTEL_ARCH = @INTEL_ARCH@

View file

@ -21,7 +21,7 @@ mandir = @mandir@
TARGET_DIR = $(PROJECT_ODIR)/targets
BUILD_DIR = $(TARGET_DIR)/uquake
LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm -rdynamic
LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm @USE_SHARED_LIBS@
LIBS = @LIBS@
CC = @CC@
INTEL_ARCH = @INTEL_ARCH@