Commit bad2dbff authored by David Schleef's avatar David Schleef

Initial commit. Previous history is in liboil

parents
AUTOMAKE_OPTIONS = foreign
SUBDIRS = orc testsuite examples doc
EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc
orc-$(ORC_MAJORMINOR).pc: orc.pc
cp orc.pc orc-$(ORC_MAJORMINOR).pc
orc-$(ORC_MAJORMINOR)-uninstalled.pc: orc-uninstalled.pc
cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc
BUILT_SOURCES=orc-$(ORC_MAJORMINOR)-uninstalled.pc
CLEANFILES = orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc
ACLOCAL_FLAGS = -I m4
#!/bin/sh
autoreconf -i -f &&
./configure --enable-maintainer-mode --disable-static --enable-gtk-doc $@
AC_PREREQ([2.58])
AC_INIT(orc,0.3.14.1)
AS_NANO(ORC_CVS=no,ORC_CVS=yes)
AC_CANONICAL_HOST([])
AM_INIT_AUTOMAKE(1.6)
AM_MAINTAINER_MODE
ORC_MAJORMINOR=0.3
AC_SUBST(ORC_MAJORMINOR)
AM_CONFIG_HEADER(config.h)
dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
ORC_LIBVERSION="2:0:2"
AC_SUBST(ORC_LIBVERSION)
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_TAGS([])
AC_PROG_LIBTOOL
AM_PROG_AS
AC_CONFIG_SRCDIR([orc/orc.h])
ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS"
AC_SUBST(ACLOCAL_AMFLAGS)
PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes, HAVE_GLIB=no)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_ARG_ENABLE(glib,
AC_HELP_STRING([--disable-glib],[disable usage of glib]),
[case "${enableval}" in
yes) HAVE_GLIB=yes ;;
no) HAVE_GLIB=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-glib) ;;
esac])
AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
##################################################
# Check for gtk-doc.
##################################################
if test "x$cross_compiling" = "xyes" ; then
enable_gtk_doc=no
fi
GTK_DOC_CHECK([1.0])
AS_HOST_DEFINES()
AC_C_BIGENDIAN
AC_LTDL_SYMBOL_USCORE
if test x${ac_cv_sys_symbol_underscore} = xyes ; then
AC_DEFINE(HAVE_SYMBOL_UNDERSCORE, 1, [Define if C symbols have leading underscore])
fi
AX_CREATE_STDINT_H([orc/orc-stdint.h])
AC_FUNC_MMAP()
AC_CHECK_LIB(m, rint,
AC_DEFINE(HAVE_RINT, 1, [Define if rint() is available]))
AC_CHECK_LIB(m, rintf,
AC_DEFINE(HAVE_RINTF, 1, [Define if rintf() is available]))
AC_CHECK_LIB(m, lrint,
AC_DEFINE(HAVE_LRINT, 1, [Define if lrint() is available]))
AC_CHECK_LIB(m, lrintf,
AC_DEFINE(HAVE_LRINTF, 1, [Define if lrintf() is available]))
AC_CHECK_LIB(m, sincos,
AC_DEFINE(HAVE_SINCOS, 1, [Define if sincos() is available]))
AC_CHECK_HEADER(ieee754.h,
AC_DEFINE(HAVE_IEEE754_H, 1, [Define if ieee754.h exists]))
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([sigaction])
AC_CHECK_FUNCS([sigsetjmp])
AC_CHECK_LIBM
AC_SUBST(LIBM)
AC_CHECK_LIB(rt, clock_gettime,
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()])
LIBRT=-lrt
)
AC_SUBST(LIBRT)
AC_CACHE_CHECK(for monotonic clocks,
orc_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
#include <unistd.h>
int main() {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
#error No monotonic clock
#endif
return 0;
}
]])],orc_cv_monotonic_clock=yes,orc_cv_monotonic_clock=no))
if test "$orc_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock])
fi
AS_COMPILER_FLAG(-Wall, ORC_CFLAGS="$ORC_CFLAGS -Wall")
if test "x$ORC_CVS" = "xyes"
then
AS_COMPILER_FLAG(-Werror, ORC_CFLAGS="$ORC_CFLAGS -Werror")
fi
AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code])
ORC_CFLAGS="$ORC_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -DORC_ENABLE_UNSTABLE_API"
AC_SUBST(ORC_CFLAGS)
ORC_LIBS="\$(top_builddir)/orc/orc-$ORC_MAJORMINOR.la $LIBM $LIBRT"
AC_SUBST(ORC_LIBS)
pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST(pkgconfigdir)
AC_CONFIG_FILES([
Makefile
doc/Makefile
orc/Makefile
testsuite/Makefile
examples/Makefile
orc-uninstalled.pc
orc.pc
])
AC_OUTPUT
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.
# The name of the module, e.g. 'glib'.
DOC_MODULE=orc
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# The directory containing the source code. Relative to $(srcdir).
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting the functions and macros.
# e.g. DOC_SOURCE_DIR=../../../gtk
DOC_SOURCE_DIR=../orc
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/orc/*.h
CFILE_GLOB=$(top_srcdir)/orc/*.c
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES=orc-stdint.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
INCLUDES=
GTKDOC_LIBS=
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST +=
sync:
cd html && rsync -a . freedesktop.org:/srv/liboil.freedesktop.org/www/documentation/
noinst_PROGRAMS = jit simple
AM_LDFLAGS = $(ORC_LIBS) $(GLIB_LIBS)
AM_CFLAGS = $(ORC_CFLAGS) $(GLIB_CFLAGS)
jit_SOURCES = jit.c
simple_SOURCES = simple.c
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <orc/orcprogram.h>
#define N 19
int16_t src1[N];
int16_t src2[N];
int16_t dest[N];
void test(OrcExecutor *ex);
int
main (int argc, char *argv[])
{
OrcProgram *p;
OrcExecutor *ex;
int s1, s2, d1, offset, shift;
int t1;
orc_init ();
p = orc_program_new ();
d1 = orc_program_add_destination (p, "s16", "d1");
s1 = orc_program_add_source (p, "s16", "s1");
s2 = orc_program_add_source (p, "s16", "s2");
t1 = orc_program_add_temporary (p, "s16", "t1");
offset = orc_program_add_constant (p, "s16", 1, "offset");
shift = orc_program_add_constant (p, "s16", 1, "shift");
orc_program_append (p, "add_s16", t1, s1, s2);
orc_program_append (p, "add_s16", t1, t1, offset);
orc_program_append (p, "rshift_s16", d1, t1, shift);
#if 0
orc_program_append (p, "lshift_s16", d1, s1, shift);
//orc_program_append (p, "sub_s16", t1, t1, shift);
//orc_program_append (p, "mul_s16", d1, s1, s2);
//orc_program_append (p, "_loadi_s16", t1, t1, shift);
#endif
orc_program_compile (p);
if (1) {
int i;
for(i=0;i<N;i++){
src1[i] = rand()&0xf;
src2[i] = rand()&0xf;
}
ex = orc_executor_new (p);
orc_executor_set_n (ex, N-4);
orc_executor_set_array (ex, s1, src1);
orc_executor_set_array (ex, s2, src2);
orc_executor_set_array (ex, d1, dest);
printf("#code exec %p\n", ex->program->code_exec);
orc_executor_run (ex);
//orc_executor_emulate (ex);
for(i=0;i<N;i++){
printf("# %4d %4d %4d %4d\n", src1[i], src2[i], dest[i],
(src1[i] + src2[i] + 1) >> 1);
}
orc_executor_free (ex);
}
orc_program_free (p);
return 0;
}
void
test1 (int16_t *dest, int16_t *src1, int16_t *src2, int n)
{
int i;
int16_t t1, t2;
for(i=0;i<n;i++){
t1 = src1[i] + src2[i];
t2 = t1 + 1;
dest[i] = t2>>1;
}
}
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <orc/orcprogram.h>
#define N 100
int16_t src1[N+4];
int16_t src2[N];
int16_t dest_test[N];
int16_t dest_ref[N];
int16_t dest[N];
void test1(void);
void test2(void);
int
main (int argc, char *argv[])
{
orc_init ();
test1();
exit(0);
}
void
test1(void)
{
OrcProgram *p;
OrcExecutor *ex;
p = orc_program_new_dss ("s16", "s16", "s16");
orc_program_append_str (p, "add_s16", "d1", "s1", "s2");
orc_program_compile (p);
ex = orc_executor_new (p);
orc_executor_set_n (ex, N - 4);
orc_executor_set_array_str (ex, "s1", src1);
orc_executor_set_array_str (ex, "s2", src2);
orc_executor_set_array_str (ex, "d1", dest);
if (1) {
int i;
for(i=0;i<N;i++){
src1[i] = rand()&0xf;
src2[i] = rand()&0xf;
}
orc_executor_run (ex);
//orc_executor_emulate (ex);
for(i=0;i<N;i++){
printf("# %4d %4d %4d %4d\n", src1[i], src2[i], dest[i],
src1[i] + src2[i]);
}
}
orc_executor_free (ex);
orc_program_free (p);
}
void
test2(void)
{
OrcProgram *p;
OrcExecutor *ex;
int s1, s2, s3, s4, d1;
int t1, t2;
int c1, c2, c3;
int n;
p = orc_program_new ();
d1 = orc_program_add_destination (p, "s16", "d1");
s1 = orc_program_add_source (p, "s16", "s1");
s2 = orc_program_add_source (p, "s16", "s2");
s3 = orc_program_add_source (p, "s16", "s3");
s4 = orc_program_add_source (p, "s16", "s4");
c1 = orc_program_add_constant (p, "s16", 3, "c1");
c2 = orc_program_add_constant (p, "s16", 4, "c2");
c3 = orc_program_add_constant (p, "s16", 3, "c3");
t1 = orc_program_add_temporary (p, "s16", "t1");
t2 = orc_program_add_temporary (p, "s16", "t2");
orc_program_append (p, "add_s16", t1, s2, s3);
orc_program_append (p, "add_s16", t2, s1, s4);
orc_program_append (p, "mul_s16", t1, t1, c1);
orc_program_append (p, "sub_s16", t1, t1, t2);
orc_program_append (p, "add_s16", t1, t1, c2);
orc_program_append (p, "rshift_s16", d1, t1, c3);
orc_program_compile (p);
ex = orc_executor_new (p);
orc_executor_set_n (ex, N);
orc_executor_set_array (ex, s1, src1);
orc_executor_set_array (ex, s2, src1 + 1);
orc_executor_set_array (ex, s3, src1 + 2);
orc_executor_set_array (ex, s4, src1 + 3);
for(n=0;n<20;n++) {
int i;
for(i=0;i<n+3;i++){
src1[i] = rand()&0xff;
}
for(i=0;i<n+4;i++){
dest[i] = 0;
}
orc_executor_set_n (ex, n);
orc_executor_set_array (ex, d1, dest_ref);
orc_executor_emulate (ex);
#if 0
for(i=0;i<n;i++){
dest_ref[i] = (3*(src1[i+1]+src1[i+2])-(src1[i]+src1[i+3])+4)>>3;
}
#endif
orc_executor_set_array (ex, d1, dest_test);
orc_executor_run (ex);
for(i=0;i<n+4;i++){
printf("# %d: %4d %4d %4d %c\n", i, src1[i], dest_ref[i], dest_test[i],
(dest_ref[i] == dest_test[i])?' ':'*');
}
}
orc_executor_free (ex);
orc_program_free (p);
}
# -*- mode: makefile -*-
####################################
# Everything below here is generic #
####################################
if GTK_DOC_USE_LIBTOOL
GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
else
GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
endif
# We set GPATH here; this gives us semantics for GNU make
# which are more like other make's VPATH, when it comes to
# whether a source that is a target of one rule is then
# searched for in VPATH/GPATH.
#
GPATH = $(srcdir)
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
EXTRA_DIST = \
$(content_files) \
$(HTML_IMAGES) \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals
REPORT_FILES = \
$(DOC_MODULE)-undocumented.txt \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-unused.txt
CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
if ENABLE_GTK_DOC
all-local: html-build.stamp
else
all-local:
endif
docs: html-build.stamp
#### scan ####
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
@echo 'gtk-doc: Scanning header files'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && \
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
else \
cd $(srcdir) ; \
for i in $(SCANOBJ_FILES) ; do \
test -f $$i || touch $$i ; \
done \
fi
touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### templates ####
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
@echo 'gtk-doc: Rebuilding template files'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
touch tmpl-build.stamp
tmpl.stamp: tmpl-build.stamp
@true
tmpl/*.sgml:
@true
#### xml ####
sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@echo 'gtk-doc: Building XML'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && \
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@true
#### html ####
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@echo 'gtk-doc: Building HTML'
@-chmod -R u+w $(srcdir)
rm -rf $(srcdir)/html
mkdir $(srcdir)/html
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
@echo 'gtk-doc: Fixing cross-references'
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
touch html-build.stamp
##############
clean-local:
rm -f *~ *.bak
rm -rf .libs
distclean-local:
cd $(srcdir) && \
rm -rf xml $(REPORT_FILES) \
$(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
maintainer-clean-local: clean
cd $(srcdir) && rm -rf xml html
install-data-local:
-installfiles=`echo $(srcdir)/html/*`; \
if test "$$installfiles" = '$(srcdir)/html/*'; \
then echo '-- Nothing to install' ; \
else \
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
for i in $$installfiles; do \
echo '-- Installing '$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
done; \
echo '-- Installing $(srcdir)/html/index.sgml' ; \
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
which gtkdoc-rebase >/dev/null && \
gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
fi
uninstall-local:
rm -f $(DESTDIR)$(TARGET_DIR)/*
#
# Require gtk-doc when making dist
#
if ENABLE_GTK_DOC
dist-check-gtkdoc:
else
dist-check-gtkdoc:
@echo "*** gtk-doc must be installed and enabled in order to make dist"
@false
endif
dist-hook: dist-check-gtkdoc dist-hook-local
mkdir $(distdir)/tmpl
mkdir $(distdir)/xml
mkdir $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/xml/*.xml $(distdir)/xml
cp $(srcdir)/html/* $(distdir)/html
-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
cd $(distdir) && rm -f $(DISTCLEANFILES)
-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
.PHONY : dist-hook-local docs
# backported from libtool 1.6 by Paolo Bonzini
# When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
# to be more similar to the libtool 1.6 implementation, which
# uses an m4 loop and m4 case instead of a shell loop. This
# way the CXX/GCJ/F77/RC tests are not always expanded.
# AC_LIBTOOL_TAGS
# ---------------
# tags to enable
AC_DEFUN([AC_LIBTOOL_TAGS],
[m4_define([_LT_TAGS],[$1])
m4_define([_LT_AC_TAGCONFIG], [
if test -f "$ltmain"; then
if test ! -f "${ofile}"; then
AC_MSG_WARN([output file `$ofile' does not exist])
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
else
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
AC_FOREACH([_LT_TAG], _LT_TAGS,
[m4_case(_LT_TAG,
[CXX], [
if test -n "$CXX" && test "X$CXX" != "Xno"; then
AC_LIBTOOL_LANG_CXX_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[F77], [
if test -n "$F77" && test "X$F77" != "Xno"; then
AC_LIBTOOL_LANG_F77_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[GCJ], [
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
AC_LIBTOOL_LANG_GCJ_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[RC], [
if test -n "$RC" && test "X$RC" != "Xno"; then
AC_LIBTOOL_LANG_RC_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
m4_exit(1)])
])
fi
])dnl _LT_AC_TAG_CONFIG
])
dnl as-compiler-flag.m4 0.1.0
dnl autostars m4 macro for detection of compiler flags
dnl David Schleef <ds@schleef.org>
dnl $Id: as-compiler-flag.m4,v 1.1 2004-08-20 22:25:22 ds Exp $
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
dnl Tries to compile with the given CFLAGS.
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
AC_DEFUN([AS_COMPILER_FLAG],
[
AC_MSG_CHECKING([to see if compiler understands $1])
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"