From 217c588baacf213a4570ee13e27477683baa3e88 Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 17 Jan 2005 23:58:09 +0000 Subject: [PATCH] Build on macosx. CVS patchset: 7701 CVS date: 2005/01/17 23:58:09 --- Makefile.am | 2 +- autogen.sh | 23 +++++++++++++++++++---- build/Makefile.am | 1 + configure.ac | 25 ++++++++++++++++--------- db/dist/configure | 3 ++- file/autogen.sh | 16 +++++++++++++--- lib/Makefile.am | 4 +++- lib/formats.c | 6 +++++- lib/poptALL.c | 1 + lib/rpmrc.c | 7 +++++++ lua/Makefile.am | 2 +- misc/glob.h | 2 +- popt/Makefile.am | 2 ++ popt/autogen.sh | 12 +++++++++++- python/header-py.h | 2 +- python/rpmmodule.c | 4 ++++ rpm2cpio.c | 1 + rpmdb/Makefile.am | 1 + rpmio/Makefile.am | 3 ++- rpmio/fts.c | 6 ++++++ rpmio/fts.h | 4 ++++ rpmio/rpmdav.c | 4 ++++ rpmio/rpmdav.h | 2 +- rpmio/rpmio.h | 2 +- rpmqv.c | 1 + system.h | 2 +- tools/Makefile.am | 20 ++++++++++---------- tools/convertdb1.c | 1 + tools/dump.c | 1 + tools/dumpdb.c | 1 + tools/rpmcache.c | 2 ++ tools/rpmdeps.c | 1 + tools/rpmgraph.c | 1 + tools/rpminject.c | 1 + tools/rpmsort.c | 1 + tools/rpmtool.c | 1 + tools/rpmxml.c | 2 ++ tools/rpmxp.c | 2 ++ 38 files changed, 134 insertions(+), 38 deletions(-) diff --git a/Makefile.am b/Makefile.am index de17d3d..3cff70a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ INCLUDES = \ -I$(top_srcdir)/rpmio \ @WITH_BEECRYPT_INCLUDE@ \ -I$(top_srcdir)/popt \ + -I$(top_srcdir)/misc \ @WITH_LIBELF_INCLUDE@ \ @INCPATH@ @@ -36,7 +37,6 @@ myLDADD = \ $(top_builddir)/rpmio/librpmio.la \ $(top_builddir)/popt/libpopt.la \ @WITH_ZLIB_LIB@ \ - @INTLLIBS@ \ @LIBMISC@ rpmbindir = `echo $(bindir) | sed -e s,usr/bin,bin,` diff --git a/autogen.sh b/autogen.sh index 9df187c..c5061ad 100755 --- a/autogen.sh +++ b/autogen.sh @@ -16,9 +16,24 @@ checked if you need to, as rpm should build (and has built) with all recent versions of libtool/autoconf/automake. " -[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 +libtoolize=`which glibtoolize 2>/dev/null` +case $libtoolize in +/*) ;; +*) libtoolize=`which libtoolize 2>/dev/null` + case $libtoolize in + /*) ;; + *) libtoolize=libtoolize + esac +esac + +[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 [ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1 -[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1 +[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 + +if [ X"$@" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then + export myprefix=/opt/local + export CPPFLAGS="-I${myprefix}/include" +fi if [ -d popt ]; then (echo "--- popt"; cd popt; ./autogen.sh --noconfigure "$@") @@ -37,7 +52,7 @@ if [ -d file ]; then fi echo "--- rpm" -libtoolize --copy --force +$libtoolize --copy --force aclocal autoheader automake -a -c @@ -62,5 +77,5 @@ if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then fi ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} ${enable_posixmutexes} "$@" else - ./configure "$@" + ./configure --prefix=${myprefix} "$@" fi diff --git a/build/Makefile.am b/build/Makefile.am index 6866eb7..d02bdb7 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = -I. \ @WITH_BEECRYPT_INCLUDE@ \ -I$(top_srcdir)/file/src \ -I$(top_srcdir)/popt \ + -I$(top_srcdir)/misc \ @WITH_LIBELF_INCLUDE@ \ @INCPATH@ diff --git a/configure.ac b/configure.ac index 5ad3298..000642e 100644 --- a/configure.ac +++ b/configure.ac @@ -110,14 +110,17 @@ dnl LDFLAGS_STATIC="-all" dnl to attempt static executables using libtool. Otherwise dnl LDFLAGS_STATIC="" dnl +with_selinuxval=no AC_MSG_CHECKING(flag used by libtool to link rpm) if test X"$GCC" = Xyes ; then case "$target" in + *-*-linux*) LDFLAGS_STATIC="-all-static" + with_selinuxval=yes ;; *-*-solaris*) LDFLAGS_STATIC="-static";; *-*-hpux*) LDFLAGS_STATIC="-static";; *-*-darwin*) LDFLAGS_STATIC="";; # Mac OS X does not do static binaries. *-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread. - *-*-*) LDFLAGS_STATIC="-all-static";; + *-*-*) LDFLAGS_STATIC="";; esac elif test X"$CC" = Xcc ; then case "$target" in @@ -130,7 +133,7 @@ elif test X"$CC" = Xcc ; then *-*-irix*) LDFLAGS_STATIC="-static";; #should be -non_shared, but can't # link because of crt1.o then. *-*-ultrix*) LDFLAGS_STATIC="-all-static";; #ultrix doesn't have shared libs. - *-*-*) LDFLAGS_STATIC="-static" + *-*-*) LDFLAGS_STATIC="" AC_MSG_WARN([ Unable to guess what option to pass to $CC to generate a static @@ -346,7 +349,7 @@ do AC_MSG_CHECKING(for $dir/include in INCPATH) if test -d $dir/include 2>/dev/null ; then - if [ "$dir" != "/usr/local" ] ; then + if [[ "$dir" != "/usr/local" ]] ; then INCPATH="$INCPATH -I$dir/include" fi AC_MSG_RESULT(yes) @@ -400,15 +403,19 @@ AC_SUBST(WITH_LIBELF_INCLUDE) AC_SUBST(WITH_LIBELF_LIB) WITH_LIBDWARF_INCLUDE= +WITH_LIBDWARF_DEBUGEDIT= AC_CHECK_HEADER([dwarf.h], [ AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the header file.]) + WITH_LIBDWARF_DEBUGEDIT="debugedit" ], [ if test -d elfutils/libdwarf ; then AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the header file.]) WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf" + WITH_LIBDWARF_DEBUGEDIT="debugedit" fi ]) AC_SUBST(WITH_LIBDWARF_INCLUDE) +AC_SUBST(WITH_LIBDWARF_DEBUGEDIT) #================= # Check for beecrypt library. Prefer external, otherwise internal. @@ -421,7 +428,7 @@ AC_CHECK_HEADER([beecrypt/beecrypt.h], [ AC_CHECK_HEADER([beecrypt/api.h], [ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) ]) - WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt" + WITH_BEECRYPT_INCLUDE="-I${includedir}/beecrypt" WITH_BEECRYPT_LIB="-lbeecrypt" ]) ], [ @@ -447,7 +454,7 @@ AC_CHECK_HEADER([neon/ne_session.h], [ AC_CHECK_LIB(neon, ne_get_response_header, [ AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.]) ]) - WITH_NEON_INCLUDE="-I/usr/include/neon" + WITH_NEON_INCLUDE="-I${includedir}/neon" WITH_NEON_LIB="-lneon" ]) ], [ @@ -556,9 +563,9 @@ dnl TVM: dnl horrible *temporary* hack to make sure that if we found gettext() in dnl -lintl that we add -lintl *back* to $LIBS. dnl -if test X$gt_cv_func_gettext_libintl = Xyes ; then - LIBS="-lintl $LIBS" -fi +dnl if test X$gt_cv_func_gettext_libintl = Xyes ; then +dnl LIBS="-lintl $LIBS" +dnl fi dnl Checks for header files we can live without. AC_HEADER_STDC @@ -922,7 +929,7 @@ elif test $withval = yes -a $__DOXYGEN = no ; then fi WITH_SELINUX_LIB= -withval=yes +withval=${with_selinuxval} AC_ARG_WITH(selinux, [ --with-selinux build with selinux support ]) if test $withval != no ; then AC_DEFINE(WITH_SELINUX, 1, [Build with selinux support?]) diff --git a/db/dist/configure b/db/dist/configure index 144beef..6cda7d8 100755 --- a/db/dist/configure +++ b/db/dist/configure @@ -33801,7 +33801,8 @@ echo "${ECHO_T}yes" >&6 -e 's/return;//' \ -e 's/^}/__dbsrv_timeout(0);}/' \ -e '}' \ - -e '1,/^#include/s/^#include/#include "db_config.h"\n#include "db_int_def.h"\ + -e '1,/^#include/s/^#include/#include "db_config.h"\ +#include "db_int_def.h"\ &/' > db_server_svc.c $RPCGEN -c $XDR_FILE | diff --git a/file/autogen.sh b/file/autogen.sh index 0f9cc5e..ff9b215 100755 --- a/file/autogen.sh +++ b/file/autogen.sh @@ -16,11 +16,21 @@ checked if you need to, as rpm should build (and has built) with all recent versions of libtool/autoconf/automake. " -[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 +libtoolize=`which glibtoolize 2>/dev/null` +case $libtoolize in +/*) ;; +*) libtoolize=`which libtoolize 2>/dev/null` + case $libtoolize in + /*) ;; + *) libtoolize=libtoolize + esac +esac + +[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 [ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1 -[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1 +[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 -libtoolize --copy --force +$libtoolize --copy --force aclocal autoheader automake -a -c diff --git a/lib/Makefile.am b/lib/Makefile.am index 0233b59..abe3a64 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -11,6 +11,7 @@ INCLUDES = -I. \ -I$(top_srcdir)/rpmio \ @WITH_BEECRYPT_INCLUDE@ \ -I$(top_srcdir)/popt \ + -I$(top_srcdir)/misc \ @INCPATH@ EXTRA_DIST = getdate.y tgi.c rpmgi.c rpmgi.h @@ -44,7 +45,8 @@ librpm_la_LDFLAGS = -release 4.4 $(LDFLAGS) \ $(top_builddir)/rpmdb/librpmdb.la \ $(top_builddir)/rpmio/librpmio.la \ $(top_builddir)/popt/libpopt.la \ - @WITH_SELINUX_LIB@ + @WITH_SELINUX_LIB@ \ + @INTLLIBS@ getdate.c: getdate.y @echo expect 10 shift/reduce conflicts diff --git a/lib/formats.c b/lib/formats.c index dd02722..e7e03e1 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -980,10 +980,12 @@ static int filerequireTag(Header h, /*@out@*/ rpmTagType * type, /* I18N look aside diversions */ +#if defined(ENABLE_NLS) /*@-exportlocal -exportheadervar@*/ /*@unchecked@*/ -int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */ +extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */ /*@=exportlocal =exportheadervar@*/ +#endif /*@observer@*/ /*@unchecked@*/ static const char * language = "LANGUAGE"; @@ -1035,7 +1037,9 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, /* change to en_US for msgkey -> msgid resolution */ langval = getenv(language); (void) setenv(language, "en_US", 1); +#if defined(ENABLE_NLS) /*@i@*/ ++_nl_msg_cat_cntr; +#endif msgid = NULL; /*@-branchstate@*/ diff --git a/lib/poptALL.c b/lib/poptALL.c index ac192f1..e1c6e43 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -4,6 +4,7 @@ */ #include "system.h" +const char *__progname; #include #include diff --git a/lib/rpmrc.c b/lib/rpmrc.c index d7375dd..fed9b23 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -1131,6 +1131,13 @@ static void defaultMachine(/*@out@*/ const char ** arch, strcpy(un.machine, __power_pc() ? "ppc" : "rs6000"); sprintf(un.sysname,"aix%s.%s", un.version, un.release); } + else if(!strcmp(un.sysname, "Darwin")) { +#ifdef __ppc__ + strcpy(un.machine, "ppc"); +#else ifdef __i386__ + strcpy(un.machine, "i386"); +#endif + } else if (!strcmp(un.sysname, "SunOS")) { if (!strncmp(un.release,"4", 1)) /* SunOS 4.x */ { int fd; diff --git a/lua/Makefile.am b/lua/Makefile.am index 20669fc..293e000 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -12,7 +12,7 @@ EXTRA_DIST = \ local/linit.lua LDADD = liblua.la -INCLUDES = -I$(srcdir)/include -I$(srcdir)/local +INCLUDES = -I$(srcdir)/include -I$(srcdir)/local -I$(includedir) lua_lua_SOURCES = lua/lua.c lua_lua_CFLAGS = -DLUA_USERCONFIG='"$(srcdir)/local/userconfig.c"' diff --git a/misc/glob.h b/misc/glob.h index c0c7b30..a52d109 100644 --- a/misc/glob.h +++ b/misc/glob.h @@ -46,7 +46,7 @@ extern "C" { #endif /* C++ or ANSI C. */ /* We need `size_t' for the following definitions. */ -#ifndef __size_t +#if !defined(__size_t) && !defined(_BSD_SIZE_T_DEFINED_) # if defined __GNUC__ && __GNUC__ >= 2 typedef __SIZE_TYPE__ __size_t; # ifdef _XOPEN_SOURCE diff --git a/popt/Makefile.am b/popt/Makefile.am index 3c2e618..59414db 100644 --- a/popt/Makefile.am +++ b/popt/Makefile.am @@ -37,7 +37,9 @@ include_HEADERS = popt.h usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = libpopt.la + libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c +libpopt_la_LDFLAGS = @INTLLIBS@ man_MANS = popt.3 diff --git a/popt/autogen.sh b/popt/autogen.sh index 0ccf997..cded311 100755 --- a/popt/autogen.sh +++ b/popt/autogen.sh @@ -5,8 +5,18 @@ test -z "$srcdir" && srcdir=. THEDIR="`pwd`" +libtoolize=`which glibtoolize 2>/dev/null` +case $libtoolize in +/*) ;; +*) libtoolize=`which libtoolize 2>/dev/null` + case $libtoolize in + /*) ;; + *) libtoolize=libtoolize + esac +esac + cd "$srcdir" -libtoolize --copy --force +$libtoolize --copy --force aclocal autoheader automake -a -c diff --git a/python/header-py.h b/python/header-py.h index acd170d..49a2d06 100644 --- a/python/header-py.h +++ b/python/header-py.h @@ -14,7 +14,7 @@ extern PyTypeObject hdr_Type; /** \ingroup py_c */ -PyObject * pyrpmError; +extern PyObject * pyrpmError; hdrObject * hdr_Wrap(Header h) /*@*/; diff --git a/python/rpmmodule.c b/python/rpmmodule.c index 204717e..44e134e 100644 --- a/python/rpmmodule.c +++ b/python/rpmmodule.c @@ -39,6 +39,10 @@ /** */ +PyObject * pyrpmError; + +/** + */ static PyObject * archScore(PyObject * self, PyObject * args, PyObject * kwds) { char * arch; diff --git a/rpm2cpio.c b/rpm2cpio.c index 7397e83..06e389a 100644 --- a/rpm2cpio.c +++ b/rpm2cpio.c @@ -1,6 +1,7 @@ /* rpmarchive: spit out the main archive portion of a package */ #include "system.h" +const char *__progname; #include #include diff --git a/rpmdb/Makefile.am b/rpmdb/Makefile.am index 10f7d0a..d533d20 100644 --- a/rpmdb/Makefile.am +++ b/rpmdb/Makefile.am @@ -11,6 +11,7 @@ INCLUDES = -I. \ -I$(top_srcdir)/rpmio \ @WITH_BEECRYPT_INCLUDE@ \ -I$(top_srcdir)/popt \ + -I$(top_srcdir)/misc \ @WITH_LIBELF_INCLUDE@ \ @INCPATH@ diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index ca7a0b9..8a6a723 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = -I. \ @WITH_BEECRYPT_INCLUDE@ \ @WITH_LUA_INCLUDE@ \ -I$(top_srcdir)/popt \ + -I$(top_srcdir)/misc \ @INCPATH@ pkgincdir = $(pkgincludedir) @@ -37,7 +38,7 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDFLAGS) \ @WITH_LUA_LIB@ \ $(top_builddir)/file/src/libmagic.la \ @WITH_ZLIB_LIB@ \ - -lneon -lrt -lpthread + -lneon -lpthread librpmio_la_LIBADD = # $(BEECRYPTLOBJS) librpmio_la_DEPENDENCIES = # .created diff --git a/rpmio/fts.c b/rpmio/fts.c index a46de35..4ce33fe 100644 --- a/rpmio/fts.c +++ b/rpmio/fts.c @@ -59,6 +59,12 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; # define _STAT_VER 0 # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) #endif +#if defined(__APPLE__) +# define __errno_location() (__error()) +# define stat64 stat +# define _STAT_VER 0 +# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) +#endif #include "system.h" #include "fts.h" #include "rpmio.h" diff --git a/rpmio/fts.h b/rpmio/fts.h index 7429101..eaa4a8b 100644 --- a/rpmio/fts.h +++ b/rpmio/fts.h @@ -55,6 +55,10 @@ # define _D_EXACT_NAMLEN(d) ((d)->d_reclen) #endif +#if defined(__APPLE__) +# define _D_EXACT_NAMLEN(d) ((d)->d_reclen) +#endif + #endif #include diff --git a/rpmio/rpmdav.c b/rpmio/rpmdav.c index 12b6bde..d990fc6 100644 --- a/rpmio/rpmdav.c +++ b/rpmio/rpmdav.c @@ -1406,7 +1406,9 @@ struct dirent * avReaddir(DIR * dir) dp->d_reclen = 0; /* W2DO? */ #if !defined(hpux) && !defined(sun) +#if !defined(__APPLE__) dp->d_off = 0; /* W2DO? */ +#endif /*@-boundsread@*/ dp->d_type = dt[i]; /*@=boundsread@*/ @@ -1528,7 +1530,9 @@ struct dirent * davReaddir(DIR * dir) dp->d_reclen = 0; /* W2DO? */ #if !defined(hpux) && !defined(sun) +#if !defined(__APPLE__) dp->d_off = 0; /* W2DO? */ +#endif /*@-boundsread@*/ dp->d_type = dt[i]; /*@=boundsread@*/ diff --git a/rpmio/rpmdav.h b/rpmio/rpmdav.h index 1d64867..8a07224 100644 --- a/rpmio/rpmdav.h +++ b/rpmio/rpmdav.h @@ -17,7 +17,7 @@ struct __dirstream { }; #endif -#if !defined(DT_DIR) +#if !defined(DT_DIR) || defined(__APPLE__) # define DT_UNKNOWN 0 # define DT_FIFO 1 # define DT_CHR 2 diff --git a/rpmio/rpmio.h b/rpmio/rpmio.h index 9264232..2129d61 100644 --- a/rpmio/rpmio.h +++ b/rpmio/rpmio.h @@ -10,7 +10,7 @@ #include #include /*@-noparams@*/ -#include +#include "glob.h" /*@=noparams@*/ #include #include diff --git a/rpmqv.c b/rpmqv.c index 4bf31ad..21a065a 100755 --- a/rpmqv.c +++ b/rpmqv.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #define _AUTOHELP diff --git a/system.h b/system.h index 1a26fa3..87455f7 100644 --- a/system.h +++ b/system.h @@ -448,7 +448,7 @@ extern void muntrace (void) } #endif /*@unchecked@*/ -const char *__progname; +extern const char *__progname; #if HAVE_NETDB_H #include diff --git a/tools/Makefile.am b/tools/Makefile.am index f0ab8ad..b29dbf1 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -13,24 +13,22 @@ INCLUDES = -I. \ @WITH_LIBELF_INCLUDE@ \ @WITH_LIBDWARF_INCLUDE@ \ -I$(top_srcdir)/file/src \ - @INCPATH@ \ - -I/usr/include/libxml2 - -I$(top_srcdir)/misc + -I$(top_srcdir)/misc \ + @INCPATH@ EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h -EXTRA_PROGRAMS = convertdb1 rpminject rpmsort rpmtool rpmxml +EXTRA_PROGRAMS = debugedit convertdb1 rpminject rpmsort rpmtool rpmxml LDADD = \ - $(top_builddir)/lib/librpm.la \ - @INTLLIBS@ + $(top_builddir)/lib/librpm.la staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@ noinst_PROGRAMS = dumpdb pkgbindir = @RPMCONFIGDIR@ -pkgbin_PROGRAMS = debugedit javadeps rpmcache rpmdeps rpmfile +pkgbin_PROGRAMS = @WITH_LIBDWARF_DEBUGEDIT@ javadeps rpmcache rpmdeps rpmfile MAGIC = $(pkgbindir)/magic bin_PROGRAMS = rpmgraph @@ -44,11 +42,11 @@ debugedit_LDADD = @LDFLAGS_STATIC@ @WITH_LIBELF_LIB@ \ javadeps_SOURCES = javadeps.c rpmcache_SOURCES = rpmcache.c -#rpmcache_LDFLAGS = $(staticLDFLAGS) +#rpmcache_LDFLAGS = -L$(libdir) # $(staticLDFLAGS) rpmdeps_SOURCES = rpmdeps.c -rpmdeps_LDADD = $(top_builddir)/build/librpmbuild.la #rpmdeps_LDFLAGS = $(staticLDFLAGS) +rpmdeps_LDADD = $(top_builddir)/build/librpmbuild.la rpmfile.c: $(top_srcdir)/file/src/file.c rm -f $@ @@ -66,13 +64,15 @@ rpminject_SOURCES = rpminject.c #rpminject_LDFLAGS = $(staticLDFLAGS) rpmsort_SOURCES = rpmsort.c -#rpmsort_LDFLAGS = $(staticLDFLAGS) +#rpmsort_LDFLAGS = (staticLDFLAGS) rpmtool_SOURCES = rpmtool.c rpmxp.c +rpmtool_CFLAGS = -I$(includedir)/libxml2 #rpmtool_LDFLAGS = $(staticLDFLAGS) rpmtool_LDADD = $(LDADD) -lxml2 rpmxml_SOURCES = rpmxml.c # rpmxp.c +rpmxml_CFLAGS = -I$(includedir)/libxml2 #rpmxml_LDFLAGS = $(staticLDFLAGS) rpmxml_LDADD = $(LDADD) -lxml2 diff --git a/tools/convertdb1.c b/tools/convertdb1.c index 829768d..aad86cb 100644 --- a/tools/convertdb1.c +++ b/tools/convertdb1.c @@ -1,5 +1,6 @@ #if defined(HAVE_CONFIG_H) #include "system.h" +const char *__progname; #else #include #include diff --git a/tools/dump.c b/tools/dump.c index 584372f..e66d13e 100644 --- a/tools/dump.c +++ b/tools/dump.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include #include "header_internal.h" diff --git a/tools/dumpdb.c b/tools/dumpdb.c index 745c81b..97ff386 100644 --- a/tools/dumpdb.c +++ b/tools/dumpdb.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include #include "header_internal.h" diff --git a/tools/rpmcache.c b/tools/rpmcache.c index 650c25f..3661914 100644 --- a/tools/rpmcache.c +++ b/tools/rpmcache.c @@ -3,6 +3,8 @@ */ #include "system.h" +const char *__progname; + #include #include diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c index fa9e524..5857424 100644 --- a/tools/rpmdeps.c +++ b/tools/rpmdeps.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include #include diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index 302c82a..6104af7 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include diff --git a/tools/rpminject.c b/tools/rpminject.c index 4b1a68a..3f83643 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include "rpmbuild.h" #include "buildio.h" diff --git a/tools/rpmsort.c b/tools/rpmsort.c index 4fa6056..5169eb9 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include #include diff --git a/tools/rpmtool.c b/tools/rpmtool.c index 90b3599..9502665 100644 --- a/tools/rpmtool.c +++ b/tools/rpmtool.c @@ -1,4 +1,5 @@ #include "system.h" +const char *__progname; #include #include diff --git a/tools/rpmxml.c b/tools/rpmxml.c index 37adbaf..97782a6 100644 --- a/tools/rpmxml.c +++ b/tools/rpmxml.c @@ -1,4 +1,6 @@ #include "system.h" +const char *__progname; + #include #define _RPMXP_INTERNAL #include "rpmxp.h" diff --git a/tools/rpmxp.c b/tools/rpmxp.c index 00f0e61..6cefc0e 100644 --- a/tools/rpmxp.c +++ b/tools/rpmxp.c @@ -1,4 +1,6 @@ #include "system.h" +const char *__progname; + #include #define _RPMXP_INTERNAL #include "rpmxp.h" -- 2.7.4