1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
From c47dd4e0d9a3a62154c9574238add285af6c0885 Mon Sep 17 00:00:00 2001
From: "Bernhard R. Link" <brlink@debian.org>
Date: Sat, 19 Dec 2009 13:01:09 +0100
Subject: Bring build system to proper state.
- do not link against Xmu or Xext as we do not use them
- do not link against nls unless needed
- no not reference files not longer existing
- support newer autoconf (so --host and --build can both be given)
- therefor move header headings from acconfig.h to configure.in
- use NNTP_OBJS for nntp.o
- support DESTDIR
- install app-defaults to proper place (http://bugs.debian.org/86303)
- install led binary to the proper place
---
Makefile.in | 41 +++++++++++++++++++++--------------------
configure.in | 29 ++++++++++++++++-------------
2 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index de878d5..63420cc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,11 +6,13 @@ SHELL=/bin/sh
VERSION=@VERSION@
prefix=@prefix@
+datarootdir=@datarootdir@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
mandir=@mandir@
srcdir=@srcdir@
+appdefdir=@sysconfdir@/X11/app-defaults
VPATH=@srcdir@
@SET_MAKE@
@@ -23,7 +25,7 @@ LIBS=@LIBS@
LIBDYN = $(srcdir)/libdyn/libdyn.a
OBJS = xbuffy.o boxfile.o realfrom.o getword.o len_next.o move_left.o \
- strincmp.o remfirstwd.o header_cmp.o @LIBOBJS@
+ remfirstwd.o header_cmp.o @NNTP_OBJS@
DOC = README xbuffy.man boxfile.fmt boxfile.sample
DEFAULTS = XBuffy.ad
HDRS = xbuffy.h xbuffy.xbm
@@ -38,30 +40,29 @@ led: led.o
$(CC) -o led led.o $(LDFLAGS)
$(LIBDYN):
- (cd libdyn && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) -I..")
+ cd libdyn && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) -I.."
install: xbuffy @LED@
- $(srcdir)/mkinstalldirs $(bindir)
- -mv -f $(bindir)/xbuffy $(bindir)/xbuffy.old
- $(INSTALL) -m 755 xbuffy $(bindir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 xbuffy $(DESTDIR)$(bindir)
-if [ "@LED@" ]; then \
- $(INSTALL) -m 4755 led $(bindir); \
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)/xbuffy; \
+ $(INSTALL) -m 755 led $(DESTDIR)$(libdir)/xbuffy; \
fi
- $(srcdir)/mkinstalldirs $(mandir)/man1
- $(INSTALL) -m 644 $(srcdir)/xbuffy.man $(mandir)/man1/xbuffy.1
- -if [ ! -f $(libdir)/X11/app-defaults/XBuffy ]; then \
- $(srcdir)/mkinstalldirs $(libdir)/X11/app-defaults; \
- $(INSTALL) -m 644 $(srcdir)/XBuffy.ad $(libdir)/X11/app-defaults/XBuffy; \
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 644 $(srcdir)/xbuffy.man $(DESTDIR)$(mandir)/man1/xbuffy.1
+ -if [ ! -f $(DESTDIR)$(appdefdir)/XBuffy ]; then \
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(appdefdir); \
+ $(INSTALL) -m 644 $(srcdir)/XBuffy.ad $(DESTDIR)$(appdefdir)/XBuffy; \
fi
uninstall:
- rm -f $(bindir)/xbuffy $(mandir)/man1/xbuffy.1
+ rm -f $(DESTDIR)$(bindir)/xbuffy $(DESTDIR)$(mandir)/man1/xbuffy.1
-if [ "@LED@" ]; then \
- rm -f $(bindir)/led \
+ rm -f $(DESTDIR)$(bindir)/led \
fi
- -mv -f $(bindir)/xbuffy.old $(bindir)/xbuffy
-config.h.in: $(srcdir)/acconfig.h
+config.h.in: $(srcdir)/configure.in
autoheader
config.h: $(srcdir)/config.h.in
@@ -73,11 +74,11 @@ dep: Makefile
echo '# DO NOT REMOVE THIS LINE' >> Makefile
$(CC) -MM $(XCPPFLAGS) $(srcdir)/*.c >> Makefile
-clean:
- (cd $(srcdir) && rm -f $(CLEANFILES))
- (cd $(srcdir)/libdyn && $(MAKE) $@)
+clean:
+ cd $(srcdir) && rm -f $(CLEANFILES)
+ cd $(srcdir)/libdyn && $(MAKE) $@
distclean: clean
- (cd $(srcdir) && rm -f config.cache config.log config.status \
- Makefile config.h tags)
+ cd $(srcdir) && rm -f config.cache config.log config.status \
+ libdyn/Makefile Makefile config.h tags
diff --git a/configure.in b/configure.in
index 5d3d3d5..4b36ab0 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(xbuffy.h)
AC_CONFIG_HEADER(config.h)
+AC_PREREQ(2.50)
VERSION=3.3
SUBVERSION=.bl.3
@@ -16,6 +17,14 @@ AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
+AH_TEMPLATE(DEBUG,[Enable debugging info])
+AH_TEMPLATE(USE_CONTENT_LENGTH,[try to use Content-Length: headers])
+AH_TEMPLATE(VERSION,[Version Information])
+AH_TEMPLATE(USE_NNTP,[enable NNTP mailboxes?])
+AH_TEMPLATE(NNTP_SERVER,[Default NNTP Server])
+AH_TEMPLATE(USE_MOTIF,[use Motif instead of Athena?])
+AH_TEMPLATE(USE_LED,[enable keyboard LED blinking?])
+
AC_DEFINE_UNQUOTED(VERSION, "$VERSION$SUBVERSION")
AC_SUBST(VERSION)
@@ -31,12 +40,7 @@ if test -d "$x_libraries"; then
AC_MSG_RESULT(Found X libraries at $x_libraries)
fi
-dnl AC_CHECK_LIB(ICE, IceOpenConnection,
-dnl [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"],, [$X_EXTRA_LIBS])
-
-LIBS="$LIBS -lXmu -lXt -lX11"
-dnl Check for -lXext
-AC_CHECK_LIB(Xext, XShapeQueryExtension, LIBS="-lXext $LIBS",, -lX11 $X_EXTRA_LIBS)
+LIBS="$LIBS -lXt -lX11"
XAW=yes
AC_ARG_WITH(xaw3d, [ --with-xaw3d[=DIR] use Xaw3d instead of Xaw],
@@ -115,7 +119,7 @@ AC_ARG_WITH(motif, [ --with-motif[=DIR] use Motif instead of Xaw],
dnl Default to Athena libraries
if test x$XAW = xyes; then
- LIBS="-lXaw -lXext -lXmu $LIBS"
+ LIBS="-lXaw $LIBS"
AC_MSG_RESULT(Defaulting to Athena Widgets)
fi
@@ -141,9 +145,10 @@ AC_ARG_ENABLE(nntp, [ --enable-nntp[=server] Enable NNTP 'Mailbox' support],
xbuffy_nntp_server=$enableval
fi
AC_DEFINE(USE_NNTP)
- LIBOBJS="$LIBOBJS nntp.o"
- AC_CHECK_LIB(socket, socket)
- AC_CHECK_LIB(nsl, gethostbyname)
+ NNTP_OBJS="nntp.o"
+ AC_SUBST(NNTP_OBJS)
+ AC_CHECK_FUNC(socket,[],[AC_CHECK_LIB(socket, socket)])
+ AC_CHECK_FUNC(gethostbyname,[],[AC_CHECK_LIB(nsl, gethostbyname)])
if test x$xbuffy_nntp_server != xno; then
AC_DEFINE_UNQUOTED(NNTP_SERVER, "$xbuffy_nntp_server")
AC_SUBST(NNTP_SERVER)
@@ -163,8 +168,6 @@ fi
AC_HEADER_STDC
-AC_CHECK_FUNCS(setpriority)
-AC_REPLACE_FUNCS(utimes strdup bcopy)
-
+AC_CHECK_FUNCS(setpriority bcopy)
AC_OUTPUT(Makefile libdyn/Makefile)
|