static rpm generation was fubarred
CVS patchset: 2104 CVS date: 1998/05/01 19:33:51
This commit is contained in:
parent
2afff79ebc
commit
26d510ed98
|
@ -38,6 +38,7 @@ OBJS = rpm.o query.o install.o verify.o checksig.o ftp.o url.o build.o \
|
|||
PROGS = @RPM@ rpm2cpio
|
||||
LIBS = @LIBS@ @LIBINTL@ @LIBDL@
|
||||
LOADLIBES = -lrpmbuild -lpopt -lrpm @LIBMISC@
|
||||
LDFLAGS_STATIC = @LDFLAGS_STATIC@
|
||||
|
||||
SOURCES = $(subst .o,.c,$(OBJS))
|
||||
|
||||
|
|
41
configure.in
41
configure.in
|
@ -52,37 +52,41 @@ dnl
|
|||
AC_MSG_CHECKING(what additional CFLAGS are needed to link statically)
|
||||
if test X"$GCC" = Xyes ; then
|
||||
case "$target" in
|
||||
*-*-hpux*) CFLAGS_STATIC="-Wl,-a,archive_shared";; #works better
|
||||
*-*-*) CFLAGS_STATIC="-static";;
|
||||
*-*-hpux*) LDFLAGS_STATIC="-Wl,-a,archive_shared";; #works better
|
||||
*-*-*) LDFLAGS_STATIC="-static";;
|
||||
esac
|
||||
elif test X"$CC" = Xcc ; then
|
||||
case "$target" in
|
||||
*-*-linux*) CFLAGS_STATIC="-static";;
|
||||
*-*-freebsd*) CFLAGS_STATIC="-static";;
|
||||
*-*-osf*) CFLAGS_STATIC="-non_shared";;
|
||||
*-*-aix*) CFLAGS_STATIC="";; # -Wl,-bnso doesn't seem to work...
|
||||
*-*-hpux*) CFLAGS_STATIC="-Wl,-a,archive_shared";;
|
||||
*-*-solaris*) CFLAGS_STATIC="-B static";;
|
||||
*-*-irix*) CFLAGS_STATIC="";; #should be -non_shared, but can't
|
||||
*-*-linux*) LDFLAGS_STATIC="-static";;
|
||||
*-*-freebsd*) LDFLAGS_STATIC="-static";;
|
||||
*-*-osf*) LDFLAGS_STATIC="-non_shared";;
|
||||
*-*-aix*) LDFLAGS_STATIC="";; # -Wl,-bnso doesn't seem to work...
|
||||
*-*-hpux*) LDFLAGS_STATIC="-Wl,-a,archive_shared";;
|
||||
*-*-solaris*) LDFLAGS_STATIC="-B static";;
|
||||
*-*-irix*) LDFLAGS_STATIC="";; #should be -non_shared, but can't
|
||||
# link because of crt1.o then.
|
||||
*-*-ultrix*) CFLAGS_STATIC="";; #ultrix doesn't have shared libs.
|
||||
*-*-*) CFLAGS_STATIC=""
|
||||
*-*-ultrix*) LDFLAGS_STATIC="";; #ultrix doesn't have shared libs.
|
||||
*-*-*) LDFLAGS_STATIC=""
|
||||
AC_MSG_WARN([
|
||||
|
||||
Unable to guess what option to pass to $CC to generate a static
|
||||
executable. You will need to set the CFLAGS_STATIC macro in Makefile.inc to
|
||||
executable. You will need to set the LDFLAGS_STATIC macro in Makefile.inc to
|
||||
the appropriate argument(s) if you want to build a static rpm executable.
|
||||
|
||||
])
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# a shot in the dark...
|
||||
CFLAGS_STATIC="-static"
|
||||
# just link it dynamically
|
||||
LDFLAGS_STATIC=""
|
||||
fi
|
||||
AC_MSG_RESULT($CFLAGS_STATIC)
|
||||
AC_SUBST(CFLAGS_STATIC)
|
||||
AC_MSG_RESULT($LDFLAGS_STATIC)
|
||||
|
||||
if test -n "$LDFLAGS_STATIC"; then
|
||||
RPM=rpm
|
||||
else
|
||||
RPM=rpm.shared
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(POSIX chmod...)
|
||||
touch foo.chmodtest
|
||||
|
@ -486,10 +490,6 @@ if test "x$tmpdir" = "x"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
#This test will obviate a special case for at least Solaris;
|
||||
#possibly others also.
|
||||
AC_CHECK_FUNC(dlopen,RPM=rpm,RPM=rpm.shared)
|
||||
|
||||
if echo "$build_os" | grep sco > /dev/null; then
|
||||
echo "hacking things up for sco"
|
||||
RPM=rpm.shared
|
||||
|
@ -586,6 +586,7 @@ AC_SUBST(LIBMISC)
|
|||
AC_SUBST(MISCPATH)
|
||||
AC_SUBST(RPMCONFIGDIR)
|
||||
AC_SUBST(MKDIR_P)
|
||||
AC_SUBST(LDFLAGS_STATIC)
|
||||
|
||||
if test -d newbuild ; then
|
||||
NBMAKEFILE=newbuild/Makefile
|
||||
|
|
Loading…
Reference in New Issue