Commit 574f364d authored by Christian Hergert's avatar Christian Hergert

remove autotools

parent ef4b9c69
SUBDIRS = . build contrib data libide src plugins tools po tests doc
ACLOCAL_AMFLAGS = -I build/autotools
EXTRA_DIST = \
AUTHORS \
$(NULL)
# --disable-gtk-doc until future notice
DISTCHECK_CONFIGURE_FLAGS = \
--enable-introspection \
--disable-gtk-doc \
--disable-tracing \
--enable-appstream-util \
--disable-maintainer-mode \
$(NULL)
GITIGNOREFILES = \
**/*.swp \
.flatpak-builder \
*.o \
**/__pycache__ \
aclocal.m4 \
build-aux \
ChangeLog \
config \
config.h.in \
gtk-doc.m4 \
gtk-doc.make \
INSTALL \
ABOUT-NLS \
$(NULL)
AUTHORS:
@if test -d "$(srcdir)/.git"; \
then \
echo Creating $@ && \
( cd "$(top_srcdir)" && \
echo '# Generated by Makefile. Do not edit.'; echo; \
git log --no-merges --pretty=format:"%an" libide src plugins \
| sort | uniq ) > $@.tmp \
&& mv -f $@.tmp $@ \
|| ( rm -f $@.tmp ; \
echo Failed to generate $@ >&2 ); \
fi
dist-hook:
@if test -d "$(srcdir)/.git"; \
then \
echo Creating ChangeLog && \
( cd "$(top_srcdir)" && \
echo '# Generated by Makefile. Do not edit.'; echo; \
$(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >&2 ); \
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
.PHONY: AUTHORS
RUNTIME_TYPELIB_PATH = libide:contrib/egg:contrib/pnl:contrib/tmpl:$(GI_TYPELIB_PATH)
run:
@ LSAN_OPTIONS=suppressions=$(top_srcdir)/build/asan.supp \
ASAN_OPTIONS=alloc_dealloc_mismatch=0 \
PEAS_DEBUG=1 \
GB_IN_TREE_PLUGINS=1 \
GB_IN_TREE_FONTS=1 \
GB_IN_TREE_STYLE_SCHEMES=1 \
GI_TYPELIB_PATH="$(RUNTIME_TYPELIB_PATH)" \
GOBJECT_DEBUG=instance-count \
PYTHONDONTWRITEBYTECODE=yes \
PATH=$(top_builddir)/src:${PATH} \
$(LIBTOOL) --mode=execute gdb \
-ex 'handle SIGPIPE nostop noprint pass' \
-ex run \
--args src/gnome-builder -vvvv -s $(ARGS)
strace:
@ PEAS_DEBUG=1 \
GB_IN_TREE_PLUGINS=1 \
GB_IN_TREE_FONTS=1 \
GB_IN_TREE_STYLE_SCHEMES=1 \
GI_TYPELIB_PATH="$(RUNTIME_TYPELIB_PATH)" \
GOBJECT_DEBUG=instance-count \
PYTHONDONTWRITEBYTECODE=yes \
PATH=$(top_builddir)/src:${PATH} \
$(LIBTOOL) --mode=execute strace -T src/gnome-builder -vvvv -s $(ARGS)
debug:
@ LSAN_OPTIONS=suppressions=$(top_srcdir)/build/asan.supp \
ASAN_OPTIONS=alloc_dealloc_mismatch=0 \
G_SLICE=always-malloc \
PEAS_DEBUG=1 \
GB_IN_TREE_PLUGINS=1 \
GB_IN_TREE_FONTS=1 \
GB_IN_TREE_STYLE_SCHEMES=1 \
GI_TYPELIB_PATH="$(RUNTIME_TYPELIB_PATH)" \
G_DEBUG=fatal-criticals \
GOBJECT_DEBUG=instance-count \
PYTHONDONTWRITEBYTECODE=yes \
PATH=$(top_builddir)/src:${PATH} \
$(LIBTOOL) --mode=execute gdb \
-ex 'handle SIGPIPE nostop noprint pass' \
-ex run \
--args src/gnome-builder -vvvv -s $(ARGS)
valgrind:
@ PEAS_DEBUG=1 \
GB_IN_TREE_PLUGINS=1 \
GB_IN_TREE_FONTS=1 \
GB_IN_TREE_STYLE_SCHEMES=1 \
GI_TYPELIB_PATH="$(RUNTIME_TYPELIB_PATH)" \
G_DEBUG=fatal-criticals \
G_SLICE=always-malloc \
PYTHONDONTWRITEBYTECODE=yes \
PATH=$(top_builddir)/src:${PATH} \
$(LIBTOOL) --mode=execute valgrind src/gnome-builder -vvvv -s $(ARGS)
-include $(top_srcdir)/git.mk
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
(test -f $srcdir/src/main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level gnome-builder directory"
exit 1
}
olddir=`pwd`
cd $srcdir
touch ChangeLog
touch INSTALL
autoreconf --force --install -Wno-portability -I build/autotools || exit 1
cd $olddir
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type \`make\' to compile" || exit 1
fi
else
echo "Skipping configure process."
fi
set +x
SUBDIRS = autotools
EXTRA_DIST = asan.supp
GITIGNOREFILES = \
compile \
config.guess \
config.rpath \
config.sub \
depcomp \
install-sh \
ltmain.sh \
missing \
py-compile \
test-driver \
ylwrap \
$(NULL)
-include $(top_srcdir)/git.mk
EXTRA_DIST = \
Makefile.am.enums \
Makefile.am.gresources \
Makefile.am.marshal \
appstream-xml.m4 \
ax_append_compile_flags.m4 \
ax_append_flag.m4 \
ax_check_compile_flag.m4 \
ax_check_link_flag.m4 \
ax_compiler_vendor.m4 \
ax_cxx_compile_stdcxx.m4 \
ax_cxx_compile_stdcxx_11.m4 \
ax_require_defined.m4 \
gb_enable_rdtscp.m4 \
introspection.m4 \
pkg.m4 \
vala.m4 \
vapigen.m4 \
tap-test \
$(NULL)
# We want to ignore all m4 files except a few
# we explicitly keep in repo
GITIGNOREFILES = \
$(filter-out $(EXTRA_DIST),$(wildcard *.m4)) \
$(NULL)
-include $(top_srcdir)/git.mk
# Rules for generating enumeration types using glib-mkenums
#
# Define:
# glib_enum_h = header template file
# glib_enum_c = source template file
# glib_enum_headers = list of headers to parse
#
# before including Makefile.am.enums. You will also need to have
# the following targets already defined:
#
# CLEANFILES
# DISTCLEANFILES
# BUILT_SOURCES
# EXTRA_DIST
#
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
# Basic sanity checks
$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS))
$(if $(or $(glib_enum_h), \
$(glib_enum_c)),, \
$(error Need to define glib_enum_h and glib_enum_c))
$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers))
enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in))
enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in))
enum_headers=$(addprefix $(srcdir)/, $(glib_enum_headers))
CLEANFILES += stamp-enum-types
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
stamp-enum-types: $(enum_headers) $(enum_tmpl_h)
$(AM_V_GEN)$(GLIB_MKENUMS) \
--template $(enum_tmpl_h) \
$(enum_headers) > xgen-eh \
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
&& rm -f xgen-eh \
&& echo timestamp > $(@F)
$(glib_enum_h): stamp-enum-types
@true
$(glib_enum_c): $(enum_headers) $(enum_tmpl_h) $(enum_tmpl_c)
$(AM_V_GEN)$(GLIB_MKENUMS) \
--template $(enum_tmpl_c) \
$(enum_headers) > xgen-ec \
&& cp -f xgen-ec $(glib_enum_c) \
&& rm -f xgen-ec
# Rules for generating gresources using glib-compile-resources
#
# Define:
# glib_resources_h = header template file
# glib_resources_c = source template file
# glib_resources_xml = path to *.gresource.xml
# glib_resources_namespace = c prefix for resources
#
# before including Makefile.am.resources. You will also need to have
# the following targets already defined:
#
# CLEANFILES
# DISTCLEANFILES
# BUILT_SOURCES
# EXTRA_DIST
#
# Author: Christian Hergert <christian@hergert.me>
# Basic sanity checks
$(if $(GLIB_COMPILE_RESOURCES),,$(error Need to define GLIB_COMPILE_RESOURCES))
$(if $(or $(glib_resources_h), \
$(glib_resources_c)),, \
$(error Need to define glib_resources_h and glib_resources_c))
$(if $(glib_resources_xml),,$(error Need to define glib_resources_xml))
$(if $(glib_resources_namespace),,$(error Need to define glib_resources_namespace))
resources_xml=$(addprefix $(srcdir)/,$(glib_resources_xml))
resources_srcdir=$(dir $(resources_xml))
DISTCLEANFILES += $(glib_resources_h) $(glib_resources_c)
BUILT_SOURCES += $(glib_resources_h) $(glib_resources_c)
CLEANFILES += stamp-resources $(glib_resources_c) $(glib_resources_h)
EXTRA_DIST += \
$(glib_resources_xml) \
$(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(resources_srcdir) --generate-dependencies $(resources_xml)) \
$(NULL)
stamp-resources: $(glib_resources_c) $(resources_xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) \
--target=xgen-gr.h \
--sourcedir=$(resources_srcdir) \
--generate-header \
--c-name $(glib_resources_namespace) \
$(resources_xml) \
&& (cmp -s xgen-gr.h $(glib_resources_h) || cp -f xgen-gr.h $(glib_resources_h)) \
&& rm -f xgen-gr.h \
&& echo timestamp > $(@F)
$(glib_resources_h): stamp-resources
@true
$(glib_resources_c): $(resources_xml) $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(resources_srcdir) --generate-dependencies $(resources_xml))
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) \
--target=xgen-gr.c \
--sourcedir=$(resources_srcdir) \
--generate-source \
--c-name $(glib_resources_namespace) \
$(resources_xml) \
&& (cmp -s xgen-gr.c $(glib_resources_c) || cp -f xgen-gr.c $(glib_resources_c)) \
&& rm -f xgen-gr.c
# Rules for generating marshal files using glib-genmarshal
#
# Define:
# glib_marshal_list = marshal list file
# glib_marshal_prefix = prefix for marshal functions
#
# before including Makefile.am.marshal. You will also need to have
# the following targets already defined:
#
# CLEANFILES
# DISTCLEANFILES
# BUILT_SOURCES
# EXTRA_DIST
#
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
# Basic sanity checks
$(if $(GLIB_GENMARSHAL),,$(error Need to define GLIB_GENMARSHAL))
$(if $(or $(glib_marshal_list), \
$(glib_marshal_prefix)),, \
$(error Need to define glib_marshal_list and glib_marshal_prefix))
marshal_h = $(glib_marshal_list:.list=.h)
marshal_c = $(glib_marshal_list:.list=.c)
marshal_list = $(addprefix $(srcdir)/, $(glib_marshal_list))
CLEANFILES += stamp-marshal
DISTCLEANFILES += $(marshal_h) $(marshal_c)
BUILT_SOURCES += $(marshal_h) $(marshal_c)
EXTRA_DIST += $(marshal_list)
stamp-marshal: $(marshal_list)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--header \
$(marshal_list) > xgen-mh \
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
&& rm -f xgen-mh \
&& echo timestamp > $(@F)
$(marshal_h): stamp-marshal
@true
$(marshal_c): $(marshal_h)
$(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \
$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--body \
$(marshal_list)) > xgen-mc \
&& cp xgen-mc $(marshal_c) \
&& rm -f xgen-mc
#!/usr/bin/env python3
"""
For every line in the makefile ending in a backslash, locate the longest
line and then reformat all lines to match the proper tailing whitespace.
"""
import os
import sys
_MAX_LENGTH = 120
filenames = sys.argv[1:]
def count_prefix_tabs(line):
count = 0
for ch in line:
if ch == '\t':
count += 1
else:
break
return count
def count_visual_chars(line):
n_tabs = count_prefix_tabs(line)
return n_tabs * 8 + len(line.replace('\t',''))
for path in filenames:
lines = None
longest = 0
# find the longest line, stripping the prefix \t (which will be
# rewritten) and the trailing space before the \\.
with open(path, 'r') as stream:
lines = list(stream.readlines())
for line in lines:
if line.endswith('\\\n'):
line = line[:-2].rstrip()
length = count_visual_chars(line)
# if the line length is pathalogical, ignore it
if length < _MAX_LENGTH:
longest = max(longest, length)
# Now rewrite the file with the line modifications
with open(path + '.tmp', 'w') as stream:
for line in lines:
if not line.endswith('\\\n'):
stream.write(line)
continue
line = line[:-2].rstrip()
short = count_visual_chars(line)
line = line + (longest - short) * ' ' + ' \\\n'
stream.write(line)
os.rename(path + '.tmp', path)
# appstream-xml.m4
#
# serial 6
dnl APPSTREAM_XML
dnl Installs and validates AppData XML files.
dnl
dnl Call APPSTREAM_XML in configure.ac to check for the appstream-util tool.
dnl Add @APPSTREAM_XML_RULES@ to a Makefile.am to substitute the make rules. Add
dnl .appdata.xml files to appstream_XML in Makefile.am and they will be validated
dnl at make check time, if appstream-util is installed, as well as installed
dnl to the correct location automatically. Add --enable-appstream-util to
dnl DISTCHECK_CONFIGURE_FLAGS in Makefile.am to require valid AppData XML when
dnl doing a distcheck.
dnl
dnl Adding files to appstream_XML does not distribute them automatically.
AC_DEFUN([APPSTREAM_XML],
[
m4_pattern_allow([AM_V_GEN])
AC_ARG_ENABLE([appstream-util],
[AS_HELP_STRING([--disable-appstream-util],
[Disable validating AppData XML files during check phase])])
AS_IF([test "x$enable_appstream_validate" != "xno"],
[AC_PATH_PROG([APPSTREAM_UTIL], [appstream-util])
AS_IF([test "x$APPSTREAM_UTIL" = "x"],
[have_appstream_validate=no],
[have_appstream_validate=yes
AC_SUBST([APPSTREAM_UTIL])])],
[have_appstream_validate=no])
AS_IF([test "x$have_appstream_validate" != "xno"],
[appstream_validate=yes],
[appstream_validate=no
AS_IF([test "x$enable_appstream_validate" = "xyes"],
[AC_MSG_ERROR([AppData validation was requested but appstream-util was not found])])])
AC_SUBST([appstreamxmldir], [${datadir}/appdata])
APPSTREAM_XML_RULES='
.PHONY : uninstall-appstream-xml install-appstream-xml clean-appstream-xml
mostlyclean-am: clean-appstream-xml
%.appdata.valid: %.appdata.xml
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; \
if test -n "$(APPSTREAM_UTIL)"; \
then $(APPSTREAM_UTIL) --nonet validate $${d}$<; fi \
&& touch [$]@
check-am: $(appstream_XML:.appdata.xml=.appdata.valid)
uninstall-am: uninstall-appstream-xml
install-data-am: install-appstream-xml
.SECONDARY: $(appstream_XML)
install-appstream-xml: $(appstream_XML)
@$(NORMAL_INSTALL)
if test -n "$^"; then \
test -z "$(appstreamxmldir)" || $(MKDIR_P) "$(DESTDIR)$(appstreamxmldir)"; \
$(INSTALL_DATA) $^ "$(DESTDIR)$(appstreamxmldir)"; \
fi
uninstall-appstream-xml:
@$(NORMAL_UNINSTALL)
@list='\''$(appstream_XML)'\''; test -n "$(appstreamxmldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
test -n "$$files" || exit 0; \
echo " ( cd '\''$(DESTDIR)$(appstreamxmldir)'\'' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(appstreamxmldir)" && rm -f $$files
clean-appstream-xml:
rm -f $(appstream_XML:.appdata.xml=.appdata.valid)
'
_APPSTREAM_XML_SUBST(APPSTREAM_XML_RULES)
])
dnl _APPSTREAM_XML_SUBST(VARIABLE)
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
AC_DEFUN([_APPSTREAM_XML_SUBST],
[
AC_SUBST([$1])
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
]
)
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. During the check the flag is always added to the
# current language's flags.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
# AX_APPEND_LINK_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 3 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.
#serial 5
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
done
])dnl AX_APPEND_COMPILE_FLAGS
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
#
# DESCRIPTION
#
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
# added in between.
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
# FLAG.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 3 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.
#serial 6
AC_DEFUN([AX_APPEND_FLAG],
[dnl
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
AS_VAR_SET_IF(FLAGS,[
AS_CASE([" AS_VAR_GET(FLAGS) "],
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
[
AS_VAR_APPEND(FLAGS,[" $1"])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
],
[
AS_VAR_SET(FLAGS,[$1])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 3 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/>.