diff -Naur deborphan-1.0.old/configure deborphan-1.0.new/configure --- deborphan-1.0.old/configure Sun Apr 29 00:19:41 2001 +++ deborphan-1.0.new/configure Thu Feb 21 14:05:53 2002 @@ -3230,7 +3230,7 @@ fi -for ac_hdr in string.h getopt.h errno.h +for ac_hdr in string.h errno.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3270,7 +3270,7 @@ fi done -for ac_func in getopt_long setvbuf +for ac_func in setvbuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3277: checking for $ac_func" >&5 diff -Naur deborphan-1.0.old/include/config.h.in deborphan-1.0.new/include/config.h.in --- deborphan-1.0.old/include/config.h.in Wed Feb 14 23:17:43 2001 +++ deborphan-1.0.new/include/config.h.in Thu Feb 21 14:08:50 2002 @@ -74,7 +74,7 @@ #undef HAVE_GETCWD /* Define if you have the getopt_long function. */ -#undef HAVE_GETOPT_LONG +#define HAVE_GETOPT_LONG 1 /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE @@ -113,7 +113,7 @@ #undef HAVE_ERRNO_H /* Define if you have the header file. */ -#undef HAVE_GETOPT_H +#define HAVE_GETOPT_H 1 /* Define if you have the header file. */ #undef HAVE_LIMITS_H @@ -144,9 +144,6 @@ /* Version number of package */ #undef VERSION - -/* Location of your statusfile */ -#undef STATUS_FILE /* Bitwise or'd list of flags for regcomp() */ #undef REG_FLAGS diff -Naur deborphan-1.0.old/include/deborphan.h deborphan-1.0.new/include/deborphan.h --- deborphan-1.0.old/include/deborphan.h Thu Mar 29 04:16:23 2001 +++ deborphan-1.0.new/include/deborphan.h Thu Feb 21 12:26:01 2002 @@ -31,11 +31,13 @@ #ifndef _POSIX_SOURCE # include +# if !defined (__APPLE__) # ifndef off_t typedef int off_t; # endif int ftruncate(int, off_t); extern int fileno __P ((FILE *__stream)); +#endif #endif #ifndef HAVE_ERRNO_H diff -Naur deborphan-1.0.old/src/Makefile.in deborphan-1.0.new/src/Makefile.in --- deborphan-1.0.old/src/Makefile.in Sun Apr 29 00:19:55 2001 +++ deborphan-1.0.new/src/Makefile.in Thu Feb 21 14:00:11 2002 @@ -84,16 +84,17 @@ l = @l@ bin_PROGRAMS = deborphan -deborphan_SOURCES = deborphan.c exit.c libdeps.c pkginfo.c xalloc.c string.c keep.c file.c set.c +deborphan_SOURCES = deborphan.c exit.c libdeps.c pkginfo.c xalloc.c string.c keep.c file.c set.c getopt.c getopt1.c KEEPNAME = keep -STATEDIR = /var/lib/deborphan +STATEDIR = $(localstatedir)/lib/deborphan KEEPFILE = $(STATEDIR)/$(KEEPNAME) +STATUSFILE = $(localstatedir)/lib/dpkg/status localedir = $(datadir)/locale INCLUDES = -I../include -DEFS = -DLOCALEDIR=\"$(localedir)\" -DKEEPER_FILE=\"$(KEEPFILE)\" @DEFS@ +DEFS = -DLOCALEDIR=\"$(localedir)\" -DKEEPER_FILE=\"$(KEEPFILE)\" -DSTATUS_FILE=\"$(STATUSFILE)\" @DEFS@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../include/config.h CONFIG_CLEAN_FILES = @@ -103,7 +104,7 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ deborphan_OBJECTS = deborphan.o exit.o libdeps.o pkginfo.o xalloc.o \ -string.o keep.o file.o set.o +string.o keep.o file.o set.o getopt.o getopt1.o deborphan_LDADD = $(LDADD) deborphan_DEPENDENCIES = deborphan_LDFLAGS = @@ -299,8 +300,8 @@ install-data-hook: - test -e $(STATEDIR) || mkdir $(STATEDIR) - test -e $(KEEPFILE) || $(INSTALL_PROGRAM) ../keep $(KEEPFILE) + test -e $(DESTDIR)$(STATEDIR) || mkdir -p $(DESTDIR)$(STATEDIR) + test -e $(DESTDIR)$(KEEPFILE) || $(INSTALL_PROGRAM) ../keep $(DESTDIR)$(KEEPFILE) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Naur deborphan-1.0.old/src/deborphan.c deborphan-1.0.new/src/deborphan.c --- deborphan-1.0.old/src/deborphan.c Thu Mar 29 04:16:27 2001 +++ deborphan-1.0.new/src/deborphan.c Thu Feb 21 14:00:19 2002 @@ -33,7 +33,7 @@ /* Use either getopt.h (getopt_long) or unistd.h (getopt) */ #ifdef HAVE_GETOPT_H -# include +# include "getopt.h" #else # include extern int optind; diff -Naur deborphan-1.0.old/src/pkginfo.c deborphan-1.0.new/src/pkginfo.c --- deborphan-1.0.old/src/pkginfo.c Thu Feb 15 00:58:33 2001 +++ deborphan-1.0.new/src/pkginfo.c Thu Feb 21 12:25:53 2002 @@ -9,6 +9,7 @@ #include #include +#include #include #ifdef HAVE_CONFIG_H diff -Naur deborphan-1.0.old/util/Makefile.in deborphan-1.0.new/util/Makefile.in --- deborphan-1.0.old/util/Makefile.in Sun Apr 29 00:20:09 2001 +++ deborphan-1.0.new/util/Makefile.in Thu Feb 21 13:27:52 2002 @@ -209,7 +209,7 @@ install-exec-hook: - -ln -s $(sbindir)/orphaner $(sbindir)/editkeep + -(cd $(DESTDIR)$(sbindir) && ln -s orphaner editkeep) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded.