X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=configure.in.pre;h=671dac894b0f2fabe6e7c1f8ce2c30b203f3873e;hp=2ccf3a52d0af12163756d56826638008491e1b47;hb=382d15d447b7a95390decfa783836ae4fe255b3d;hpb=a7d2eba87572d27cb6570c52488e753a64d145aa diff --git a/configure.in.pre b/configure.in.pre index 2ccf3a52..671dac89 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -60,11 +60,54 @@ if test "$GCC"; then CFLAGS="-Wall -finline-functions $CFLAGS" fi +# +# Library versioning. +# +# Do the releases and library versioning according to following rules: +# +# - If any code has changed in library, increment [LIB]_REVISION +# - If functions were added, set [LIB]_REVISION to 0 +# - If functions were added, removed or changed, increment [LIB]_CURRENT +# - If functions were added, increment [LIB]_AGE +# - If functions were removed, set [LIB]_AGE to 0 +# +# where [LIB] is LIBSILC and LIBSILCCLIENT, and where "functions" means +# functions public interfaces. +# +# The LIB_BASE_VERSION defines the SILC software major.minor version and +# it is increment only when these version numbers actually change. +# + +# Base version for libraries. Do not change this unless SILC version +# changes too. +LIB_BASE_VERSION=1.0 + +# libsilc versions +LIBSILC_CURRENT=1 +LIBSILC_REVISION=0 +LIBSILC_AGE=1 + +# libsilcclient versions +LIBSILCCLIENT_CURRENT=1 +LIBSILCCLIENT_REVISION=1 +LIBSILCCLIENT_AGE=0 + +# Substitute the version numbers +AC_SUBST(LIB_BASE_VERSION) +AC_SUBST(LIBSILC_CURRENT) +AC_SUBST(LIBSILC_REVISION) +AC_SUBST(LIBSILC_AGE) +AC_SUBST(LIBSILCCLIENT_CURRENT) +AC_SUBST(LIBSILCCLIENT_REVISION) +AC_SUBST(LIBSILCCLIENT_AGE) + +# # Program checking # AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_MAKE_SET +AC_DISABLE_SHARED AC_PROG_LIBTOOL AC_PATH_PROG(sedpath, sed) @@ -132,20 +175,21 @@ sim_support=false AC_MSG_CHECKING(for SIM support) AC_MSG_RESULT() AC_CHECK_HEADERS(dlfcn.h, - AC_CHECK_LIB(dl, dlopen, - [ - AC_DEFINE(SILC_SIM) - sim_support=true - LIBS="$LIBS -ldl" - ], - [ - AC_CHECK_LIB(c, dlopen, - [ - AC_DEFINE(SILC_SIM) - sim_support=true - ]) - ]) - ) + [ + AC_CHECK_LIB(dl, dlopen, + [ + AC_DEFINE(SILC_SIM) + sim_support=true + LIBS="$LIBS -ldl" + ], + [ + AC_CHECK_LIB(c, dlopen, + [ + AC_DEFINE(SILC_SIM) + sim_support=true + ]) + ]) + ]) AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue) if test x$sim_support = xtrue; then @@ -386,23 +430,6 @@ AC_ARG_WITH(logsdir, AC_SUBST(LOGSDIR) AC_DEFINE_UNQUOTED(SILC_LOGSDIR, "$LOGSDIR") -# Manual directory -# -MANDIR="$silc_prefix/man" -AC_ARG_WITH(mandir, - [[ --with-mandir=DIR directory for SILC manual pages [PREFIX/man]]], - [ - case "$withval" in - no|yes) - ;; - *) - MANDIR="$withval" - ;; - esac - ]) -AC_SUBST(MANDIR) -AC_DEFINE_UNQUOTED(SILC_MANDIR, "$MANDIR") - # silcd config file checking # summary_silcd_configfile="/etc/silc/silcd.conf" @@ -622,13 +649,14 @@ AC_ARG_WITH(iconv, case "${withval}" in no) AC_MSG_RESULT(no) - - AC_CHECK_HEADERS(iconv.h, AC_CHECK_FUNC(iconv, has_iconv=true)) + AC_CHECK_HEADERS(iconv.h, + [ + AC_CHECK_FUNC(iconv, has_iconv=true) + ]) check_iconv=false ;; *) AC_MSG_RESULT(yes) - if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" CFLAGS="$CFLAGS -I$withval/include" @@ -636,16 +664,19 @@ AC_ARG_WITH(iconv, if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi + ;; esac ], [ AC_MSG_RESULT(no) - - AC_CHECK_HEADERS(iconv.h, AC_CHECK_FUNCS(iconv, - [ - has_iconv=true - check_iconv=false - ])) + AC_CHECK_HEADERS(iconv.h, + [ + AC_CHECK_FUNCS(iconv, + [ + has_iconv=true + check_iconv=false + ]) + ]) ]) if test x$check_iconv = xtrue; then @@ -966,6 +997,22 @@ AC_ARG_WITH(silcd, AC_MSG_RESULT(yes) ]) +libtoolfix=true +AC_MSG_CHECKING(whether to do libtoolfix) +AC_ARG_WITH(libtoolfix, + [ --without-libtoolfix Do not fix libtool, for package builders], + [ + AC_MSG_RESULT(no) + libtoolfix=false + ], + [ + AC_MSG_RESULT(yes) + ]) + +AC_SUBST(ETCDIR) +AC_DEFINE_UNQUOTED(SILC_ETCDIR, "$ETCDIR") + + ## ## Misc @@ -995,6 +1042,18 @@ INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int" AC_SUBST(INCLUDE_DEFINES_INT) AC_SUBST(SILC_DIST_SUBDIRS) +# +# Fix the libtool to support run-time configuration. This allows us +# to in run-time specify when to compile shared/static libraries without +# need to reconfigure the entire libtool. +# +if test x$libtoolfix = xtrue; then + ./libtoolfix $SILC_TOP_SRCDIR/ltmain.sh +fi +AM_CONDITIONAL(SILC_LIBTOOLFIX, test x$libtoolfix = xtrue) + + +# # Makefile outputs # AC_CONFIG_FILES( @@ -1006,7 +1065,9 @@ includes/Makefile lib/Makefile lib/contrib/Makefile lib/silccore/Makefile +lib/silccore/tests/Makefile lib/silccrypt/Makefile +lib/silccrypt/tests/Makefile lib/silcmath/Makefile lib/silcmath/mpi/Makefile.defines lib/silcmath/mpi/Makefile.defines_int @@ -1064,6 +1125,7 @@ AC_OUTPUT s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir` s_sbindir=`eval echo $sbindir`;s_sbindir=`eval echo $s_sbindir` +s_mandir=`eval echo $mandir`;s_mandir=`eval echo $s_mandir` s_includedir=`eval echo $includedir`;s_includedir=`eval echo $s_includedir` echo "" @@ -1079,7 +1141,7 @@ echo "" echo " Installation prefix ...........: $prefix" echo " bin directory .................: $s_bindir" echo " sbin directory ................: $s_sbindir" -echo " man directory .................: $MANDIR" +echo " man directory .................: $s_mandir" echo " help directory ................: $HELPDIR" echo " doc directory .................: $DOCDIR" echo " logs directory ................: $LOGSDIR" @@ -1100,7 +1162,7 @@ if test "x$silc_dist" = "xsilc-server" || test "x$silc_dist" = "xsilc-toolkit"; then silcd="yes" if test x$without_silcd = xtrue; then - without_silcd="no" + silcd="no" fi echo " Compile SILC Server ...........: $silcd" echo " Server configuration file .....: $summary_silcd_configfile" @@ -1114,7 +1176,7 @@ else fi echo " SIM support ...................: $sim_support" echo " IPv6 support ..................: $summary_ipv6" -echo " Assmebler optimizations .......: $summary_asm" +echo " Assembler optimizations .......: $summary_asm" mp="MPI" if test x$mp_gmp = xtrue; then