diff --git a/Makefile.in b/Makefile.in index 53885022..3b6dc158 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,7 +26,7 @@ SUBDIRS = @SUBDIRS@ RECURSIVE_TARGETS = all-recursive install-recursive clean-recursive distclean-recursive -MAKE = `which make` +MAKE = `which @MAKE@` INSTALL = @INSTALL@ diff --git a/configure b/configure index 24b54b1a..d1deb547 100755 --- a/configure +++ b/configure @@ -610,6 +610,7 @@ libclamav_extra_libs mysql_obj mysql_libs mysql_includes +MAKE SUBDIRS RUNNING_USER OBJS @@ -2030,7 +2031,7 @@ ac_config_headers="$ac_config_headers piler-config.h" CONFIGURE_PARAMS_FILE=params.h -rm -f $CONFIGURE_PARAMS_FILE; echo "#define CONFIGURE_PARAMS \"Build Date: "`date`"\nConfigure command: ./configure $@\"" > $CONFIGURE_PARAMS_FILE +rm -f $CONFIGURE_PARAMS_FILE; echo "#define CONFIGURE_PARAMS \"Build Date: "`date`\\nConfigure command: ./configure $@\""" > $CONFIGURE_PARAMS_FILE ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3402,6 +3403,7 @@ done + have_libclamav="no" have_libtool="no" have_clamd="no" @@ -3423,6 +3425,10 @@ os=`uname -s` id_bin="id" +MAKE="make" + +if test "$os" = "SunOS"; then MAKE="gmake"; fi + SUBDIRS="src etc util init.d test" diff --git a/configure.in b/configure.in index 52b0a0d7..125aa406 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_CONFIG_SRCDIR([src/piler.c]) AC_CONFIG_HEADER(piler-config.h) CONFIGURE_PARAMS_FILE=params.h -rm -f $CONFIGURE_PARAMS_FILE; echo "#define CONFIGURE_PARAMS \"Build Date: "`date`"\nConfigure command: ./configure $@\"" > $CONFIGURE_PARAMS_FILE +rm -f $CONFIGURE_PARAMS_FILE; echo "#define CONFIGURE_PARAMS \"Build Date: "`date`\\nConfigure command: ./configure $@\""" > $CONFIGURE_PARAMS_FILE dnl Checks for programs. AC_PROG_CC @@ -22,6 +22,7 @@ AC_SUBST(LIBDIR) AC_SUBST(OBJS) AC_SUBST(RUNNING_USER) AC_SUBST(SUBDIRS) +AC_SUBST(MAKE) AC_SUBST(mysql_includes) AC_SUBST(mysql_libs) AC_SUBST(mysql_obj) @@ -50,6 +51,10 @@ os=`uname -s` id_bin="id" +MAKE="make" + +if test "$os" = "SunOS"; then MAKE="gmake"; fi + dnl SUBDIRS="src etc util perl init.d templates history contrib/stat" SUBDIRS="src etc util init.d test" diff --git a/src/Makefile.in b/src/Makefile.in index 47701d1b..4446cdac 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -43,7 +43,7 @@ piler: piler.c libpiler.a libpiler.a: $(OBJS) $(MYSQL_OBJS) ar cr libpiler.a $(OBJS) $(MYSQL_OBJS) ranlib libpiler.a - $(CC) -shared -Wl -o libpiler.so.$(LIBPILER_VERSION) $(OBJS) $(MYSQL_OBJS) $(LIBS) @LDFLAGS@ + $(CC) -shared -Wl -o libpiler.so.$(LIBPILER_VERSION) $(OBJS) $(MYSQL_OBJS) ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so.$(PILER_VERSION) @@ -60,8 +60,8 @@ pilerexport: pilerexport.c libpiler.a pilerpurge: pilerpurge.c libpiler.a $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) -pilerconf: pilerconf.c cfg.o misc.o tai.o - $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ $(LIBDIR) +pilerconf: pilerconf.c libpiler.a + $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) reindex: reindex.c libpiler.a $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) diff --git a/src/config.h b/src/config.h index 7109424e..1faa07bd 100644 --- a/src/config.h +++ b/src/config.h @@ -13,7 +13,7 @@ #define VERSION "0.1.20" -#define BUILD 679 +#define BUILD 681 #define HOSTID "mailarchiver" diff --git a/src/counters.c b/src/counters.c index a5bc6a3d..5eaf55fd 100644 --- a/src/counters.c +++ b/src/counters.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/src/imap.c b/src/imap.c index 510a1579..a5de15ba 100644 --- a/src/imap.c +++ b/src/imap.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/src/import.c b/src/import.c index 6e9586df..13daf8f8 100644 --- a/src/import.c +++ b/src/import.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/src/session.c b/src/session.c index 804caa2d..11d09e96 100644 --- a/src/session.c +++ b/src/session.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include