From 6a273c8ff6332b4b53a315acfcc65b938ea4d782 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 13 Nov 2013 21:55:22 +0100 Subject: Merge build system fixes from LibRCC --- .bzrignore | 3 +++ configure.ac | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 48 ------------------------------------------------ 3 files changed, 59 insertions(+), 48 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in diff --git a/.bzrignore b/.bzrignore index ebe7c50..943a50a 100644 --- a/.bzrignore +++ b/.bzrignore @@ -28,3 +28,6 @@ CMakeFiles CMakeCache.txt cmake_install.cmake librcd.pc +ar-lib +m4 +compile diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c59f0e7 --- /dev/null +++ b/configure.ac @@ -0,0 +1,56 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(librcc, m4_esyscmd([head -n 1 VERSION | sed -e s/CVS.*$// | tr -d \\n])) +AC_CONFIG_SRCDIR([src/librcd.c]) +AC_CONFIG_HEADERS(config.h) +AM_INIT_AUTOMAKE() +AC_CONFIG_MACRO_DIR([m4]) + +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + +PACKAGE=librcd +LIBRCD_VERSION_MAJOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 1 | sed -e s/^$/0/` +LIBRCD_VERSION_MINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 2 | sed -e s/^$/0/` +LIBRCD_VERSION_SUBMINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 3 | sed -e s/^$/0/` +LIBRCD_VERSION=$LIBRCD_VERSION_MAJOR.$LIBRCD_VERSION_MINOR.$LIBRCD_VERSION_SUBMINOR +VERSION=$LIBRCD_VERSION +LIBRCD_VERSION_INFO=`echo $LIBRCD_VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'` + +AC_SUBST(LIBRCD_VERSION) +AC_SUBST(LIBRCD_VERSION_MAJOR) +AC_SUBST(LIBRCD_VERSION_MINOR) +AC_SUBST(LIBRCD_VERSION_SUBMINOR) +AC_SUBST(LIBRCD_VERSION_INFO) + +AC_ARG_ENABLE( latin, + [ --disable-latin disable detection of ISO-8859-1],, + disable_latin="yes") + +if test "x$disable_latin" = "xyes"; then + AC_DEFINE(DETECT_LATIN,1,[Defines if ISO-8859-1 detection is enabled]) +fi + +AC_PROG_CC +AC_PROG_INSTALL +AM_PROG_LIBTOOL + +AC_PATH_PROG(RM, rm, /bin/rm) +AC_PATH_PROG(MV, mv, /bin/mv) +AC_PATH_PROG(TAR, tar, /bin/tar) + +dnl Fixing ugly libtool, see for details +dnl http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523750 +RM="$RM -f" + + +dnl Checks for programs. + +dnl Checks for libraries. + +dnl Checks for header files. + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Checks for library functions. + +AC_OUTPUT(src/Makefile examples/Makefile statgen/Makefile Makefile librcd.spec librcd.pc) diff --git a/configure.in b/configure.in deleted file mode 100644 index 9e51720..0000000 --- a/configure.in +++ /dev/null @@ -1,48 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/librcd.c) -AC_CONFIG_HEADERS(config.h) - -PACKAGE=librcd -LIBRCD_VERSION_MAJOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 1 | sed -e s/^$/0/` -LIBRCD_VERSION_MINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 2 | sed -e s/^$/0/` -LIBRCD_VERSION_SUBMINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 3 | sed -e s/^$/0/` -LIBRCD_VERSION=$LIBRCD_VERSION_MAJOR.$LIBRCD_VERSION_MINOR.$LIBRCD_VERSION_SUBMINOR -VERSION=$LIBRCD_VERSION -LIBRCD_VERSION_INFO=`echo $LIBRCD_VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'` - -AC_SUBST(LIBRCD_VERSION) -AC_SUBST(LIBRCD_VERSION_MAJOR) -AC_SUBST(LIBRCD_VERSION_MINOR) -AC_SUBST(LIBRCD_VERSION_SUBMINOR) -AC_SUBST(LIBRCD_VERSION_INFO) - -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) - -AC_ARG_ENABLE( latin, - [ --disable-latin disable detection of ISO-8859-1],, - disable_latin="yes") - -if test "x$disable_latin" = "xyes"; then - AC_DEFINE(DETECT_LATIN,1,[Defines if ISO-8859-1 detection is enabled]) -fi - -AC_PROG_CC -AC_PROG_INSTALL -AM_PROG_LIBTOOL - -AC_PATH_PROG(RM, rm, /bin/rm) -AC_PATH_PROG(MV, mv, /bin/mv) -AC_PATH_PROG(TAR, tar, /bin/tar) - -dnl Checks for programs. - -dnl Checks for libraries. - -dnl Checks for header files. - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -dnl Checks for library functions. - -AC_OUTPUT(src/Makefile examples/Makefile statgen/Makefile Makefile librcd.spec librcd.pc) -- cgit v1.2.3