summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-15 21:38:02 +0200
committerAaron Griffin <aaron@archlinux.org>2006-10-15 21:38:02 +0200
commit94810222866b7cc36bf442993826f9b38dbe9c41 (patch)
tree325266e9e88208d481ce58b866e7002af4d279c0 /configure.ac
parent3f27542156125118800235c5ac1bac125fd7752c (diff)
downloadpacman-94810222866b7cc36bf442993826f9b38dbe9c41.tar.gz
pacman-94810222866b7cc36bf442993826f9b38dbe9c41.tar.xz
Final frugalware changes commit
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac350
1 files changed, 273 insertions, 77 deletions
diff --git a/configure.ac b/configure.ac
index f2e49f69..0976ad0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,8 @@
ENV_CFLAGS=$CFLAGS
AC_PREREQ(2.59)
-AC_INIT([Pacman package manager], 2.9.9, [pacman-dev@archlinux.org], pacman)
+dnl Update it right before the release since $pkgver_foo are all _post_ release snapshots
+AC_INIT([Pacman package manager], 3.4.0, [pacman-dev@archlinux.org], pacman)
AC_LANG(C)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
@@ -20,6 +21,7 @@ dnl Define here the libalpm version number
PM_MAJOR_VERSION=0
PM_MINOR_VERSION=1
PM_MICRO_VERSION=0
+PM_MICRO_VERSION_SUFFIX=.0
PM_VERSION=$PM_MAJOR_VERSION.$PM_MINOR_VERSION.$PM_MICRO_VERSION$PM_MICRO_VERSION_SUFFIX
dnl Needed for libtool to create proper shared lib version
PM_VERSION_INFO=`expr $PM_MAJOR_VERSION + $PM_MINOR_VERSION`:$PM_MICRO_VERSION:$PM_MINOR_VERSION
@@ -30,40 +32,125 @@ AC_SUBST(PM_MICRO_VERSION)
AC_SUBST(PM_VERSION)
AC_SUBST(PM_VERSION_INFO)
+dnl Define the default config file path for pacman.conf
+PACCONF=/etc/pacman.conf
+AC_DEFINE_UNQUOTED([PACCONF], ["$PACCONF"], [pacman.conf location])
+
dnl Put out version numbers to config.h
AC_DEFINE_UNQUOTED([PM_VERSION], ["$PM_VERSION"], [libalpm version number])
+dnl Configuration files
+AC_CONFIG_FILES([etc/makepkg.conf] [etc/pacman.conf])
+
AC_PROG_CC
AC_HEADER_STDC
AC_PROG_INSTALL
AC_CHECK_FUNCS([strverscmp])
AM_PROG_LIBTOOL
+dnl Humor lowers blood pressure
+AC_MSG_CHECKING(your blood pressure)
+AC_MSG_RESULT([a bit high, but we can proceed])
+
dnl Help line for man2html
AC_ARG_ENABLE(man2html,
AC_HELP_STRING([--enable-man2html], [Build html docs via man2html]),
[wantman2html=$enableval], [wantman2html=no])
-dnl Help line for more-warnings
-AC_ARG_ENABLE(more-warnings,
- AC_HELP_STRING([--disable-more-warnings], [Minimum compiler warnings]),
- [set_more_warnings="${enableval}"], [warnings_default=yes])
+dnl Help line for po4a
+AC_ARG_ENABLE(po4a,
+ AC_HELP_STRING([--disable-po4a], [Build localized manpages via po4a]),
+ [wantpo4a=$enableval], [wantpo4a=yes])
+
+dnl Help line for doxygen
+AC_ARG_ENABLE(doxygen,
+ AC_HELP_STRING([--disable-doxygen], [Build API docs via Doxygen]),
+ [wantdoxygen=$enableval], [wantdoxygen=yes])
+
+dnl Help line for python
+AC_ARG_ENABLE(python,
+ AC_HELP_STRING([--disable-python], [Build Python bindings]),
+ [wantpython=$enableval], [wantpython=yes])
+
+dnl Help line for perl
+AC_ARG_ENABLE(perl,
+ AC_HELP_STRING([--disable-perl], [Build Perl bindings]),
+ [wantperl=$enableval], [wantperl=yes])
+
+dnl Help line for java
+AC_ARG_ENABLE(java,
+ AC_HELP_STRING([--disable-java], [Build Java bindings]),
+ [wantjava=$enableval], [wantjava=yes])
+
+dnl Check for architecture
+case "$host" in
+ i686-*) AC_DEFINE_UNQUOTED([CARCH], ["i686"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["i686"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["march"], [Architecture])
+ CARCH="i686"
+ CARCHFLAGS="i686"
+ MARCHFLAG="march"
+ CHOST="${host}"
+ ;;
+ x86_64-*) AC_DEFINE_UNQUOTED([CARCH], ["x86_64"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["k8"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["march"], [Architecture])
+ CARCH="x86_64"
+ CARCHFLAGS="k8"
+ MARCHFLAG="march"
+ CHOST="${host}"
+ ;;
+ ia64-*) AC_DEFINE_UNQUOTED([CARCH], ["ia64"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["ia64"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["march"], [Architecture])
+ CARCH="ia64"
+ CARCHFLAGS="ia64"
+ MARCHFLAG="march"
+ CHOST="${host}"
+ ;;
+ sparc-*) AC_DEFINE_UNQUOTED([CARCH], ["sparc"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["v9"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["mcpu"], [Architecture])
+ CARCH="sparc"
+ CARCHFLAGS="v9"
+ MARCHFLAG="mcpu"
+ CHOST="${host}"
+ ;;
+ ppc-* | powerpc-*)
+ AC_DEFINE_UNQUOTED([CARCH], ["ppc"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["750"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["mcpu"], [Architecture])
+ CARCH="ppc"
+ CARCHFLAGS="750"
+ MARCHFLAG="mcpu"
+ CHOST="${host}"
+ ;;
+ i386-*) AC_DEFINE_UNQUOTED([CARCH], ["i386"], [Architecture])
+ AC_DEFINE_UNQUOTED([CARCHFLAGS], ["i386"], [Architecture])
+ AC_DEFINE_UNQUOTED([MARCHFLAG], ["march"], [Architecture])
+ CARCH="i386"
+ CARCHFLAGS="i386"
+ MARCHFLAG="march"
+ CHOST="${host}"
+ ;;
+ *)
+ AC_MSG_ERROR([Your architecture is not supported])
+ ;;
+esac
+
+AC_SUBST(CARCH)
+AC_SUBST(CARCHFLAGS)
+AC_SUBST(MARCHFLAG)
+AC_SUBST(CHOST)
dnl Help line for debug
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--disable-debug], [Disable debugging support]),
- [debug=$enableval], [debug=yes])
+AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging support], debug=yes)
dnl Help line for fakeroot
AC_ARG_ENABLE(fakeroot,
- AC_HELP_STRING([--disable-fakeoot], [Disable fakeroot proof support]),
+ AC_HELP_STRING([--disable-fakeroot], [Disable fakeroot proof support]),
[fakeroot=$enableval], [fakeroot=yes])
-dnl Help line for doxygen
-AC_ARG_ENABLE(doxygen,
- AC_HELP_STRING([--disable-doxygen], [Build API docs via Doxygen]),
- [wantdoxygen=$enableval], [wantdoxygen=yes])
-
dnl Check for man2html binary
AC_MSG_CHECKING(for support man2html)
if test x$wantman2html = xyes ; then
@@ -82,6 +169,69 @@ else
AC_MSG_RESULT(not requested by configure)
fi
+dnl Check for po4a binary
+AC_MSG_CHECKING(for support po4a)
+if test x$wantpo4a = xyes ; then
+ AC_CHECK_PROGS([PO4A], [po4a] [po4a binary])
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ if test $PO4A ; then
+ AC_DEFINE([HAS_PO4A], [TRUE], [Enabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(yes)
+ POSTATUS="yes, path: `which $PO4A`"
+ else
+ AC_DEFINE([HAS_PO4A], [FALSE], [Disabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(no, po4a binary missing)
+ POSTATUS="no, missing po4a binary"
+ fi
+else
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ AC_DEFINE([HAS_PO4A], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ POSTATUS="no, disabled by configure"
+fi
+
+dnl Check for po4a binary
+AC_MSG_CHECKING(for support po4a)
+if test x$wantpo4a = xyes ; then
+ AC_CHECK_PROGS([PO4A], [po4a] [po4a binary])
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ if test $PO4A ; then
+ AC_DEFINE([HAS_PO4A], [TRUE], [Enabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(yes)
+ POSTATUS="yes, path: `which $PO4A`"
+ else
+ AC_DEFINE([HAS_PO4A], [FALSE], [Disabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(no, po4a binary missing)
+ POSTATUS="no, missing po4a binary"
+ fi
+else
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ AC_DEFINE([HAS_PO4A], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ POSTATUS="no, disabled by configure"
+fi
+
+dnl Check for po4a binary
+AC_MSG_CHECKING(for support po4a)
+if test x$wantpo4a = xyes ; then
+ AC_CHECK_PROGS([PO4A], [po4a] [po4a binary])
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ if test $PO4A ; then
+ AC_DEFINE([HAS_PO4A], [TRUE], [Enabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(yes)
+ POSTATUS="yes, path: `which $PO4A`"
+ else
+ AC_DEFINE([HAS_PO4A], [FALSE], [Disabled PO4A (localization support for manpages)])
+ AC_MSG_RESULT(no, po4a binary missing)
+ POSTATUS="no, missing po4a binary"
+ fi
+else
+ AM_CONDITIONAL(HAS_PO4A, test $PO4A)
+ AC_DEFINE([HAS_PO4A], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ POSTATUS="no, disabled by configure"
+fi
+
dnl Check for doxygen support
AC_MSG_CHECKING(for support Doxygen)
if test x$wantdoxygen = xyes ; then
@@ -100,65 +250,70 @@ else
AM_CONDITIONAL(HAS_DOXYGEN, test $DOXYGEN)
AC_DEFINE([HAS_DOXYGEN], [FALSE], [Not specified at configure line])
AC_MSG_RESULT(not requested by configure)
- DOXYSTATUS="disabled by configure"
-fi
-
-dnl Enable or disable Warning FLAGS during compile
-AC_MSG_CHECKING(for more compiler warnings)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- CFLAGS="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
- -Wnested-externs -Wsign-compare"
- for option in -Wno-sign-compare; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
- unset CFLAGS
+ DOXYSTATUS="no, disabled by configure"
fi
-dnl Enable or disable debug code (-g)
-AC_MSG_CHECKING(for debug mode request)
-if test x$debug = xyes ; then
- AC_DEFINE([PACMAN_DEBUG], [TRUE], [Enable debugging support])
- AM_CONDITIONAL(PACMAN_DEBUG, test x$debug = xyes)
- CFLAGS="$CFLAGS -g"
- AC_MSG_RESULT(yes)
-else
- AC_DEFINE([PACMAN_DEBUG], [FALSE], [Disable debugging support])
- if test -z "$ENV_CFLAGS"; then
- ENV_CFLAGS="-O2"
+dnl Check for python support
+AC_MSG_CHECKING(if Python bindings should be generated)
+if test x$wantpython = xyes ; then
+ AC_CHECK_PROGS([SWIG], [swig] [swig binary])
+ AM_CONDITIONAL(HAS_PYTHON, test $SWIG)
+ if test $SWIG ; then
+ AC_DEFINE([HAS_PYTHON], [TRUE], [Enabled Python Support])
+ AC_MSG_RESULT(yes)
+ PYTHONSTATUS="yes, path: `which $SWIG`"
+ else
+ AC_DEFINE([HAS_PYTHON], [FALSE], [Disabled Python support])
+ AC_MSG_RESULT(no, swig missing)
+ PYTHONSTATUS="swig binary not found"
fi
- AC_MSG_RESULT(no)
+else
+ AM_CONDITIONAL(HAS_PYTHON, test $PYTHON)
+ AC_DEFINE([HAS_PYTHON], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ PYTHONSTATUS="no, disabled by configure"
fi
-dnl Enable or disable fakeroot code
-AC_MSG_CHECKING(for fakeroot proof support)
-if test x$fakeroot = xyes ; then
+dnl Check for perl support
+AC_MSG_CHECKING(if Perl bindings should be generated)
+if test x$wantperl = xyes ; then
+ AC_CHECK_PROGS([SWIG], [swig] [swig binary])
+ AM_CONDITIONAL(HAS_PERL, test $SWIG)
+ if test $SWIG ; then
+ AC_DEFINE([HAS_PERL], [TRUE], [Enabled Perl Support])
AC_MSG_RESULT(yes)
+ PERLSTATUS="yes, path: `which $SWIG`"
+ else
+ AC_DEFINE([HAS_PERL], [FALSE], [Disabled Perl support])
+ AC_MSG_RESULT(no, swig missing)
+ PERLSTATUS="swig binary not found"
+ fi
else
- CFLAGS="$CFLAGS -DFAKEROOT"
- AC_MSG_RESULT(no)
+ AM_CONDITIONAL(HAS_PERL, test $PERL)
+ AC_DEFINE([HAS_PERL], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ PERLSTATUS="no, disabled by configure"
fi
-dnl Check for zlib
-AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
-if test -n "$LIBZ"; then
- LDFLAGS="$LDFLAGS $LIBZ"
+dnl Check for java support
+AC_MSG_CHECKING(if Java bindings should be generated)
+if test x$wantjava = xyes ; then
+ AC_CHECK_PROGS([JAVAC], [javac] [java compiler])
+ AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
+ if test $JAVAC ; then
+ AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support])
+ AC_MSG_RESULT(yes)
+ JAVASTATUS="yes, path: `which $JAVAC`"
+ else
+ AC_DEFINE([HAS_JAVA], [FALSE], [Disabled Java support])
+ AC_MSG_RESULT(no, javac missing)
+ JAVASTATUS="java compiler not found"
+ fi
else
- AC_MSG_ERROR("missing zlib headers/libraries");
+ AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
+ AC_DEFINE([HAS_JAVA], [FALSE], [Not specified at configure line])
+ AC_MSG_RESULT(not requested by configure)
+ JAVASTATUS="no, disabled by configure"
fi
dnl Check for bzip2
@@ -166,7 +321,15 @@ AC_CHECK_LIB([bz2], [BZ2_bzCompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2
if test -n "$LIBBZ2"; then
LDFLAGS="$LDFLAGS $LIBBZ2"
else
- AC_MSG_ERROR("missing bzip2 headers/libraries");
+ AC_MSG_ERROR("bzip2 library and its include files are needed to build pacman!");
+fi
+
+dnl Check for math
+AC_CHECK_LIB([m], [log10], [AC_CHECK_HEADER([math.h], [LIBM='-lm'])])
+if test -n "$LIBM"; then
+ LDFLAGS="$LDFLAGS $LIBM"
+else
+ AC_MSG_ERROR("math library not found!");
fi
dnl Check for libarchive
@@ -175,10 +338,31 @@ if test -n "$LIBARCHIVE"; then
CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS $LIBARCHIVE"
else
- AC_MSG_ERROR("missing libarchive headers/libraries");
+ AC_MSG_ERROR("libarchive is needed to compile pacman!");
+fi
+
+dnl Enable or disable debug code
+AC_MSG_CHECKING(for debug mode request)
+if test x$debug = xyes ; then
+ AM_CONDITIONAL(PACMAN_DEBUG, test x$debug = xyes)
+ CFLAGS="-g -Wall -Werror -std=c99 -DPACMAN_DEBUG"
+ AC_MSG_RESULT(yes)
+else
+ AM_CONDITIONAL(PACMAN_DEBUG, test x$debug = xno)
+ CFLAGS="$CFLAGS -std=c99"
+ AC_MSG_RESULT(no)
+fi
+
+dnl Enable or disable fakeroot code
+AC_MSG_CHECKING(for fakeroot proof support)
+if test x$fakeroot = xyes ; then
+ AC_MSG_RESULT(yes)
+else
+ CFLAGS="$CFLAGS -DFAKEROOT"
+ AC_MSG_RESULT(no)
fi
-CFLAGS="$CFLAGS $ENV_CFLAGS"
+CFLAGS="$CFLAGS"
dnl ==========================================================================
@@ -191,22 +375,34 @@ src/pacman/po/Makefile.in
src/util/Makefile
scripts/Makefile
doc/Makefile
-doc/makepkg.8
-doc/pacman.8
-doc/libalpm.3
+etc/Makefile
+etc/pacman.d/Makefile
+bindings/perl/Makefile
+bindings/python/Makefile
+bindings/java/Makefile
Makefile
])
echo "
pacman-$VERSION:
-
- prefix: ${prefix}
- source code location: ${srcdir}
- compiler: ${CC}
- compiler flags: ${CFLAGS}
- libalpm version: ${PM_VERSION}
-
- debug support: ${debug}
+
+ prefix : ${prefix}
+ source code location : ${srcdir}
+ compiler : ${CC}
+ compiler flags : ${CFLAGS}
+
+ libalpm version : ${PM_VERSION}
+ pacman.conf location : ${PACCONF}
+
+ Architecture CARCH : ${CARCH}
+ Architecture used cflag : ${CARCHFLAGS}
+ Architecture CHOST : ${CHOST}
Doxygen support : ${DOXYSTATUS}
+ Manpage localization : ${POSTATUS}
+ Perl bindings : ${PERLSTATUS}
+ Python bindings : ${PYTHONSTATUS}
+ Java bindings : ${JAVASTATUS}
+
+ debug support : ${debug}
"