X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure.ac;h=1918f6685d3d0d5700c4c99c606e3cfa8a7a3f58;hb=f3abfc04584a952b8c1e7de79ce74336c1fa2ad1;hp=aafcd2409fca894f80d9956079b1aa7f78d020f1;hpb=1e2df30f5a53f56f3d9674bb2119ab278c86058a;p=libfirm diff --git a/configure.ac b/configure.ac index aafcd2409..1918f6685 100644 --- a/configure.ac +++ b/configure.ac @@ -7,32 +7,63 @@ dnl CVS-ID: $Id$ dnl Copyright: (c) 2002-2007 University of Karlsruhe dnl Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. dnl -AC_PREREQ([2.54]) +AC_PREREQ([2.60]) AC_REVISION([$Id$]) + +dnl Firm Versions +dnl * Increment major/minor/micro version as you see fit. These 3 numbers +dnl are intended for humans and are independent from the libtool versions m4_define([firm_major_version], [1]) -m4_define([firm_minor_version], [14]) +m4_define([firm_minor_version], [19]) m4_define([firm_micro_version], [0]) m4_define([firm_version], [firm_major_version.firm_minor_version.firm_micro_version]) + +dnl Libtool versions +dnl +dnl * If any code has changed at all (i.e. bugfixes) increment revision +dnl * If any interface has been added, removed or changed increment +dnl current, set revision to 0 +dnl * If any interface has been added increment age +dnl * If any interfaces have been remove set age to 0 +dnl * use lt_release if substantial things have been changed. The release can be +dnl thought of as part of the library name. So changing the release creates +dnl a new library. +m4_define([lt_current], [1]) +m4_define([lt_revision], [0]) +m4_define([lt_age], [0]) +dnl we use firm major version as release +m4_define([lt_release], [firm_major_version]) + AC_INIT([libfirm], [firm_version], [firm@ipd.info.uni-karlsruhe.de]) AC_CONFIG_SRCDIR([ir/common/firm.c]) AM_INIT_AUTOMAKE([foreign dist-bzip2 1.9]) -# see libtool manual on what version numbers mean! -LT_VERSION=0:0:0 -AC_SUBST([LT_VERSION]) - AC_DEFINE([libfirm_VERSION_MAJOR], [firm_major_version], [Firms major version number]) AC_DEFINE([libfirm_VERSION_MINOR], [firm_minor_version], [Firms minor version number]) AC_DEFINE([libfirm_VERSION_MICRO], [firm_micro_version], [Firms micro version number]) +LT_VERSION="lt_current:lt_revision:lt_age" +AC_SUBST([LT_VERSION]) +LT_RELEASE="lt_release" +AC_SUBST([LT_RELEASE]) + +dnl enable libtool +LT_INIT([win32-dll]) +AC_SUBST([LIBTOOL_DEPS]) + dnl generate the config header file AC_CONFIG_HEADER([config.h]) dnl keep track of the environment set by the user -libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS'}" +libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS -lm'}" AC_SUBST(libfirm_conf_env) +dnl enable visibility hidden +CFLAGS="-fvisibility=hidden" +AC_DEFINE([FIRM_BUILD], [], [Defined when firm library is built]) +AC_DEFINE([FIRM_DLL], [], [Define when a dynamically loadable shared library is built]) + dnl Package options dnl =============== @@ -106,7 +137,6 @@ dnl ==================== dnl check for a C compiler dnl ---------------------- AC_PROG_CC -AC_PROG_LIBTOOL AC_PATH_PROGS(PERL, perl perl5) @@ -119,6 +149,7 @@ dnl ======================== AC_HEADER_STDC AC_CHECK_HEADERS([math.h], , AC_MSG_ERROR("math header file not found")) +AC_CHECK_HEADERS([alloca.h]) dnl Checks for libraries. dnl ===================== @@ -140,17 +171,7 @@ AC_C_LONG_DOUBLE dnl Checks for library functions. dnl ============================= -dnl check for strerror - -AC_CHECK_FUNC(strerror,, - AC_MSG_ERROR("need strerror function") -) - -dnl we use the gnu extension obstack_printf -AC_DEFINE([_GNU_SOURCE], [], [we use gnu extensions]) -AC_CHECK_FUNC(strerror,, - AC_MSG_ERROR("need obstack_printf function") -) +AC_FUNC_STRTOLD dnl Error messaging dnl =============== @@ -168,8 +189,8 @@ AC_CONFIG_FILES([ AC_DEFINE([INLINE], [inline], [define inline to compiler inline keyword]) BACKENDS="" -if test "$enable_backend" == yes; then - BACKENDS="arm ia32 mips ppc32" +if test "$enable_backend" = yes; then + BACKENDS="arm ia32 mips sparc amd64" fi AC_SUBST([BACKENDS])