diff options
-rw-r--r-- | acconfig.h | 7 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.in | 180 | ||||
-rw-r--r-- | debian/dpkg-internals | 16 | ||||
-rw-r--r-- | include/dpkg.h.in | 5 | ||||
-rwxr-xr-x | mkinstalldirs | 40 | ||||
-rw-r--r-- | utils/md5.c (renamed from md5sum/md5.c) | 0 | ||||
-rw-r--r-- | utils/md5.h (renamed from md5sum/md5.h) | 0 | ||||
-rw-r--r-- | utils/md5sum.1 (renamed from md5sum/md5sum.1) | 0 | ||||
-rw-r--r-- | utils/md5sum.c (renamed from md5sum/md5sum.c) | 0 |
10 files changed, 121 insertions, 129 deletions
diff --git a/acconfig.h b/acconfig.h index 6c897b9c4..281d27f05 100644 --- a/acconfig.h +++ b/acconfig.h @@ -56,3 +56,10 @@ /* Define as 1 if you have the stpcpy function. */ #undef HAVE_STPCPY + +/* Defined to $(localstatedir) dir location */ +#undef LOCALSTATEDIR + +/* Defined to the $(libdir) location */ +#undef LLIBDIR + diff --git a/autogen.sh b/autogen.sh index e3c21e96d..c874bc00d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,14 +7,12 @@ aclocal -I ./automake gettextize $copy -f libtoolize --force $copy autoheader -automake --add-missing --foreign $copy autoconf # Utils has it's own configure, so we need to repeat this there cd utils aclocal -I ../automake autoheader -automake --foreign autoconf -l ../ # Return to the previous directory diff --git a/configure.in b/configure.in index ef09efe9a..e17389761 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,8 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.12]) AC_INIT(include/dpkg.h.in) -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(config.h) + AC_CHECK_TOOL_PREFIX @@ -12,83 +13,46 @@ AC_PROG_CC AC_CANONICAL_SYSTEM AC_CHECK_TOOL_PREFIX -dnl tl_PROG_CXX AC_PROG_CXX AM_CONDITIONAL(HAVE_CPLUSPLUS, [test "$CXX" != ""]) AC_CHECK_TOOL(LD, ld, ld) -AM_INIT_AUTOMAKE(dpkg,[`sed -n '1s/dpkg (\([0-9.]\+\)).*/\1/p' ${srcdir}/debian/changelog`]) -ACLOCAL="$ACLOCAL -I automake" +PACKAGE=dpkg +AC_SUBST(PACKAGE) +VERSION=`cat $srcdir/version-nr` +AC_SUBST(VERSION) + +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]) +AC_REQUIRE([AC_ARG_PROGRAM]) +AC_REQUIRE([AC_PROG_MAKE_SET]) + AC_MSG_CHECKING(dpkg version) AC_MSG_RESULT($VERSION) AC_PREFIX_DEFAULT(/usr) dpkg_archset='' -AC_ARG_WITH(arch, -[ --with-arch=value set/override (Debian) architecture value (deprecated)], -[ - if test "x$with_arch" = x; then - AC_MSG_ERROR(--with-arch requires an architecture name) - fi - dpkg_archset="${with_arch}" - dpkg_tmp="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`" - if test "x$dpkg_tmp" = "x"; then - AC_MSG_WARN([unable to find specified architecture $dpkg_archset in archtable]) - elif test "x$dpkg_tmp" != "x$dpkg_archset"; then - AC_MSG_WARN([canonical architecture is $dpkg_tmp (from archtable)]) - fi -],[ - AC_MSG_CHECKING(system architecture) - dpkg_archset="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`" - # Finish off - if test "x$dpkg_archset" = "x"; then - AC_MSG_ERROR(failed: use --with-arch= or --target=) - fi +AC_MSG_CHECKING(system architecture) +dpkg_archset="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`" +# Finish off +if test "x$dpkg_archset" = "x"; then + AC_MSG_RESULT($target_cpu, but not found in archtable) + dpkg_archset=$target_cpu +else AC_MSG_RESULT($dpkg_archset) -]) +fi if test "x$dpkg_archset" != x then AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_archset}") fi -if test "x${dpkg_archset}" = xi386; then - AC_MSG_CHECKING(target i386 system/binary format) - case "${target_os}" in - linuxaout|linux-gnuaout) - AC_MSG_RESULT(Linux a.out) - dpkg_cc_binfmt=a.out - ;; - - linuxcoff|linux-gnucoff) - AC_MSG_RESULT(Linux COFF) - dpkg_cc_binfmt=coff - ;; - - linux|linuxelf|linux-gnu*) - AC_MSG_RESULT(Linux ELF) - dpkg_cc_binfmt=elf - ;; - - *) - AC_MSG_RESULT([other (${target_os})]) - dpkg_cc_binfmt="" - ;; - esac - if test "x$dpkg_cc_binfmt" != "x"; then - AC_DEFINE_UNQUOTED(ARCHBINFMT," $dpkg_cc_binfmt") - fi -fi - -AC_ARG_WITH(newdeb, -[ --with-newdeb make dpkg-deb default to new archives], -[AC_DEFINE(BUILDOLDPKGFORMAT, 0)]) -AC_ARG_WITH(olddeb, -[ --with-olddeb make dpkg-deb default to old archives], -[AC_DEFINE(BUILDOLDPKGFORMAT, 1)]) - dnl gettext ALL_LINGUAS="cs en es fr ja pl ru" @@ -108,10 +72,12 @@ else fi AC_STDC_HEADERS +AC_PROG_LN_S +AC_CHECK_PROG(RM,rm,rm -f) +AC_CHECK_PROG(SED,sed,sed) AC_PROG_INSTALL -AM_PROG_LIBTOOL dnl Default in case EMACS == no -lispdir="\$(datadir)/emacs/site-lisp" +lispdir="\$(datadir)/emacs/site-lisp/$PACKAGE" AM_PATH_LISPDIR AC_MODE_T AC_PID_T @@ -122,7 +88,11 @@ AC_C_BIGENDIAN AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_FUNCS(unsetenv alphasort scandir strerror strsignal strtoul vsnprintf lchown) -AC_CHECK_HEADERS(sys/cdefs.h sys/sysinfo.h) +AC_CHECK_HEADERS(sys/cdefs.h sys/sysinfo.h syslog.h) +AC_CHECK_HEADERS(error.h hurd.h ps.h hurd/ihash.h) + +AC_CHECK_LIB(shouldbeinlibc, fmt_past_time) +AC_CHECK_LIB(ps, proc_stat_list_pid_proc_stat) AC_CHECK_FUNC(sysinfo, AC_DEFINE(HAVE_SYSINFO), @@ -150,64 +120,56 @@ else CXXFLAGS="-D_REENTRANT -D_GNU_SOURCE -O" fi -DPKG_CACHED_TRY_COMPILE(your C compiler,dpkg_cv_c_works, - [#include <string.h>], [strcmp("a","b")], - AC_MSG_RESULT(works), - AC_MSG_RESULT(broken) - AC_MSG_ERROR(C compiler is broken)) - -DPKG_CACHED_TRY_COMPILE(alphasort declaration,dpkg_cv_header_alphasort,[ +AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/dir.h> -], alphasort, - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ALPHASORT_DECLARATION), - AC_MSG_RESULT(no)) - -DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,, - [} inline int foo (int x) {], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INLINE), - AC_MSG_RESULT(no)) - -DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),dpkg_cv_c_attribute_supported,, +], alphasort, AC_DEFINE(HAVE_ALPHASORT_DECLARATION)) + +AC_TRY_COMPILE(,[ +} inline int foo (int x) {], AC_DEFINE(HAVE_INLINE)) + +AC_TRY_COMPILE(, [extern int testfunction(int x) __attribute__((,,))], - AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GNUC25_ATTRIB) - DPKG_CACHED_TRY_COMPILE(__attribute__((noreturn)),dpkg_cv_c_attribute_noreturn,, + AC_TRY_COMPILE(, [extern int testfunction(int x) __attribute__((noreturn))], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GNUC25_NORETURN), - AC_MSG_RESULT(no)) - DPKG_CACHED_TRY_COMPILE(__attribute__((const)),dpkg_cv_c_attribute_const,, + AC_DEFINE(HAVE_GNUC25_NORETURN)) + AC_TRY_COMPILE(, [extern int testfunction(int x) __attribute__((const))], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GNUC25_CONST), - AC_MSG_RESULT(no)) - DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),dpkg_cv_attribute_format,, + AC_DEFINE(HAVE_GNUC25_CONST)) + AC_TRY_COMPILE(, [extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GNUC25_PRINTFFORMAT), - AC_MSG_RESULT(no)), - AC_MSG_RESULT(no)) - -AC_SUBST(CWARNS) -CWARNS="" + AC_DEFINE(HAVE_GNUC25_PRINTFFORMAT)) + ) DPKG_C_GCC_TRY_WARNS(-Wall -Wno-implicit, dpkg_cv_c_gcc_warn_all) DPKG_C_GCC_TRY_WARNS(-Wwrite-strings, dpkg_cv_c_gcc_warn_writestrings) DPKG_C_GCC_TRY_WARNS(-Wpointer-arith, dpkg_cv_c_gcc_warn_pointerarith) DPKG_C_GCC_TRY_WARNS(-Wimplicit -Wnested-externs, dpkg_cv_c_gcc_warn_implicit) -if test "${GCC-no}" = yes; then - CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes" -fi - -echo "#define DPKG_VERSION \"$VERSION\" /* This line modified by configure */" > version.h.new -cmp -s version.h.new version.h || mv version.h.new version.h +dnl Force this here so we can do the next step +test "x$prefix" = xNONE && prefix="$ac_default_prefix" +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +LLIBDIR=`eval echo $libdir` +LLIBDIR=`eval echo $LLIBDIR` +LOCALSTATEDIR=`eval echo $localstatedir` +AC_DEFINE_UNQUOTED(LLIBDIR, "$LLIBDIR") +AC_DEFINE_UNQUOTED(LOCALSTATEDIR, "$LOCALSTATEDIR") AC_CONFIG_SUBDIRS(utils) -AC_OUTPUT([Makefile intl/Makefile dpkg-deb/Makefile lib/Makefile - include/Makefile dselect/Makefile split/Makefile methods/Makefile - md5sum/Makefile main/Makefile doc/Makefile doc/ja/Makefile scripts/Makefile - utils/Makefile po/Makefile.in]) + +AC_OUTPUT( +Makefile.conf +Makefile +intl/Makefile +include/Makefile +dpkg-deb/Makefile +split/Makefile +lib/Makefile +doc/Makefile +doc/ja/Makefile +scripts/Makefile +main/Makefile +dselect/Makefile +methods/Makefile +po/Makefile.in) diff --git a/debian/dpkg-internals b/debian/dpkg-internals deleted file mode 100644 index 9e3957448..000000000 --- a/debian/dpkg-internals +++ /dev/null @@ -1,16 +0,0 @@ -Document: dpkg-internals -Title: dpkg Internals Guide -Author: Klee Dienes <klee@mit.edu> -Abstract: This manual describes the internal structure of the - dpkg package management system. -Section: Apps/System - -Format: HTML -Index: /usr/share/doc/dpkg-doc/internals.html/index.html -Files: /usr/share/doc/dpkg-doc/internals.html/*.html - -Format: info -Files: /usr/share/info/internals.info.gz - -Format: postscript -Files: /usr/share/doc/dpkg-doc/internals.ps.gz diff --git a/include/dpkg.h.in b/include/dpkg.h.in index cef8dfb12..637f0e701 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -67,7 +67,7 @@ #define POSTRMFILE "postrm" #define LISTFILE "list" -#define ADMINDIR "/var/lib/dpkg" +#define ADMINDIR "#ADMINDIR#" #define STATUSFILE "status" #define AVAILFILE "available" #define LOCKFILE "lock" @@ -84,7 +84,7 @@ #define IMPORTANTFMT "%04d" /* change => also change lib/database.c:cleanup_updates */ #define MAXUPDATES 50 -#define LIBDIR "/usr/lib/dpkg" +#define LIBDIR "#LIBDIR#" #define LOCALLIBDIR "/usr/local/lib/dpkg" #define METHODSDIR "methods" @@ -153,6 +153,7 @@ # define textdomain(Domain) /* empty */ # define _(Text) Text # define N_(Text) Text +# define gettext(Text) Text #endif extern const char thisname[]; /* defined separately in each program */ diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..6b3b5fc5d --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Public domain + +# $Id$ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/md5sum/md5.c b/utils/md5.c index 0ac9d192d..0ac9d192d 100644 --- a/md5sum/md5.c +++ b/utils/md5.c diff --git a/md5sum/md5.h b/utils/md5.h index 021766c17..021766c17 100644 --- a/md5sum/md5.h +++ b/utils/md5.h diff --git a/md5sum/md5sum.1 b/utils/md5sum.1 index df7c704f0..df7c704f0 100644 --- a/md5sum/md5sum.1 +++ b/utils/md5sum.1 diff --git a/md5sum/md5sum.c b/utils/md5sum.c index 2d103676f..2d103676f 100644 --- a/md5sum/md5sum.c +++ b/utils/md5sum.c |