Commit 1ac15cd8 authored by Martin Pool's avatar Martin Pool

Upgrade from including popt1.2 to a version of popt1.5 trimmed down to

include only source and build from our Makefile.
Don't scan for libpopt if we're using our own; this makes
autoconf confused.
parent b348deae
......@@ -28,7 +28,9 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o main.o checksum.o match.o syscall.o log.o backup.o
OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o
DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ)
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
popt/popthelp.o popt/poptparse.o
OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
# note that the -I. is needed to handle config.h when using VPATH
.c.o:
......@@ -36,11 +38,6 @@ OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ)
$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
@OBJ_RESTORE@
rsync: @BUILD_LIBPOPT@
popt-1.2/libpopt.a:
$(MAKE) -C popt-1.2 libpopt.a
all: rsync
man: rsync.1 rsyncd.conf.5
......@@ -57,7 +54,7 @@ install-strip:
$(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
rsync: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
rsync.1: rsync.yo
yodl2man -o rsync.1 rsync.yo
......
......@@ -25,6 +25,8 @@ else
CFLAGS=${CFLAGS-"-O"}
fi
CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
# look for getconf early as this affects just about everything
AC_CHECK_PROG(HAVE_GETCONF, getconf, "yes", "no")
if test $HAVE_GETCONF = "yes"; then
......@@ -40,7 +42,6 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_SUBST(SHELL)
AC_CHECK_PROG(HAVE_REMSH, remsh, 1, 0)
AC_DEFINE_UNQUOTED(HAVE_REMSH, $HAVE_REMSH)
......@@ -148,16 +149,17 @@ if test x"$rsync_cv_HAVE_FNMATCH" = x"yes"; then
AC_DEFINE(HAVE_FNMATCH)
fi
AC_CONFIG_SUBDIRS(popt-1.2)
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
if test x"$with_included_popt" != x"yes"
then
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
AC_MSG_CHECKING("whether to use included libpopt...")
AC_MSG_CHECKING("whether to use included libpopt")
if test x"$with_included_popt" = x"yes"
then
AC_MSG_RESULT("$srcdir/popt-1.2")
BUILD_LIBPOPT=popt-1.2/libpopt.a
LDFLAGS="$CFLAGS -L popt-1.2"
CFLAGS="$CFLAGS -I $srcdir/popt-1.2"
AC_MSG_RESULT("$srcdir/popt")
BUILD_POPT='$(popt_OBJS)'
CFLAGS="$CFLAGS -I $srcdir/popt"
else
AC_MSG_RESULT(no)
fi
......@@ -286,6 +288,6 @@ fi
AC_SUBST(OBJ_SAVE)
AC_SUBST(OBJ_RESTORE)
AC_SUBST(CC_SHOBJ_FLAG)
AC_SUBST(BUILD_LIBPOPT)
AC_SUBST(BUILD_POPT)
AC_OUTPUT(Makefile lib/dummy zlib/dummy)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment