From 4dce60bf36bb0f2533d1c750d6ca96078f335aa3 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Mon, 28 May 2001 16:00:52 +0000 Subject: [PATCH] updates. --- CHANGES | 8 ++++++++ Makefile.am.pre | 12 +++++++----- Makefile.defines => Makefile.defines.in | 15 +++++++-------- apps/irssi/src/fe-text/Makefile.am | 4 +++- apps/irssi/src/silc/core/Makefile.am | 20 ++++++-------------- apps/silc/Makefile.am | 12 ++---------- apps/silcd/Makefile.am | 11 ++--------- configure.in.pre | 9 +++++++++ lib/contrib/Makefile.am | 4 +--- lib/contrib/regex.c | 9 +++++++-- lib/silcclient/Makefile.am | 6 ++---- lib/silccore/Makefile.am | 5 ++--- lib/silccrypt/Makefile.am | 5 ++--- lib/silcmath/Makefile.am | 5 ++--- lib/silcsim/Makefile.am | 5 ++--- lib/silcske/Makefile.am | 5 ++--- lib/silcutil/Makefile.am | 5 ++--- prepare | 2 +- 18 files changed, 67 insertions(+), 75 deletions(-) rename Makefile.defines => Makefile.defines.in (84%) diff --git a/CHANGES b/CHANGES index 33c0fff8..e4d72fcd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +Mon May 28 19:05:22 EEST 2001 Pekka Riikonen + + * Added Makefile.defines[.in] that should for now on be included + in all Makefile.am file in the source tree. That file includes + all common compilation definitions for SILC source tree. Also + all external packages that has been included in the SILC source + may include it (like irssi for example) to use the SILC defaults. + Mon May 28 10:30:51 EEST 2001 Pekka Riikonen * Minor changes to the ./prepare script to change the package diff --git a/Makefile.am.pre b/Makefile.am.pre index 0723031d..7a459ea1 100644 --- a/Makefile.am.pre +++ b/Makefile.am.pre @@ -21,6 +21,8 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign SUBDIRS = lib silc silcd doc includes DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS +include $(top_srcdir)/Makefile.defines + dist-bzip: distdir -chmod -R a+r $(distdir) -$(TAR) chof $(distdir).tar $(distdir) @@ -33,11 +35,11 @@ EXTRA_DIST = CHANGES CREDITS # Installing of SILC into the system # -etcdir = @ETCDIR@ -modulesdir = $(prefix)/@MODULESDIR@ -helpdir = $(prefix)/@HELPDIR@ -docdir = $(prefix)/@DOCDIR@ -logsdir = $(prefix)/@LOGSDIR@ +etcdir = $(silc_etcdir) +modulesdir = $(silc_modulesdir) +helpdir = $(silc_helpdir) +docdir = $(silc_docdir) +logsdir = $(silc_logsdir) install-dirs: -mkdir -p $(etcdir) diff --git a/Makefile.defines b/Makefile.defines.in similarity index 84% rename from Makefile.defines rename to Makefile.defines.in index cf01bc6a..fc280466 100644 --- a/Makefile.defines +++ b/Makefile.defines.in @@ -1,4 +1,3 @@ -# Generated automatically from Makefile.defines.in by configure. # # Makefile.defines.in # @@ -32,21 +31,21 @@ # # Generic definitions # -silc_top_srcdir = /home/priikone/silc +silc_top_srcdir = @SILC_TOP_SRCDIR@ # # Common libraries that are linked against the created executable # -SILC_COMMON_LIBS = -lncurses -ldl -L$(silc_top_srcdir)/lib -lsilc +SILC_COMMON_LIBS = @LIBS@ -L$(silc_top_srcdir)/lib -lsilc # # Installation defines # -silc_etcdir = /etc/silc -silc_modulesdir = $(prefix)/modules -silc_helpdir = $(prefix)/help -silc_docdir = $(prefix)/doc -silc_logsdir = $(prefix)/logs +silc_etcdir = @ETCDIR@ +silc_modulesdir = $(prefix)/@MODULESDIR@ +silc_helpdir = $(prefix)/@HELPDIR@ +silc_docdir = $(prefix)/@DOCDIR@ +silc_logsdir = $(prefix)/@LOGSDIR@ # # INCLUDE defines diff --git a/apps/irssi/src/fe-text/Makefile.am b/apps/irssi/src/fe-text/Makefile.am index ef0f5616..da340a41 100644 --- a/apps/irssi/src/fe-text/Makefile.am +++ b/apps/irssi/src/fe-text/Makefile.am @@ -1,5 +1,7 @@ bin_PROGRAMS = silc +include $(top_srcdir)/../Makefile.defines + INCLUDES = \ $(GLIB_CFLAGS) \ -I$(top_srcdir)/src \ @@ -18,7 +20,7 @@ silc_LDADD = \ @PERL_FE_LINK_LIBS@ \ $(PROG_LIBS) \ $(CURSES_LIBS) \ - -L../../../lib -lsilcclient -lsilc + -L../../../lib -lsilcclient $(SILC_COMMON_LIBS) silc_SOURCES = \ gui-entry.c \ diff --git a/apps/irssi/src/silc/core/Makefile.am b/apps/irssi/src/silc/core/Makefile.am index 039d4057..5c78b4d7 100644 --- a/apps/irssi/src/silc/core/Makefile.am +++ b/apps/irssi/src/silc/core/Makefile.am @@ -1,25 +1,17 @@ INCLUDES = $(GLIB_CFLAGS) -I$(IRSSI_INCLUDE) -I$(IRSSI_INCLUDE)/src -SILC_INCLUDE=../../../.. IRSSI_INCLUDE=../../.. -INCLUDES = \ +include $(top_srcdir)/../Makefile.defines + +ADD_INCLUDES = \ $(GLIB_CFLAGS) \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -I$(IRSSI_INCLUDE) -I$(IRSSI_INCLUDE)/src \ + -I$(IRSSI_INCLUDE) \ + -I$(IRSSI_INCLUDE)/src \ -I$(IRSSI_INCLUDE)/src/core \ -I$(IRSSI_INCLUDE)/src/fe-common/core \ - -I$(IRSSI_INCLUDE)/src/fe-common/silc \ - -I$(SILC_INCLUDE)/includes \ - -I$(SILC_INCLUDE)/lib/silccore \ - -I$(SILC_INCLUDE)/lib/silccrypt \ - -I$(SILC_INCLUDE)/lib/silcmath \ - -I$(SILC_INCLUDE)/lib/silcske \ - -I$(SILC_INCLUDE)/lib/silcsim \ - -I$(SILC_INCLUDE)/lib/silcutil \ - -I$(SILC_INCLUDE)/lib/silcclient \ - -I$(SILC_INCLUDE)/lib/silcmath/gmp \ - -I$(SILC_INCLUDE)/lib/trq + -I$(IRSSI_INCLUDE)/src/fe-common/silc noinst_LIBRARIES=libsilc_core.a diff --git a/apps/silc/Makefile.am b/apps/silc/Makefile.am index 6c6d109a..48f284ee 100644 --- a/apps/silc/Makefile.am +++ b/apps/silc/Makefile.am @@ -30,16 +30,8 @@ silc_SOURCES = \ silc_DEPENDENCIES = ../lib/libsilcclient.a ../lib/libsilc.a -if SILC_BUILD_GMP -LDADD = -L. -L.. -L../lib -lsilcclient -lsilc -lcurses -else -LDADD = -L. -L.. -L../lib -lsilcclient -lsilc -lcurses -L/usr/lib \ - -L/usr/local/lib -lgmp -endif +LDADD = -L. -L.. -L../lib -lsilcclient $(SILC_COMMON_LIBS) EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../lib/silccore -I../lib/silccrypt \ - -I../lib/silcmath -I../lib/silcske -I../lib/silcsim \ - -I../includes -I../lib/silcclient -I../lib/silcutil \ - -I../lib/silcmath/gmp -I../lib/trq +include $(top_srcdir)/Makefile.defines diff --git a/apps/silcd/Makefile.am b/apps/silcd/Makefile.am index 0e380222..f8d3246c 100644 --- a/apps/silcd/Makefile.am +++ b/apps/silcd/Makefile.am @@ -35,15 +35,8 @@ silcd_SOURCES = \ server_version.c silcd_DEPENDENCIES = ../lib/libsilc.a -if SILC_BUILD_GMP -LDADD = -L. -L.. -L../lib -lsilc -else -LDADD = -L. -L.. -L../lib -lsilc -L/usr/lib -L/usr/local/lib -lgmp -endif +LDADD = -L. $(SILC_COMMON_LIBS) EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../lib/silccore -I../lib/silccrypt \ - -I../lib/silcmath -I../lib/silcske -I../lib/silcsim \ - -I../includes -I../lib/silcutil \ - -I../lib/silcmath/gmp -I../lib/trq +include $(top_srcdir)/Makefile.defines diff --git a/configure.in.pre b/configure.in.pre index db51c3c7..13f40105 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -352,6 +352,7 @@ AC_ARG_WITH(gmp, AC_CHECK_HEADER(gmp.h, AC_CHECK_LIB(gmp, __gmpz_init, AM_CONDITIONAL(SILC_BUILD_GMP, test x$withval = yes) + LIBS="$LIBS -L/usr/lib -L/usr/local/lib -lgmp" AC_MSG_RESULT(GMP will not be compiled), AM_CONDITIONAL(SILC_BUILD_GMP, test x$withval != yes) AC_MSG_RESULT(GMP will be compiled) @@ -365,6 +366,7 @@ esac ], [ AC_CHECK_LIB(gmp, __gmpz_init, build_gmp=false AM_CONDITIONAL(SILC_BUILD_GMP, test x$build_gmp = xtrue) + LIBS="$LIBS -L/usr/lib -L/usr/local/lib -lgmp" AC_MSG_RESULT(GMP will not be compiled), build_gmp=true AM_CONDITIONAL(SILC_BUILD_GMP, test x$build_gmp = xtrue) @@ -392,8 +394,14 @@ AC_CONFIG_SUBDIRS(lib/silcmath/gmp) AC_CONFIG_SUBDIRS(lib/trq) #AC_CONFIG_SUBDIRS(lib/zlib) +# Some final substitutions +SILC_TOP_SRCDIR=`pwd` +AC_SUBST(SILC_TOP_SRCDIR) +AC_SUBST(LIBS) + AC_OUTPUT( \ Makefile +Makefile.defines doc/Makefile includes/Makefile lib/Makefile @@ -408,3 +416,4 @@ lib/silcske/Makefile lib/silcutil/Makefile silc/Makefile silcd/Makefile) + diff --git a/lib/contrib/Makefile.am b/lib/contrib/Makefile.am index a910788c..64305b1b 100644 --- a/lib/contrib/Makefile.am +++ b/lib/contrib/Makefile.am @@ -27,6 +27,4 @@ libcontrib_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../../includes -I../silccore -I../silcutil \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines diff --git a/lib/contrib/regex.c b/lib/contrib/regex.c index 560639cc..e0d95f72 100644 --- a/lib/contrib/regex.c +++ b/lib/contrib/regex.c @@ -30,10 +30,15 @@ /* We need this for `regex.h', and perhaps for the Emacs include files. */ #include +#include +#include +#include -#ifdef HAVE_CONFIG_H -#include "config.h" +/* +ifdef HAVE_CONFIG_H +##include "config.h" #endif +*/ /* The `emacs' switch turns on certain matching commands that make sense only in Emacs. */ diff --git a/lib/silcclient/Makefile.am b/lib/silcclient/Makefile.am index ba49dbae..208c92de 100644 --- a/lib/silcclient/Makefile.am +++ b/lib/silcclient/Makefile.am @@ -33,7 +33,5 @@ libsilcclient_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccore -I../silccrypt -I../silcutil \ - -I../silcmath -I../silcske -I../silcsim \ - -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silccore/Makefile.am b/lib/silccore/Makefile.am index 73100fa8..3528b748 100644 --- a/lib/silccore/Makefile.am +++ b/lib/silccore/Makefile.am @@ -35,6 +35,5 @@ libsilccore_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../silcutil -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silccrypt/Makefile.am b/lib/silccrypt/Makefile.am index 3b71bc0e..8840a617 100644 --- a/lib/silccrypt/Makefile.am +++ b/lib/silccrypt/Makefile.am @@ -40,6 +40,5 @@ libsilccrypt_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccore -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../silcutil -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silcmath/Makefile.am b/lib/silcmath/Makefile.am index 89d3ff3c..711bf79a 100644 --- a/lib/silcmath/Makefile.am +++ b/lib/silcmath/Makefile.am @@ -33,6 +33,5 @@ libsilcmath_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silccore -I../silcske \ - -I../silcsim -I../.. -I../silcutil -I../../includes \ - -I./gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silcsim/Makefile.am b/lib/silcsim/Makefile.am index ef88be2b..4921e624 100644 --- a/lib/silcsim/Makefile.am +++ b/lib/silcsim/Makefile.am @@ -76,6 +76,5 @@ CLEANFILES = $(SIM_MODULES_DIR)/*.sim.so EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silccore -I../.. -I../silcutil -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silcske/Makefile.am b/lib/silcske/Makefile.am index c8338ad1..b47e0be1 100644 --- a/lib/silcske/Makefile.am +++ b/lib/silcske/Makefile.am @@ -27,6 +27,5 @@ libsilcske_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silccore -I../silcutil \ - -I../silcsim -I../silcmath -I../.. -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/lib/silcutil/Makefile.am b/lib/silcutil/Makefile.am index 4baec427..f1040de5 100644 --- a/lib/silcutil/Makefile.am +++ b/lib/silcutil/Makefile.am @@ -33,6 +33,5 @@ libsilcutil_a_SOURCES = \ EXTRA_DIST = *.h -INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \ - -I../silcsim -I../.. -I../silccore -I../../includes \ - -I../silcmath/gmp -I../trq +include $(top_srcdir)/Makefile.defines + diff --git a/prepare b/prepare index 444153ea..a2295ede 100755 --- a/prepare +++ b/prepare @@ -89,7 +89,7 @@ sed -e "/SILC_VERSION/s//$dist_version/" configure.in.pre >>configure.in2 sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in rm -f configure.in2 -touch Makefile.defines +cp Makefile.defines.in Makefile.defines aclocal autoconf -- 2.24.0