]> git.lyx.org Git - lyx.git/blobdiff - configure.ac
cleanup some debug messages
[lyx.git] / configure.ac
index 807c5b75cbfd56408d587fad1b4ee3a9bc660944..fa1ed87bb9697d263605524cdeb3e108554d6252 100644 (file)
@@ -1,19 +1,15 @@
 dnl Process with autoconf to generate configure script   -*- sh -*-
 
-AC_INIT(lyx,1.4.0cvs,lyx-devel@lists.lyx.org)
+AC_INIT(LyX,1.4.0cvs,[lyx-devel@lists.lyx.org],[lyx])
 AC_PREREQ(2.52)
 AC_CONFIG_SRCDIR(src/main.C)
-AM_CONFIG_HEADER([src/config.h])
+AC_CONFIG_HEADERS([src/config.h])
 
 AC_CONFIG_AUX_DIR(config)
 
-# first the version
-VERSION="1.4.0cvs"
+# First check the version
 LYX_CHECK_VERSION
 AC_CANONICAL_TARGET
-# Check how the files should be packaged
-LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
 
 dnl default maintainer mode to true for development versions
 if test "${enable_maintainer_mode+set}" != set; then
@@ -21,7 +17,14 @@ if test "${enable_maintainer_mode+set}" != set; then
 fi
 AM_MAINTAINER_MODE
 
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar no-define 1.9])
+
+# Check how the files should be packaged
+LYX_USE_PACKAGING
+LYX_VERSION_SUFFIX
+# We need to define these variables here and the no-define option of
+# AM_INIT_AUTOMAKE above because LYX_VERSION_SUFFIX alters $PACKAGE.
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
 ### Set the execute permissions of the various scripts correctly
 for file in config/install-sh config/mkinstalldirs lib/configure ; do
@@ -289,7 +292,17 @@ LYX_CHECK_SPELL_ENGINES
 
 lyx_client_subdir=true
 AC_LANG_PUSH(C)
-AC_CHECK_FUNCS(fcntl,, [lyx_client_subdir=false])
+dnl LIBS already contains some X extra libs that may interfere.
+save_LIBS="$LIBS"
+LIBS=
+AC_CHECK_FUNCS(fcntl,
+  [AC_SEARCH_LIBS([gethostbyname], [nsl])
+   AC_SEARCH_LIBS([socket], [socket], [], 
+     [AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
+                [], [-lnsl])])], 
+  [lyx_client_subdir=false])
+AC_SUBST(SOCKET_LIBS,$LIBS)
+LIBS="$save_LIBS"
 AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir)
 AC_LANG_POP(C)