updates.
[silc.git] / configure.in.pre
index 082b165b24a1387d0710289be5115149d22e519f..73dfd0d51009e50360a227cb4c925e3d3deb1039 100644 (file)
@@ -33,8 +33,8 @@ case "$target" in
     ;;
 esac
 
-# ./prepare script will automatically put the correct date. Do not edit!
-AM_INIT_AUTOMAKE(silc, YYYYMMDD)
+# ./prepare script will automatically put the correct version. Do not edit!
+AM_INIT_AUTOMAKE(silc, SILC_VERSION)
 AC_PREREQ(2.3)
 AM_CONFIG_HEADER(includes/silcdefs.h)
 
@@ -94,12 +94,23 @@ AC_CHECK_SIZEOF(void *, 0)
 AC_DEFINE_UNQUOTED(SILC_SIZEOF_VOID_P, $ac_cv_sizeof_void_p)
 
 # Function and library checking
-AC_CHECK_FUNCS(initscr)
-AC_CHECK_LIB(ncurses, initscr, LIBS="$LIBS -lncurses")
-AC_CHECK_FUNCS(gethostbyname)
-AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl -lresolv")
-AC_CHECK_FUNCS(socket)
-AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
+AC_CHECK_FUNC(initscr, ac_initscr_found=1, ac_initscr_found=0)
+if test x$ac_initscr_found = x0; then
+    AC_CHECK_LIB(ncurses, initscr, LIBS="$LIBS -lncurses")
+fi
+AC_CHECK_FUNC(gethostbyname, ac_gethostbyname_found=1,
+ac_gethostbyname_found=0)
+if test x$ac_gethostbyname_found = x0; then
+    AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
+    AC_CHECK_FUNC(res_gethostbyname, ac_res_ghbn_found=1, ac_res_ghbn_found=0)
+    if test x$ac_res_ghbn_found = x0; then
+        AC_CHECK_LIB(resolv, res_gethostbyname,  LIBS="$LIBS -lresolv")
+    fi
+fi
+AC_CHECK_FUNC(socket, ac_socket_found=1, ac_socket_found=0)
+if test x$ac_socket_found = x0; then
+    AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
+fi
 AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport)
 AC_CHECK_FUNCS(select listen bind shutdown close connect)
 AC_CHECK_FUNCS(fcntl setsockopt)
@@ -126,7 +137,7 @@ AC_CHECK_HEADERS(dlfcn.h,
 #
 
 # Default installation destination
-AC_PREFIX_DEFAULT(/usr/local/silc/)
+AC_PREFIX_DEFAULT(/usr/local/silc)
 
 # etc directory
 ETCDIR="/etc/silc"
@@ -192,6 +203,22 @@ AC_ARG_WITH(simdir,
 )
 AC_SUBST(MODULESDIR)
 
+# Logs directory
+LOGSDIR="logs"
+AC_ARG_WITH(logsdir,
+[  --with-logsdir[=PATH]   Directory for Server logs [PREFIX/logs]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    LOGSDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(LOGSDIR)
+
 # Debug checking
 AC_MSG_CHECKING(for enabled debugging)
 AC_ARG_ENABLE(debug,
@@ -212,7 +239,7 @@ esac ], CFLAGS="-O2 -g $CFLAGS"
 # SOCKS4 support checking
 AC_MSG_CHECKING(whether to support SOCKS4)
 AC_ARG_WITH(socks4,
-[  --with-socks4[=PATH]    Compile with SOCKS4 support.],
+[  --with-socks4[=PATH]    Compile with SOCKS4 support],
 [ case "$withval" in
   no)
     AC_MSG_RESULT(no)
@@ -246,7 +273,7 @@ AC_ARG_WITH(socks4,
 # SOCKS5 support checking
 AC_MSG_CHECKING(whether to support SOCKS5)
 AC_ARG_WITH(socks5,
-[  --with-socks5[=PATH]    Compile with SOCKS5 support.],
+[  --with-socks5[=PATH]    Compile with SOCKS5 support],
 [ case "$withval" in
   no)
     AC_MSG_RESULT(no)
@@ -348,7 +375,7 @@ esac ], [
 AC_ARG_WITH(silcd-config-file,
 [  --with-silcd-config-file[=PATH]
                           Use PATH as default configuration file in SILC
-                          server.],
+                          server [/etc/silc/silcd.conf]],
 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
 
 # XXX