From c03b85b37b9e0a6d52f5276544937a3092aa861b Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 23 Apr 2005 16:32:20 +0000 Subject: [PATCH] Merged silc_1_0_branch to trunk. cvs -z3 update -j silc_trunk_merged_silc_1_0_branch_4 -j silc_1_0_branch --- Makefile.ad | 2 +- configure.ad | 130 +++++++++++++++-------------------------------- distdir/autodist | 6 ++- 3 files changed, 48 insertions(+), 90 deletions(-) diff --git a/Makefile.ad b/Makefile.ad index 1ffcbca..e76466d 100644 --- a/Makefile.ad +++ b/Makefile.ad @@ -137,7 +137,7 @@ toolkit-install: -mkdir -p $(docdir)/toolkit/ -$(INSTALL_DATA) $(srcdir)/doc/toolkit/* $(docdir)/toolkit -$(INSTALL_DATA) $(srcdir)/lib/doc/*.gif $(docdir)/toolkit - -cp -R $(srcdir)/tutorial $(prefix) + -cp -R $(srcdir)/tutorial $(docdir) #endif SILC_DIST_TOOLKIT install-data-hook: \ diff --git a/configure.ad b/configure.ad index 410d19f..b7affd6 100644 --- a/configure.ad +++ b/configure.ad @@ -25,6 +25,7 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S +AC_PROG_EGREP AC_SUBST(LN_S) AC_PATH_PROG(sedpath, sed) @@ -43,7 +44,9 @@ case "$target" in ;; esac -CFLAGS= +# Control compiler optimizations +CFLAGS=`echo $CFLAGS | sed 's/-O[ 0123456789s]*//g'` + AC_PROG_CC AC_C_INLINE AC_C_CONST @@ -287,6 +290,7 @@ if test "$GCC"; then SILC_ADD_CFLAGS(-g -O2) fi SILC_ADD_CFLAGS(-Wall -finline-functions) + SILC_ADD_CFLAGS(-Wno-pointer-sign) else # Other compilers case "$target" in @@ -426,57 +430,6 @@ AC_SUBST(MODULESDIR) AC_DEFINE_UNQUOTED([SILC_MODULESDIR], "$MODULESDIR", [SILC_MODULESDIR]) #endif SILC_DIST_SIM -#ifdef SILC_DIST_SERVER -# Logs directory -# -LOGSDIR="$silc_prefix/logs" -AC_ARG_WITH(logsdir, - [[ --with-logsdir=DIR directory for SILC Server logs [PREFIX/logs]]], - [ - case "$withval" in - no|yes) - ;; - *) - LOGSDIR="$withval" - ;; - esac - ]) -AC_SUBST(LOGSDIR) -AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR]) - -# silcd config file checking -# -summary_silcd_configfile="/etc/silc/silcd.conf" -AC_ARG_WITH(silcd-config-file, - [[ --with-silcd-config-file=FILE use FILE as default configuration file - for SILC Server [/etc/silc/silcd.conf]]], - AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE]) - summary_silcd_configfile="$withval" - ) - -# silcd pid file checking -# -if test "x$localstatedir" != 'x${prefix}/var'; then - PIDFILE="$localstatedir/silcd.pid" -else - PIDFILE="$silc_prefix/var/silcd.pid" -fi - -AC_ARG_WITH(silcd-pid-file, - [[ --with-silcd-pid-file=FILE use FILE as default pid file for SILC - Server [/var/run/silcd.pid]]], - [ - case "$withval" in - no|yes) - ;; - *) - PIDFILE="$withval" - ;; - esac - ]) -AC_SUBST(PIDFILE) -#endif SILC_DIST_SERVER - #ifdef SILC_DIST_COMPILER ## ## With/without checkings @@ -487,7 +440,6 @@ AC_SUBST(PIDFILE) compile_libs=true #ifndef SILC_DIST_TOOLKIT - AC_ARG_WITH(silc-includes, [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]], [ac_silc_includes="$withval"], [ac_silc_includes="no"]) @@ -495,25 +447,44 @@ AC_ARG_WITH(silc-libs, [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]], [ac_silc_libs="$withval"], [ac_silc_libs="no"]) -# -# XXX missing checking the __SILC_WITH_XXX defines from the provided libs -# in order to determine correct libs to link. +if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then -# -# XXX missing pkg-config check. + # Manually provided libs + if test "$ac_silc_includes" != "no"; then + compile_libs=false + SILC_LIB_INCLUDES="-I$ac_silc_includes" + fi + if test "$ac_silc_libs" != "no"; then + compile_libs=false + LIBS="$LIBS -L$ac_silc_libs" + fi -if test "$ac_silc_includes" != "no"; then - compile_libs=false - SILC_LIB_INCLUDES="-I$ac_silc_includes" -fi -if test "$ac_silc_libs" != "no"; then - compile_libs=false - LIBS="$LIBS -L$ac_silc_libs" -fi + # Check libs to link against + f=`$EGREP __SILC_HAVE_PTHREAD $ac_silc_includes/silcincludes.h` + if test -n "$f"; then + LIBS="$LIBS -lpthread" + check_threads=false + has_threads=true + fi + f=`$EGREP __SILC_HAVE_SIM $ac_silc_includes/silcincludes.h` + if test -n "$f"; then + LIBS="$LIBS -ldl" + fi +else + # pkg-config check + PKG_CHECK_MODULES(SILC, silc, compile_libs=false, compile_libs=true) + PKG_CHECK_MODULES(SILCCLIENT, silcclient, compile_libs=false, compile_libs=true) + + if test x$compile_libs = xfalse; then + LIBS="$LIBS $SILC_LIBS" + CFLAGS="$CFLAGS $SILC_CFLAGS" + LIBS="$LIBS $SILCCLIENT_LIBS" + CFLAGS="$CFLAGS $SILCCLIENT_CFLAGS" + fi +fi #endif SILC_DIST_TOOLKIT - # SOCKS4 support checking # SAVE_LIBS="$LIBS" @@ -865,7 +836,6 @@ fi # POSIX threads support # -has_threads=false AC_MSG_CHECKING(whether to search for POSIX threads) AC_ARG_WITH(pthreads, [[ --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib]]], @@ -889,6 +859,7 @@ AC_ARG_WITH(pthreads, ]) if test x$check_threads = xtrue; then + has_threads=false SAVE_LIBS="$LIBS" SAVE_CFLAGS="$CFLAGS" SAVE_LDFLAGS="$LDFLAGS" @@ -1019,7 +990,6 @@ AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue) AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue) #ifdef SILC_DIST_TOOLKIT - # --without-irssi # without_irssi=false @@ -1047,7 +1017,6 @@ AC_ARG_WITH(silcd, [ AC_MSG_RESULT(yes) ]) - #endif SILC_DIST_TOOLKIT #ifdef SILC_DIST_CLIENT @@ -1080,6 +1049,9 @@ AC_DEFINE_UNQUOTED([SILC_ETCDIR], "$ETCDIR", [SILC_ETCDIR]) ## Misc ## +# Make enable-shared aware +AM_CONDITIONAL(SILC_ENABLE_SHARED, test "$enable_shared" = yes) + # Other configure scripts # @@ -1158,19 +1130,6 @@ irssi/Makefile.defines_int fi #endif SILC_DIST_TOOLKIT -#ifdef SILC_DIST_TOOLKIT -if test x$without_silcd = xfalse ; then -#endif SILC_DIST_TOOLKIT -#ifdef SILC_DIST_SERVER - AC_CONFIG_FILES( -silcd/Makefile -doc/example_silcd.conf -) -#endif SILC_DIST_SERVER -#ifdef SILC_DIST_TOOLKIT -fi -#endif SILC_DIST_TOOLKIT - #ifdef SILC_DIST_TOOLKIT AC_CONFIG_FILES( silc/Makefile @@ -1197,7 +1156,6 @@ echo "---------------------------" echo " Target host ...................: $target" echo " Compiler ......................: $CC" echo " CFLAGS ........................: $CFLAGS" -echo " CPPFLAGS ......................: $CPPFLAGS" echo " LDFLAGS .......................: $LDFLAGS" echo " LIBS ..........................: $LIBS" echo "" @@ -1221,10 +1179,6 @@ echo " include directory .............: $s_includedir" #endif SILC_DIST_INCLUDES echo "" -#ifdef SILC_DIST_SERVER -silcd="yes" -#endif SILC_DIST_SERVER - #ifdef SILC_DIST_TOOLKIT if test x$without_irssi = xtrue; then irssi="no" diff --git a/distdir/autodist b/distdir/autodist index 15dd9d2..450a4a0 100644 --- a/distdir/autodist +++ b/distdir/autodist @@ -12,8 +12,12 @@ include apps/autodist/INSTALL INSTALL include apps/autodist/AUTHORS AUTHORS include apps/autodist/README README include apps/autodist/TODO TODO +include apps/autodist/CHANGES CHANGES exclude apps/autodist/INSTALL apps/autodist/AUTHORS apps/autodist/README +exclude apps/autodist/TODO apps/autodist/CHANGES exclude README.* ltmain.sh -noprocess apps/autodist/doc apps/autodist/tests +noprocess apps/autodist/doc/* apps/autodist/tests/* +post-process-dist-hook distdir/post-process-dist +post-dist-hook distdir/post-dist -- 2.24.0