Commit 595bdc7d authored by Matthias Braun's avatar Matthias Braun
Browse files

update/fix autotools stuff

[r27685]
parent 4096b5c8
......@@ -154,3 +154,223 @@ else
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cflags_gcc_option.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
#
# DESCRIPTION
#
# AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
# "checking CFLAGS for gcc -fvomit-frame ... yes" and adds the optionflag
# to CFLAGS if it is understood. You can override the shellvar-default of
# CFLAGS of course. The order of arguments stems from the explicit macros
# like AX_CFLAGS_WARN_ALL.
#
# The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add to
# CXXFLAGS - and it uses the autoconf setup for C++ instead of C (since it
# is possible to use different compilers for C and C++).
#
# The macro is a lot simpler than any special AX_CFLAGS_* macro (or
# ax_cxx_rtti.m4 macro) but allows to check for arbitrary options.
# However, if you use this macro in a few places, it would be great if you
# would make up a new function-macro and submit it to the ac-archive.
#
# - $1 option-to-check-for : required ("-option" as non-value)
# - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
# - $3 action-if-found : add value to shellvariable
# - $4 action-if-not-found : nothing
#
# Note: in earlier versions, $1-$2 were swapped. We try to detect the
# situation and accept a $2=~/-/ as being the old option-to-check-for.
#
# There are other variants that emerged from the original macro variant
# which did just test an option to be possibly added. However, some
# compilers accept an option silently, or possibly for just another option
# that was not intended. Therefore, we have to do a generic test for a
# compiler family. For gcc we check "-pedantic" being accepted which is
# also understood by compilers who just want to be compatible with gcc
# even when not being made from gcc sources.
#
# See also: AX_CFLAGS_SUN_OPTION, AX_CFLAGS_HPUX_OPTION,
# AX_CFLAGS_AIX_OPTION, and AX_CFLAGS_IRIX_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl -------------------------------------------------------------------------
AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
......@@ -38,8 +38,8 @@ AC_DEFINE([libfirm_VERSION_MICRO], [firm_micro_version], [Firms micro version nu
LT_VERSION="lt_current:lt_revision:lt_age"
AC_SUBST([LT_VERSION])
LT_RELEASE="lt_release"
AC_SUBST([LT_RELEASE])
#LT_RELEASE="lt_release"
#AC_SUBST([LT_RELEASE])
dnl enable libtool
LT_INIT([win32-dll])
......@@ -48,8 +48,6 @@ AC_SUBST([LIBTOOL_DEPS])
dnl generate the config header file
AC_CONFIG_HEADER([config.h])
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])
......@@ -106,6 +104,10 @@ dnl check for a C compiler
dnl ----------------------
AC_PROG_CC
dnl enable visibility hidden (if supported)
AX_CFLAGS_GCC_OPTION([-fvisibility=hidden])
AC_PATH_PROGS(PERL, perl perl5)
dnl check for awk
......
......@@ -22,7 +22,7 @@ INCLUDES += \
-I$(top_srcdir)/ir/tr \
-I$(top_srcdir)/ir/tv
libfirm_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_VERSION)
libfirm_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION)
libfirm_la_SOURCES = \
adt/array.c \
adt/bipartite.c \
......@@ -93,10 +93,6 @@ libfirm_la_SOURCES = \
be/beflags.c \
be/begnuas.c \
be/beifg.c \
be/beifg_clique.c \
be/beifg_list.c \
be/beifg_pointer.c \
be/beifg_std.c \
be/beilpsched.c \
be/beinfo.c \
be/beinsn.c \
......@@ -253,149 +249,150 @@ libfirm_la_SOURCES = \
tv/tv.c
EXTRA_DIST = \
adt/bitset.h \
adt/array_t.h \
adt/raw_bitset.h \
adt/compiler.h \
adt/bitfiddle.h \
ana/irdom_t.h \
adt/bitset.h \
adt/compiler.h \
adt/raw_bitset.h \
adt/util.h \
ana/absgraph.h \
ana/dfs.h \
ana/dfs_t.h \
ana/irbackedge_t.h \
ana/dfs.h \
ana/irdom_t.h \
ana/irextbb_t.h \
ana/irlivechk.h \
ana/irmemory_t.h \
ana/absgraph.h \
ana/irloop_t.h \
ana/irextbb_t.h \
be/belive_t.h \
be/bechordal_common.h \
be/beifg_impl.h \
be/becopypbqp.h \
be/bepeephole.h \
ana/irmemory_t.h \
be/be_dbgout.h \
be/be_dbgout_t.h \
be/bessaconstr.h \
be/beifg_t.h \
be/beblocksched.h \
be/becopyilp_t.h \
be/beverify.h \
be/bemachine.h \
be/beemitter.h \
be/begnuas.h \
be/becopyopt_t.h \
be/benode.h \
be/bemodule.h \
be/be_t.h \
be/be_types.h \
be/belistsched.h \
be/bessadestr.h \
be/bechordal_draw.h \
be/beabi.h \
be/beflags.h \
be/bearch.h \
be/beblocksched.h \
be/bechordal.h \
be/bechordal_common.h \
be/bechordal_draw.h \
be/bechordal_t.h \
be/beifg.h \
be/bespillslots.h \
be/beschedmris.h \
be/besched.h \
be/beloopana.h \
be/beilpsched.h \
be/becopyilp_t.h \
be/becopyopt.h \
be/bepressurestat.h \
be/bestat.h \
be/beuses.h \
be/bestate.h \
be/bespillutil.h \
be/bera.h \
be/becopyopt_t.h \
be/becopypbqp.h \
be/becopystat.h \
be/bedomfront.h \
be/bedump_minir.h \
be/beemitter.h \
be/beemitter_binary.h \
be/beirgmod.h \
be/beflags.h \
be/begnuas.h \
be/beifg.h \
be/beilpsched.h \
be/beinfo.h \
be/beinsn_t.h \
be/betranshlp.h \
be/beintlive_t.h \
be/beirg.h \
be/beirgmod.h \
be/belistsched.h \
be/belive.h \
be/bestatevent.h \
be/beutil.h \
be/be_dbgout.h \
be/bespill.h \
be/bedomfront.h \
be/belive_t.h \
be/beloopana.h \
be/belower.h \
be/beinfo.h \
be/beintlive_t.h \
be/bepbqpcoloring.h \
be/becopystat.h \
be/bemachine.h \
be/benode.h \
be/bemodule.h \
be/bemodule_t.h \
be/bechordal.h \
be/bedump_minir.h \
be/bearch.h \
be/besched.h \
be/bepbqpcoloring.h \
be/bepeephole.h \
be/bepressurestat.h \
be/bera.h \
be/beschedmris.h \
be/beutil.h \
be/beschedrss.h \
be/beirg.h \
be/bespill.h \
be/bespillslots.h \
be/bespillutil.h \
be/bessaconstr.h \
be/bessadestr.h \
be/bestat.h \
be/bestate.h \
be/bestatevent.h \
be/betranshlp.h \
be/beuses.h \
be/beverify.h \
common/debug.h \
common/error.h \
common/irtools.h \
common/debug.h \
debug/dbginfo_t.h \
debug/debugger.h \
ident/ident_t.h \
ir/gen_irnode.h \
ir/irmode_t.h \
ir/irvrfy_t.h \
ir/iredges_t.h \
ir/ircons_t.h \
ir/irpass_t.h \
ir/irprofile.h \
ir/irflag_t.def \
ir/instrument.h \
ir/irargs_t.h \
ir/irnodemap.h \
ir/irgraph_t.h \
ir/irbitset.h \
ir/ircons_t.h \
ir/irdump_t.h \
ir/iredges_t.h \
ir/iredgeset.h \
ir/irflag_t.def \
ir/irflag_t.h \
ir/valueset.h \
ir/irgraph_t.h \
ir/irlinkednodemap.h \
ir/irlinkednodeset.h \
ir/irmode_t.h \
ir/irnode_t.h \
ir/irnodemap.h \
ir/irnodeset.h \
ir/irop_t.h \
ir/iropt_t.h \
ir/irpass_t.h \
ir/irphase.h \
ir/irphase_t.h \
ir/instrument.h \
ir/iredgeset.h \
ir/irdump_t.h \
ir/irprintf_t.h \
ir/irprofile.h \
ir/irprog_t.h \
ir/irtypes.h \
ir/irnode_t.h \
ir/irlinkednodemap.h \
ir/iropt_t.h \
ir/irprintf_t.h \
ir/irlinkednodeset.h \
ir/irphase.h \
libcore/lc_common_t.h \
libcore/lc_defines.h \
libcore/lc_parser_t.h \
ir/irvrfy_t.h \
ir/valueset.h \
ir/gen_irnode.h \
libcore/do_bisonflex.sh \
libcore/lc_config_parser.h \
libcore/lc_opts.h \
libcore/lc_printf_arg_types.def \
libcore/lc_appendable.h \
libcore/lc_printf.h \
libcore/lc_common_t.h \
libcore/lc_config.h \
libcore/lc_opts_t.h \
libcore/lc_config_lexer.l \
libcore/lc_config_parser.h \
libcore/lc_config_parser.y \
libcore/lc_defines.h \
libcore/lc_opts.h \
libcore/lc_opts_enum.h \
opt/scalar_replace.h \
opt/reassoc_t.h \
opt/opt_init.h \
libcore/lc_opts_t.h \
libcore/lc_parser_t.h \
libcore/lc_printf.h \
libcore/lc_printf_arg_types.def \
opt/iropt_dbg.h \
opt/opt_confirms.h \
opt/opt_init.h \
opt/opt_polymorphy.h \
opt/iropt_dbg.h \
stat/statev.h \
stat/stat_dmp.h \
opt/reassoc_t.h \
opt/scalar_replace.h \
stat/counter.h \
stat/dags.h \
stat/firmstat_t.h \
stat/pattern.h \
stat/pattern_dmp.h \
stat/dags.h \
stat/counter.h \
stat/stat_dmp.h \
stat/stat_timing.h \
tr/entity_t.h \
stat/statev.h \
tr/compound_path_t.h \
tr/type_t.h \
tr/entity_t.h \
tr/tpop_t.h \
tr/type_t.h \
tv/fltcalc.h \
tv/strcalc.h \
tv/tv_t.h \
tv/fltcalc.h \
ir/gen_irop.c.inl \
ir/gen_ir_cons.c.inl \
ir/gen_irnode.c.inl \
ir/gen_irop.c.inl \
ir/gen_irio_export.inl \
ir/gen_irio_import.inl \
ir/gen_irio_lex.inl \
......@@ -405,11 +402,6 @@ EXTRA_DIST = \
be/scripts/generate_new_opcodes.pl \
be/scripts/generate_regalloc_if.pl
EXTRA_DIST += \
libcore/do_bisonflex.sh \
libcore/lc_config_lexer.l \
libcore/lc_config_parser.y
# ia32 backend
ia32_sources = \
......
......@@ -15,7 +15,7 @@ done
echo "" >> FILELIST
echo "" >> FILELIST
echo "EXTRA_DIST = \\" >> FILELIST
FILES=`find $DIRS -maxdepth 1 -name "*.h" -o -name "*.def" -o -name "*.sh"`
FILES=`find $DIRS -maxdepth 1 -name "*.h" -o -name "*.def" -o -name "*.sh" -o -name "*.l" -o -name "*.y"`
FILES="$FILES `find ir -name "*.inl"`"
for f in $FILES; do
echo -e "\t$f \\" >> FILELIST
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment