freehdl-0.0.7/0000777000175000017500000000000011175357661010150 500000000000000freehdl-0.0.7/v2cc/0000777000175000017500000000000011175357660011004 500000000000000freehdl-0.0.7/v2cc/gvhdl-local0000644000175000017500000002207710343673064013042 00000000000000#!/usr/bin/perl use Socket; use strict; my $cc = "g++"; my $libtool = "FREEHDL/libtool"; my $libtool_options = "--mode=link"; my $vhdl_source_name = ""; my $source = ""; my $includes = ""; my $cpplibs = "-lm FREEHDL/kernel/libfreehdl-kernel.la FREEHDL/std/libfreehdl-std.la"; my $vhdl_library = ""; # Library the design entity is compiled into my $cpp_options = "-static "; my $vhdl_options = ""; my $no_cpp_compile = 0; my $verbose = 0; my $use_sockets = 0; my $vhdl_libdir = "FREEHDL"; my $freehdl_root_path=""; # set root path of the FreeHDL system sub set_freehdl_root_path { $freehdl_root_path = $ENV{'FREEHDL'}; if ($freehdl_root_path ne "") { return; } # if environment variable is not set then test # each parent directory my $path = "."; while (1) { # test whether $path is a valid path if (not -d "$path/") { die "Could not find FreeHDL root path! Please set environment FREEHDL."; } # is there a file named v2cc.libs in the directory? if (not -f "$path/v2cc.libs") { $path = $path . "/.."; next; } # open file and analyze content open INFILE, "$path/v2cc.libs" or die "Could not read $path/v2cc.libs\n"; my $text = ""; while () { s/\n//g; $text = $text . " " . $_; } my $found = 1; if ($text !~ /std\s*:\s*std/i) { $found = 0; } if ($text !~ /ieee\s*:\s*ieee/i) { $found = 0; } close(INFILE); # return result if freehdl root path was found if ($found == 1) { $freehdl_root_path = $path; return; } # try next path $path = $path . "/.."; } }; sub update { $_ = $_[0]; s/FREEHDL/$freehdl_root_path/g; return $_; } sub execute_cmd { my $cmd = $_[0]; my $label_text = $_[1]; my $out_file = $_[2]; open(COMMAND, "$cmd 2>&1 |"); while () { print $out_file, "$label_text$_"; } return close(COMMAND)? 0 : 256; } # The main program sub main { # determine root path of freehdl installation set_freehdl_root_path; print "gvhdl: FreeHDL root path is '$freehdl_root_path'.\n"; $includes = "-I $freehdl_root_path"; my $MSTREAM; my $PROGRESS_BAR; open(MSTREAM, ">&STDOUT"); open(PROGRESS_BAR, ">/dev/null"); $cpplibs = update($cpplibs); $libtool = update($libtool); $vhdl_libdir = update($vhdl_libdir); my $arg_index = 0; my $do_link = 1; my $create_simulator = 1; my @source_files; my $object_files; while ($arg_index < scalar(@ARGV)) { my $argument = $ARGV[$arg_index]; if ($argument =~ /^\-l/) { die "gvhdl: Missing argument for '-l'!\n" if (++$arg_index >= scalar(@ARGV)); $vhdl_library = "-l " . $ARGV[$arg_index]; } elsif ($argument =~ /^\-C/) { $cc = $ARGV[++$arg_index]; } elsif ($argument =~ /^\-FHDLgui/) { # gvhdl will communiate with is caller via 2 sockets. The socket # file names are generated from the base string passed over as a # argument to option FHDLgui. The actual file names are derived # by appending channel number 0 or 4 to the base name. Channel 0 # is used for printing messages generated during code # generation/compilation/linking while channel 4 is used to # print progress information. my $socket_base_name = $ARGV[++$arg_index]; my $socket_name = $socket_base_name . "0"; socket(MSTREAM, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!"; connect(MSTREAM, sockaddr_un($socket_name)) || die "connect: $!"; my $socket_name = $socket_base_name . "4"; socket(PROGRESS_BAR, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!"; connect(PROGRESS_BAR, sockaddr_un($socket_name)) || die "connect: $!"; $use_sockets = 1; } elsif ($argument =~ /^\-L/) { $vhdl_libdir .= " -L " . $ARGV[++$arg_index]; } elsif ($argument =~ /^\-R/) { $vhdl_options = $vhdl_options . " -R"; } elsif ($argument =~ /^\-g/) { $vhdl_options = $vhdl_options . " -g"; $cpp_options = $cpp_options . " -g"; } elsif ($argument =~ /^\-c/) { $do_link = 0; $create_simulator = 0; $cpp_options = $cpp_options . " -c"; } elsif ($argument =~ /^\-G/) { $cpp_options = $cpp_options . " -g"; } elsif ($argument =~ /^\-v/) { $verbose = 1; } elsif ($argument =~ /^\-V/) { $vhdl_options = $vhdl_options . " -v"; } elsif ($argument =~ /^\-D/) { $vhdl_options = $vhdl_options . " -D"; } elsif ($argument =~ /^\--relaxed-component-visibility/) { $vhdl_options = $vhdl_options . " --relaxed-component-visibility"; } elsif ($argument =~ /^\--libieee/) { $cpplibs .= " " . update ("FREEHDL/ieee/libieee.la"); } elsif ($argument =~ /^\-/) { $cpp_options = $cpp_options . " " . $argument; } else { push @source_files, $argument; } ++$arg_index; } my $steps = scalar(@source_files); if ($no_cpp_compile == 0) { $steps *= 2; } if ($do_link == 1) { $steps += 1; } $steps = int(99 / $steps); my $progress_value = 0; ############################################################## # Create name for main file ############################################################## my $main_file_name; my $main_vhdl_file; if ($create_simulator == 1) { $_ = $source_files [0]; if ($_ =~ /\.vhdl$/) { $main_vhdl_file = $_; } s/\.[^\.]*$/\._main_/i; $main_file_name = $_; } ############################################################## # process each source file ############################################################## foreach $vhdl_source_name (@source_files) { # skip object (*.o) files if ($vhdl_source_name =~ /\.o$/) { $object_files = $object_files . " " . $vhdl_source_name; next; } # skip object (*.a) files if ($vhdl_source_name =~ /\.a$/) { $object_files = $object_files . " " . $vhdl_source_name; next; } ############################################################## # Comiling vhdl -> cc ############################################################## $_ = $vhdl_source_name; s/\.[^\.]*$/\.cc/i; my $out_file_name = $_; my $cmd; if ($create_simulator == 1 && $main_vhdl_file == $vhdl_source_name) { $cmd = "$freehdl_root_path/v2cc/freehdl-v2cc -m $main_file_name.cc -L $vhdl_libdir $vhdl_library $vhdl_options -o $out_file_name $vhdl_source_name"; } else { $cmd = "$freehdl_root_path/v2cc/freehdl-v2cc -L $vhdl_libdir $vhdl_library $vhdl_options -o $out_file_name $vhdl_source_name"; } print MSTREAM "gvhdl: executing '$cmd'\n"; if (execute_cmd ($cmd, "", $MSTREAM)/256 != 0) { print MSTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; ############################################################## # Comiling cc -> o ############################################################## $_ = $out_file_name; s/\.[^\.]*/\.o/i; $object_files .= " " . $_; if ($no_cpp_compile == 0) { my $cmd = "$cc $cpp_options $includes -c $out_file_name"; print MSTREAM "gvhdl:\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Compiling '$out_file_name'...\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "c++: ", $MSTREAM)/256 != 0) { print MSTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; } } ############################################################## # Comiling main cc file -> o ############################################################## if ($create_simulator == 1) { my $out_file_name = $main_file_name . ".cc"; my $cmd = "$cc $cpp_options $includes -c $out_file_name"; print MSTREAM "gvhdl:\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Compiling simulator main file '$out_file_name'...\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "c++: ", $MSTREAM)/256 != 0) { print MSTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; } ############################################################## # link ############################################################## if ($do_link == 1) { $_ = $source_files[0]; s/\.[^\.]*//i; my $target_name = $_; my $cmd = "$libtool $libtool_options $cc $cpp_options $main_file_name.o $object_files $cpplibs -o $target_name"; print MSTREAM "gvhdl: Linking simulator '$target_name'...\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "linker: ", $MSTREAM)/256 != 0) { print $MSTREAM "gvhdl: Linking failed!\n"; die; } print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Simulator '$target_name' created.\n"; print MSTREAM "gvhdl: ================================\n"; print PROGRESS_BAR "99"; } } &main; freehdl-0.0.7/v2cc/Makefile.am0000644000175000017500000000301510361406655012746 00000000000000## -*- makefile -*- ## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -DDEFAULT_V2CC_LIBRARY_DIR=\"$(prefix)/share/freehdl/lib\" GENNODES = $(top_srcdir)/freehdl/freehdl-gennodes GENNODES_FLAGS = -I $(top_srcdir) bin_SCRIPTS = gvhdl dist_noinst_SCRIPTS = gvhdl-local bin_PROGRAMS = freehdl-v2cc noinst_PROGRAMS = test-mapper if MAINTAINER_MODE CHUNK_H = v2cc-chunk.h CHUNK_CC = v2cc-chunk.cc BUILT_SOURCES = v2cc-chunk.h v2cc-chunk.cc # rules for tree generation $(CHUNK_H): %-chunk.h: %-chunk.t $(GENNODES) $(GENNODES) $(GENNODES_FLAGS) header $* $< $@ $(CHUNK_CC): %-chunk.cc: %-chunk.t $(GENNODES) $(GENNODES) $(GENNODES_FLAGS) impl $* $< $@ v2cc-chunk.h v2cc-chunk.cc: $(top_srcdir)/freehdl/fire-chunk.t v2cc-chunk.h v2cc-chunk.cc: $(top_srcdir)/freehdl/vaul-chunk.t endif freehdl_v2cc_SOURCES = v2cc.h v2cc.cc v2cc-chunk.h v2cc-chunk.cc mapping.h \ mapping.cc v2cc-explore.cc v2cc-util.h v2cc-util.cc v2cc-const-fold.cc \ v2cc-decl.cc v2cc-expr.cc v2cc-cdfg-expr.cc v2cc-impl.cc v2cc-acl.cc \ v2cc-qid.cc v2cc-get-type-info.cc v2cc-cdfg-static-expr.cc \ v2cc-cdfg-impl.cc v2cc-optimize.cc freehdl_v2cc_LDADD = ../vaul/libfreehdl-vaul.la ../fire/libfreehdl-fire.la $(GETOPTLIBS) test_mapper_SOURCES = test-mapper.cc mapping.cc mapping.h EXTRA_DIST = v2cc-chunk.t gvhdl.in HACKING.v2cc x.vhdl y.vhdl z.vhdl \ adder.vhdl error.vhdl model.vhdl model4.vhdl model5.vhdl top.vhdl CLEANFILES = *~ DISTCLEANFILES = gvhdl MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES) freehdl-0.0.7/v2cc/Makefile.in0000644000175000017500000005135611175356643012777 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(freehdl_v2cc_SOURCES) $(test_mapper_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ bin_PROGRAMS = freehdl-v2cc$(EXEEXT) noinst_PROGRAMS = test-mapper$(EXEEXT) subdir = v2cc DIST_COMMON = $(dist_noinst_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gvhdl.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = gvhdl am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_freehdl_v2cc_OBJECTS = v2cc.$(OBJEXT) v2cc-chunk.$(OBJEXT) \ mapping.$(OBJEXT) v2cc-explore.$(OBJEXT) v2cc-util.$(OBJEXT) \ v2cc-const-fold.$(OBJEXT) v2cc-decl.$(OBJEXT) \ v2cc-expr.$(OBJEXT) v2cc-cdfg-expr.$(OBJEXT) \ v2cc-impl.$(OBJEXT) v2cc-acl.$(OBJEXT) v2cc-qid.$(OBJEXT) \ v2cc-get-type-info.$(OBJEXT) v2cc-cdfg-static-expr.$(OBJEXT) \ v2cc-cdfg-impl.$(OBJEXT) v2cc-optimize.$(OBJEXT) freehdl_v2cc_OBJECTS = $(am_freehdl_v2cc_OBJECTS) am__DEPENDENCIES_1 = freehdl_v2cc_DEPENDENCIES = ../vaul/libfreehdl-vaul.la \ ../fire/libfreehdl-fire.la $(am__DEPENDENCIES_1) am_test_mapper_OBJECTS = test-mapper.$(OBJEXT) mapping.$(OBJEXT) test_mapper_OBJECTS = $(am_test_mapper_OBJECTS) test_mapper_LDADD = $(LDADD) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mapping.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test-mapper.Po ./$(DEPDIR)/v2cc-acl.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-cdfg-expr.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-cdfg-impl.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-cdfg-static-expr.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-chunk.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-const-fold.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-decl.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-explore.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-expr.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-get-type-info.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-impl.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-optimize.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc-qid.Po ./$(DEPDIR)/v2cc-util.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/v2cc.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(freehdl_v2cc_SOURCES) $(test_mapper_SOURCES) DIST_SOURCES = $(freehdl_v2cc_SOURCES) $(test_mapper_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETOPTLIBS = @GETOPTLIBS@ GREP = @GREP@ GUILE = @GUILE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKGCONFIG = @PKGCONFIG@ RANLIB = @RANLIB@ REGEXDEFS = @REGEXDEFS@ REGEXLIBS = @REGEXLIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_LIBTOOL = @SYSTEM_LIBTOOL@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_SYSTEM_LIBTOOL = @ac_ct_SYSTEM_LIBTOOL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ INCLUDES = -I$(top_srcdir) -DDEFAULT_V2CC_LIBRARY_DIR=\"$(prefix)/share/freehdl/lib\" GENNODES = $(top_srcdir)/freehdl/freehdl-gennodes GENNODES_FLAGS = -I $(top_srcdir) bin_SCRIPTS = gvhdl dist_noinst_SCRIPTS = gvhdl-local @MAINTAINER_MODE_TRUE@CHUNK_H = v2cc-chunk.h @MAINTAINER_MODE_TRUE@CHUNK_CC = v2cc-chunk.cc @MAINTAINER_MODE_TRUE@BUILT_SOURCES = v2cc-chunk.h v2cc-chunk.cc freehdl_v2cc_SOURCES = v2cc.h v2cc.cc v2cc-chunk.h v2cc-chunk.cc mapping.h \ mapping.cc v2cc-explore.cc v2cc-util.h v2cc-util.cc v2cc-const-fold.cc \ v2cc-decl.cc v2cc-expr.cc v2cc-cdfg-expr.cc v2cc-impl.cc v2cc-acl.cc \ v2cc-qid.cc v2cc-get-type-info.cc v2cc-cdfg-static-expr.cc \ v2cc-cdfg-impl.cc v2cc-optimize.cc freehdl_v2cc_LDADD = ../vaul/libfreehdl-vaul.la ../fire/libfreehdl-fire.la $(GETOPTLIBS) test_mapper_SOURCES = test-mapper.cc mapping.cc mapping.h EXTRA_DIST = v2cc-chunk.t gvhdl.in HACKING.v2cc x.vhdl y.vhdl z.vhdl \ adder.vhdl error.vhdl model.vhdl model4.vhdl model5.vhdl top.vhdl CLEANFILES = *~ DISTCLEANFILES = gvhdl MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu v2cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu v2cc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh gvhdl: $(top_builddir)/config.status $(srcdir)/gvhdl.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done freehdl-v2cc$(EXEEXT): $(freehdl_v2cc_OBJECTS) $(freehdl_v2cc_DEPENDENCIES) @rm -f freehdl-v2cc$(EXEEXT) $(CXXLINK) $(freehdl_v2cc_LDFLAGS) $(freehdl_v2cc_OBJECTS) $(freehdl_v2cc_LDADD) $(LIBS) test-mapper$(EXEEXT): $(test_mapper_OBJECTS) $(test_mapper_DEPENDENCIES) @rm -f test-mapper$(EXEEXT) $(CXXLINK) $(test_mapper_LDFLAGS) $(test_mapper_OBJECTS) $(test_mapper_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-acl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-cdfg-expr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-cdfg-impl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-cdfg-static-expr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-chunk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-const-fold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-decl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-explore.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-expr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-get-type-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-impl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-optimize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-qid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v2cc.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am # rules for tree generation @MAINTAINER_MODE_TRUE@$(CHUNK_H): %-chunk.h: %-chunk.t $(GENNODES) @MAINTAINER_MODE_TRUE@ $(GENNODES) $(GENNODES_FLAGS) header $* $< $@ @MAINTAINER_MODE_TRUE@$(CHUNK_CC): %-chunk.cc: %-chunk.t $(GENNODES) @MAINTAINER_MODE_TRUE@ $(GENNODES) $(GENNODES_FLAGS) impl $* $< $@ @MAINTAINER_MODE_TRUE@v2cc-chunk.h v2cc-chunk.cc: $(top_srcdir)/freehdl/fire-chunk.t @MAINTAINER_MODE_TRUE@v2cc-chunk.h v2cc-chunk.cc: $(top_srcdir)/freehdl/vaul-chunk.t # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freehdl-0.0.7/v2cc/gvhdl.in0000644000175000017500000002247511173114315012350 00000000000000#!@PERL@ # -*- perl -*- use Socket; use strict; my $cc = "@CXX@"; my $libtool = "@SYSTEM_LIBTOOL@"; my $libtool_options = "--mode=link"; my $vhdl_source_name = ""; my $source = ""; my $includes = ""; my $cpplibs = "-lm FREEHDL/lib/libfreehdl-kernel.la FREEHDL/lib/libfreehdl-std.la"; my $vhdl_library = ""; # Library the design entity is compiled into my $cpp_options = ""; my $vhdl_options = ""; my $no_cpp_compile = 0; my $verbose = 0; my $use_sockets = 0; my $vhdl_libdir = "FREEHDL/share/freehdl/lib"; my $freehdl_root_path= ""; # set root path of the FreeHDL system sub set_freehdl_root_path { if (not -f "@prefix@/bin/freehdl-v2cc") { $freehdl_root_path = $ENV{'FREEHDL'}; if ($freehdl_root_path ne "") { return; } } else { $freehdl_root_path = "@prefix@"; return; } # if environment variable is not set then test # each parent directory my $path = "@prefix@/share/freehdl/lib"; while (1) { # test whether $path is a valid path if (not -d "$path/") { die "Could not find FreeHDL root path! Please set environment FREEHDL."; } # is there a file named v2cc.libs in the directory? if (not -f "$path/v2cc.libs") { $path = $path . "/.."; next; } # open file and analyze content open INFILE, "$path/v2cc.libs" or die "Could not read $path/v2cc.libs\n"; my $text = ""; while () { s/\n//g; $text = $text . " " . $_; } my $found = 1; if ($text !~ /std\s*:\s*std/i) { $found = 0; } if ($text !~ /ieee\s*:\s*ieee/i) { $found = 0; } close(INFILE); # return result if freehdl root path was found if ($found == 1) { $freehdl_root_path = $path; return; } # try next path $path = $path . "/.."; } }; sub update { $_ = $_[0]; s/FREEHDL/$freehdl_root_path/g; return $_; } sub execute_cmd { my $cmd = $_[0]; my $label_text = $_[1]; my $out_file = $_[2]; open(COMMAND, "$cmd 2>&1 |"); while () { print $out_file, "$label_text$_"; } return close(COMMAND)? 0 : 256; } # The main program sub main { # determine root path of freehdl installation set_freehdl_root_path; print "gvhdl: FreeHDL root path is '$freehdl_root_path'.\n"; $includes = "-I $freehdl_root_path/include"; my $MSTREAM; my $ESTREAM; my $PROGRESS_BAR; open(MSTREAM, ">&STDOUT"); open(ESTREAM, ">&STDERR"); open(PROGRESS_BAR, ">/dev/null"); $cpplibs = update($cpplibs); $libtool = update($libtool); $vhdl_libdir = update($vhdl_libdir); my $arg_index = 0; my $do_link = 1; my $create_simulator = 1; my @source_files; my $object_files; while ($arg_index < scalar(@ARGV)) { my $argument = $ARGV[$arg_index]; if ($argument =~ /^\-l/) { die "gvhdl: Missing argument for '-l'!\n" if (++$arg_index >= scalar(@ARGV)); $vhdl_library = "-l " . $ARGV[$arg_index]; } elsif ($argument =~ /^\-C/) { $cc = $ARGV[++$arg_index]; } elsif ($argument =~ /^\-FHDLgui/) { # gvhdl will communiate with is caller via 2 sockets. The socket # file names are generated from the base string passed over as a # argument to option FHDLgui. The actual file names are derived # by appending channel number 0 or 4 to the base name. Channel 0 # is used for printing messages generated during code # generation/compilation/linking while channel 4 is used to # print progress information. my $socket_base_name = $ARGV[++$arg_index]; my $socket_name = $socket_base_name . "0"; socket(MSTREAM, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!"; connect(MSTREAM, sockaddr_un($socket_name)) || die "connect: $!"; $ESTREAM = $MSTREAM; my $socket_name = $socket_base_name . "4"; socket(PROGRESS_BAR, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!"; connect(PROGRESS_BAR, sockaddr_un($socket_name)) || die "connect: $!"; $use_sockets = 1; } elsif ($argument =~ /^\-L/) { $vhdl_libdir .= " -L " . $ARGV[++$arg_index]; } elsif ($argument =~ /^\-R/) { $vhdl_options = $vhdl_options . " -R"; } elsif ($argument =~ /^\-g/) { $vhdl_options = $vhdl_options . " -g"; $cpp_options = $cpp_options . " -g"; } elsif ($argument =~ /^\-c/) { $do_link = 0; $create_simulator = 0; $cpp_options = $cpp_options . " -c"; } elsif ($argument =~ /^\-G/) { $cpp_options = $cpp_options . " -g"; } elsif ($argument =~ /^\-v/) { $verbose = 1; } elsif ($argument =~ /^\-V/) { $vhdl_options = $vhdl_options . " -v"; } elsif ($argument =~ /^\-D/) { $vhdl_options = $vhdl_options . " -D"; } elsif ($argument =~ /^\--relaxed-component-visibility/) { $vhdl_options = $vhdl_options . " --relaxed-component-visibility"; } elsif ($argument =~ /^\--libieee/) { $cpplibs .= " " . update ("FREEHDL/lib/freehdl/libieee.la"); } elsif ($argument =~ /^\-/) { $cpp_options = $cpp_options . " " . $argument; } else { push @source_files, $argument; } ++$arg_index; } my $steps = scalar(@source_files); if ($no_cpp_compile == 0) { $steps *= 2; } if ($do_link == 1) { $steps += 1; } $steps = int(99 / $steps); my $progress_value = 0; ############################################################## # Create name for main file ############################################################## my $main_file_name; my $main_vhdl_file; if ($create_simulator == 1) { $_ = $source_files [0]; if ($_ =~ /\.vhdl$/) { $main_vhdl_file = $_; } s/\.[^\.]*$/\._main_/i; $main_file_name = $_; } ############################################################## # process each source file ############################################################## foreach $vhdl_source_name (@source_files) { # skip object (*.o) files if ($vhdl_source_name =~ /\.o$/) { $object_files = $object_files . " " . $vhdl_source_name; next; } # skip object (*.a) files if ($vhdl_source_name =~ /\.a$/) { $object_files = $object_files . " " . $vhdl_source_name; next; } ############################################################## # Comiling vhdl -> cc ############################################################## $_ = $vhdl_source_name; s/\.[^\.]*$/\.cc/i; my $out_file_name = $_; my $cmd; if ($create_simulator == 1 && $main_vhdl_file == $vhdl_source_name) { $cmd = "$freehdl_root_path/bin/freehdl-v2cc -m $main_file_name.cc -L $vhdl_libdir $vhdl_library $vhdl_options -o $out_file_name $vhdl_source_name"; } else { $cmd = "$freehdl_root_path/bin/freehdl-v2cc -L $vhdl_libdir $vhdl_library $vhdl_options -o $out_file_name $vhdl_source_name"; } print MSTREAM "gvhdl: executing '$cmd'\n"; if (execute_cmd ($cmd, "", $MSTREAM)/256 != 0) { print ESTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; ############################################################## # Comiling cc -> o ############################################################## $_ = $out_file_name; s/\.[^\.]*/\.o/i; $object_files .= " " . $_; if ($no_cpp_compile == 0) { my $cmd = "$cc $cpp_options $includes -c $out_file_name"; print MSTREAM "gvhdl:\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Compiling '$out_file_name'...\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "c++: ", $MSTREAM)/256 != 0) { print ESTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; } } ############################################################## # Comiling main cc file -> o ############################################################## if ($create_simulator == 1) { my $out_file_name = $main_file_name . ".cc"; my $cmd = "$cc $cpp_options $includes -c $out_file_name"; print MSTREAM "gvhdl:\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Compiling simulator main file '$out_file_name'...\n"; print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "c++: ", $MSTREAM)/256 != 0) { print ESTREAM "gvhdl: Compilation failed!\n"; print PROGRESS_BAR "99"; die; } $progress_value = int($progress_value + $steps); print PROGRESS_BAR $progress_value; } ############################################################## # link ############################################################## if ($do_link == 1) { $_ = $source_files[0]; s/\.[^\.]*//i; my $target_name = $_; my $cmd = "$libtool $libtool_options $cc $cpp_options $main_file_name.o $object_files $cpplibs -o $target_name"; print MSTREAM "gvhdl: Linking simulator '$target_name'...\n"; print MSTREAM "gvhdl: $cmd\n"; if (execute_cmd ($cmd, "linker: ", $MSTREAM)/256 != 0) { print ESTREAM "gvhdl: Linking failed!\n"; die; } print MSTREAM "gvhdl: ================================\n"; print MSTREAM "gvhdl: Simulator '$target_name' created.\n"; print MSTREAM "gvhdl: ================================\n"; print PROGRESS_BAR "99"; rmdir ".libs"; } } &main; freehdl-0.0.7/v2cc/ChangeLog0000644000175000017500000005505111173120614012461 000000000000002009-04-20 Stefan Jahn * gvhdl.in (main): Using ESTREAM to output error messages on STDERR. 2008-02-15 Stefan Jahn * gvhdl.in: Removed freehdl-libtool dependency, using system libtool. * v2cc-util.cc: Fixed some compile issues with the g++ 4.3 version. 2007-10-23 Stefan Jahn * v2cc-util.cc: Loads of changes in many files to avoid the g++ 4.2 warning: "deprecated conversion from string constant to 'char*'". 2005-12-14 Stefan Jahn * v2cc.cc: Surrounded #include with a HAVE_MALLOC_H wherever needed. For MacOS systems. 2004-11-29 Edwin Naroska * v2cc-expr.cc (init_array_operator_macros): names of some array operators corrected. * gvhdl: search path for includes is now set correctly. * v2cc-decl.cc (m_emit_hdr): problem with arrays, where an element is an array subtype, fixed. * v2cc-impl.cc: (emit_decls_init_item): problem with alias fixed. * v2cc-expr.cc: (init_user_operator_names): macros for shift operators added. * v2cc-expr.cc: (init_array_operator_macros): macros for shift operators added. 2004-11-18 Edwin Naroska * v2cc.cc (emit): code to check for overwritten library units added. 2004-11-16 Edwin Naroska * v2cc-impl.cc (emit_impl): return in procedures were not handled correctly. * v2cc-impl.cc (emit_impl): problem with loops fixed. Now, a counter is used to count the number of loop iterations. 2004-11-09 Edwin Naroska * v2cc-impl.cc (emit_impl): problem with enumeration loops fixed. 2004-7-26 Edwin Naroska * gvhdl: libtool is now executed with option "--mode=link". 2004-7-22 Edwin Naroska * v2cc.cc (main): Name of vhdl source file was not correctly determined in case of CDFG code shall be generated. 2004-7-21 Edwin Naroska * v2cc-explore.cc (explore_and_check): The base type and the resolution function were not checked for each subtype. Problem fixed. 2004-7-20 Edwin Naroska * v2cc-decl.cc (make_absolute): getcwd was called with the first parameter set to NULL. According to the man pages this is not permitted. Fixed. 2004-04-28 Marius Vollmer * v2cc-chunk.t (emit_impl), v2cc-impl.cc (m_emit_impl): Added IIR_RecordSubtype. 2004-2-5 Edwin Naroska * v2cc-util.cc (get_combined_static_region): problem with incorrect combined static region fixed. * v2cc-impl.cc (m_emit_info_init): problem with multi-dimensional arrays fixed. * v2cc-get-type-info.cc (m_get_type_info_obj): problem with multi-dimensional arrays fixed. 2004-2-4 Edwin Naroska * v2cc-explore.cc (m_check_expression): static declarative region for plain function call expressions is set to current active declarative region. * v2cc-util.cc (create_region_list): the predecessor region of an architecture is the corresponding entity declaration. * v2cc-const-fold.cc (m_constant_fold): bug in function to calculate power fixed. * v2cc-impl.cc (m_emit_impl): problem with report/assert statements that do not print any message string fixed. 2003-12-20 Edwin Naroska * v2cc-impl.cc (emit_plain_subprogram_impl): problem with composite inout subprogram parameters fixed. 2003-12-12 Edwin Naroska * v2cc-delc.cc (m_emit_hdr): typo in generated code fixed. * v2cc-explore.cc (m_explore_and_check): error message is generated if initial value of an object declared in a concurrent declarative region contains signals. * v2cc-chunk.t, v2cc-explore.cc (m_get_context): new generic methods added to handle get_context calls on IIR_AttrTypeFunc, IIR_AttrTypeValue and IIR_AttrArrayFunc. * v2cc-expr.cc (m_emit_expr): additional casting to target type is now generated in case of predefined operators / and * where type of left and right operand is different. 2003-12-12 Edwin Naroska * v2cc-util.hh, v2cc.h, v2cc-const-fold.cc, v2cc-expr.cc: handling of literals (integer, reals, array literals) modified. Now, for plain real literals (with default base) the original string (without '_' separators) is stored along with the converted double number. If this string is available, it is printed to the cc file. Otherwise, the double value is printed with max precision. In order to do so, class StaticDataType has been re-written. * v2cc-qid.cc (m_qid): generic method should return "vhdlaccess" as VHDL pointer type. 2003-08-01 Edwin Naroska * v2cc-util.hh, v2cc-explore.cc, v2cc-const-fold.cc (lint_abs): function to calculate absolute value for along long int parameter. Can be replaced with library function llabs as soon as it compiles with gcc3. 2003-07-27 Edwin Naroska * v2cc-expr.cc (m_emit_expr): support for attributes image and value added. 2003-07-20 Edwin Naroska * v2cc-impl.cc (m_emit_impl): bug in generated code for "delayed" subprograms fixed. 2003-07-18 Edwin Naroska * v2cc-decl.cc (emit_delayed_procedure_constructor): problem with signal parameters of delayed procedures (i.e., procedure which contain wait statements fixed). 2003-07-08 Edwin Naroska * v2cc-impl.cc, v2cc-decl.cc: added support for procedures with wait statements. 2003-06-13 Edwin Naroska * v2cc-explore.cc: explore_and_check now checks out whether a process with sensitivity list calls procedures that contain waits. 2003-04-10 Edwin Naroska * v2cc-util.h (calculate_pow): new function for arguments (double, double) added. * v2cc-expr.cc (init_operator_macros): translated operator name for predefined operation abs renamed to op_abs. * v2cc-explore.cc (m_get_context): did not return a pointer to an access descriptor if applied on an function call. Fixed. 2003-04-09 Marius Vollmer * v2cc-util.cc: Removed default values for parameters in function definitions. * v2cc-explore.cc (m_check_expression): Added cast so that the correct min version is selected. (check_association): Added cast for unknown reasons, but it works. * mapping.cc, v2cc-explore.cc, v2cc-util.h, v2cc.cc, v2cc.h: Replaced deprecated headers with modern ones. Namespace games for GCC 3. 2003-02-10 Edwin Naroska * v2cc-cdfg-expr.cc (m_cdfg_emit_expr): additional quotes in lisp code removed. 2003-02-06 Edwin Naroska * v2cc-cdfg-impl.cc (cdfg_emit_impl): added check for empty sequence_of_statements slot. 2003-02-04 Edwin Naroska * v2cc-impl.cc (emit_generic_map): problem with actual subtypes that point to "universal integer". Now, formal subtype is used instead as it will never point to "universal integer". * v2cc-impl.cc (emit_signal_map): actuals of type IR_OPEN_EXPRESSION were not handled correctly. * v2cc-delc.cc (cleanup_external_declaration_list): new function to remove entries from the external declaration list that should not be included into the output cc file. This function is called after the external_declaration list is generated. * v2cc-impl.cc (m_emit_impl): in generated C++ code VHDL labels were printed. Actually, this is not necessary. 2003-02-03 Edwin Naroska * v2cc-explore.cc (explore_and_check): information about signal parameters of subprogram calls were not recorded correctly. 2003-01-03 Edwin Naroska * v2cc-explore.cc (explore_and_check): function extended to check individual associations for generics. 2003-01-02 Edwin Naroska * v2cc-explore.cc (check_association): function extended to check individual associations. * v2cc.h (StaticRangeDescriptor_lint_Less): compare class extended so that it now also returns true for a < b (a , b are ranges) if the lower bound of a and b are the same but the higher bound of a is less then that of b. * v2cc.c (RangeDescriptor::rangedes_to_???): methods return invalid valid vector. Fixed. 2002-10-02 Edwin Naroska * nearly all files affected: new structure StaticRangeDescriptor added. method rangedes_to_??? modified so that they return a StaticRangeDescriptor. 2002-02-13 Edwin Naroska * v2cc-cdfg-expr.cc: calls to emit_expr replaced with cdfg_emit_expr. * v2cc-impl.cc (emit_signal_map) : Now also handles individual association of formals. 2002-02-12 Edwin Naroska * v2cc-impl.cc (emit_signal_map_pars) : New, function determines parameter string which is passed over to signal_map during elaboration. Calls to get_object function replaced by calls to generic function get_context. * v2cc-impl.cc (emit_signal_map) : Now also handles individual association of formals. 2002-01-31 Edwin Naroska * v2cc-util.h (get_parent_declarative_region) : New, function determines parent declarative region of a given region. * v2cc-explore.cc (max_inner): problem with finding parent region of an entity declaration fixed. 2001-12-16 Marius Vollmer * v2cc-decl.cc (emit_subprogram_prototype): Handle IR_FILE_INTERFACE_DECLARATIONs like IR_VARIABLE_INTERFACE_DECLARATIONs instead of signaling an error. * v2cc-impl.cc (emit_subprogram_associations): Removed unused clause for IR_FILE_INTERFACE_DECLARATIONs. * v2cc.cc (mypool::get): Only output dependency when design unit has been read successfully. (main): Only output generated code when there have been no errors. 2001-12-15 Edwin Naroska * v2cc-impl.cc (m_emit_impl::IIR_ProcessStatement): prevent process constructor from adding signals more than once to the sensitivity list. 2001-12-07 Edwin Naroska * v2cc-const-fold.cc (m_constant_fold): generic function constant_fold removed for type pIIR_EntityDeclaration (not used). 2001-11-14 Edwin Naroska * v2cc-impl.cc (get_object): interface variable "or" renamed to "oref" ("or" is a keyword). 2001-11-01 Marius Vollmer * v2cc-impl.cc (get_object, emit_signal_map): New. (emit_component_instantiation): Use it. 2001-10-30 Edwin Naroska * v2cc-expr.cc (m_emit_expr): bug in type conversion fixed (a floating point value must be rounded to the nearest integer when it is converted to an integer). 2001-10-24 Edwin Naroska * v2cc.cc: option "allow-invisible-default-bindings-from-work" changed to "relaxed-component-visibility". 2001-10-21 Marius Vollmer * v2cc-decl.cc (emit_init_func): New, emits common part of init functions and also calls init functions of units that the current one depends on. (m_emit_decl:IIR_PackageDeclaration, m_emit_decl:IIR_PackageBodyDeclaration, m_emit_decl:IIR_EntityDeclaration, m_emit_decl:IIR_ArchitectureDeclaration, m_emit_decl:IIR_ConfigurationDeclaration): Use it. * v2cc-const-fold.cc (m_constant_fold:IIR_AttrTypeFunc): Check base type of prefix instead of prefix itself when determing what kind of type it is. 2001-10-08 Marius Vollmer * v2cc.cc: Only log VHDL files read and design units emitted when being verbose. * v2cc-qid.cc (m_qid:IIR_TypeDeclaration): Add access prefix when the INFO object should be returned. * v2cc-impl.cc (emit_component_instantiation): Correct change from 2001-10-04. Handle "open" associations by using the appropriate signal_map function. (emit_concurrent_statement_constructors): Do not prepend a access prefix to the loop variable name for generate statements. * v2cc-chunk.t (pIIR_Root, pIIR_Expression, pIIR_InterfaceList, pIIR_DeclarativeRegion, pIIR_DeclarationList, pIIR_SubtypeDeclaration, pV2CC_ImplicitSubtypeDeclaration, pV2CC_ImplicitInterfaceSubtypeDeclaration): Removed. Replaced all uses with the corresponding node types. Using a ctype instead of a node type fools the garbage collector. Ctypes are not traced. * v2cc-decl.cc (m_emit_decl): Also check and explore the external declarations of IIR_LibraryUnits. Without this, the extended_interface_declarations of subprograms are not computed and the prototype is wrong, for example. 2001-10-04 Marius Vollmer * v2cc-impl.cc (emit_component_instantiation): Handle "open" associations by passing NULL to signal_map. Probably not correct. * v2cc-explore.cc (max_inner): New. (m_explore_and_check:IIR_DeclarationList): For a constant declaration, determine static_declarative_region by also considering the subtype in addition to the initial value. 2001-10-03 Marius Vollmer * v2cc-explore.cc (m_explore_and_check:IIR_ComponentInstantiationStatement): Commented out check for default binding. * v2cc-impl.cc (emit_component_instantiation): Handle instantiation of configurations and components without default bindings. * v2cc-decl.cc, v2cc-explore.cc, v2cc.h (decl_pointer_bool_map, decl_flag_list): Renamed decl_pointer_bool_map to decl_flag_list and made it a list of pairs. It needs to be ordered, but `map's are not. Changed all uses. * v2cc-decl.cc, v2cc-explore.cc, v2cc-util.h (external_decls_map, external_decls_list): Renamed former to latter. Changed all uses. * v2cc-util.cc (find_decl_in_list): New. (merge:IIR_Type): Use it. Also, append new types to the end of the list. (merge:IIR_Type): Likewise, for declarations. Also, merge the subtype of object declarations. 2001-09-30 Marius Vollmer * v2cc-decl.cc (make_absolute): Insert a `/' between the cwd and the file name. * v2cc-impl.cc (m_emit_impl:IIR_ScalarSubtype): Emit initialization code for the the static tables of a primary physical subtype. * v2cc-expr.cc (m_emit_expr:IIR_RecordReference): Emit ".value()" instead fo ".data" to get at the record elements. * v2cc-decl.cc (emit_external_decls): Do not use `get_design_file_name', it is not reliable. Use `get_source_file_name' instead. (m_emit_hdr:IIR_ScalarSubtype): Emit unit and scale tables for the primary subtype of a physical type as static members of the type info structure. 2001-09-29 Marius Vollmer * v2cc-const-fold.cc (m_constant_fold:IIR_PhysicalType): The primary unit has a NULL multiplier, don't fold it. (m_constant_fold:IIR_AbstractLiteralExpression): Also handle floating point literals. * v2cc-expr.cc (m_emit_expr:IIR_AbstractLiteralExpression): Handle constant folded integer and floating point literals. This ensures that VHDL literals are properly translated to C++ literals. 2001-09-26 Edwin Naroska * v2cc-util.cc: function check_assignment changed to function check_for_target_type. This function now checks whether an expression matches a specific type. Calls to check_assignment has been modified to match the new function prototype. * v2cc-explore.cc: generic functions to check record aggregates added. * v2cc-const-fold.cc: constant folding for records added. 2001-09-25 Edwin Naroska * v2cc-explore.cc: problem with static_declarative_region - not set correctly in some cases - fixed. 2001-09-23 Marius Vollmer * v2cc-util.cc (string_to_ulint): Make `result' a reference parameter. (string_to_li): Check for and pass over final '#' in based literals. (string_to_d): Likewise. * v2cc.h (mypool): Added dependencies_file member. * v2cc.c (mypool::get): When dependencies_file is set, write all read files to it. (main): Handle new "--depend" option. Use strdup when storing away the generated_cc_file_name. * v2cc-chunk.t, v2cc-explore.cc (get_static_level): Only add methods for IIR_Type and IIR_Expression. Static level handling is now done by the front end. 2001-09-17 Marius Vollmer * v2cc-util.cc (merge): Do not merge sub-types of types that are already found in the map. (check_assignment): Handle records by ignoring them. * v2cc-impl.cc (m_emit_impl:IIR_WaitStatement): Assert that the filter operation for V2cc_Implicitsignaldeclaration_Waitfor did not return an empty list. * v2cc-expr.cc (m_emit_expr:IIR_AttrSigFunc): Handle `last_event' attribute. There is no support from the kernel yet, however. * v2cc-explore.cc (m_explore_and_check:IIR_SubprogramDeclaration): Add V2cc_Implicitsignaldeclaration_Waitfor nodes to the extended_declarations list of the IIR_SubprogramDeclaration node. (m_explore_and_check:IIR_RecordType): Do not set the static_declarative_region of the record type to anything other than the RootDeclarativeRegion, yet. It wouldn't work but some record types can be handled on the root level although their element types are not locally static. (m_get_context:IIR_AccessReference): Return the value returned by the `get_context' of the `access' expression. (m_get_static_level:IIR_RecordSubtype, m_get_static_level:IIR_RecordType): New. (m_get_static_level:IIR_AccessType): Always return IR_LOCALLY_STATIC, as per LRM. * v2cc-decl.cc (emit_subprogram_prototype): Handle V2CC_ImplicitSignalDeclaration_WaitFor objects by giving them a type of "enumeration". * v2cc-const-fold.cc (m_constant_fold:IIR_PhysicalLiteral): Allow inaccuracies when scaling the unit by a floating number. * v2cc-chunk.t (get_static_level): Added methods for IIR_RecordType and IIR_RecordSubtype. 2001-09-11 Marius Vollmer * v2cc-explore.cc (m_explore_and_check:IIR_RecordType): Put it into the right static_declarative_region, depending on where the types of its elements are. * v2cc-impl.cc (m_emit_impl:IIR_RecordType, m_emit_info_init:IIR_RecordType): Initialize TYPE array via a function to avoid implicit global constructors. * v2cc-util.cc (nid): Handle IIR_ElementDeclarations by giving them an "M". (merge): Handle IIR_RecordTypes by also merging their element types. * v2cc-impl.cc (emit_concurrent_statement_constructors): Emit an additional ",level" for constructors of `if' generate statements. * v2cc-const-fold.cc (m_constant_fold): Handle constants initialized with a array literal. * v2cc-impl.cc, v2cc-get-type-info.cc, v2cc-explore.cc, v2cc-decl.cc, v2cc-chunk.t (emit_hdr, emit_impl, emit_info_init, explore_and_check, get_type_info): Added IIR_RecordType. (get_acl): Added IIR_RecordReference. Added appropriate method implementations for the above. * v2cc-expr.cc (m_emit_expr:IIR_RecordReference): Emit access to members of "data" instead of direct members. (m_emit_expr:IIR_RecordAggregate): Emit valid code instead of pseudo code. 2001-09-05 Marius Vollmer * v2cc.cc: Use new vaul_parser_options instead of parser flags. (main): Use getopt_long instead of getopt. Added first long option "allow-invisible-default-bindings-from-work". 2001-08-10 Edwin Naroska * v2cc-explore.cc, v2cc-impl.cc: problem with empty loop bodies and empty case alternatives fixed 2001-08-09 Edwin Naroska * v2cc.cc: bug constant folding of range attribute 'reverse_range fixed 2001-08-01 Edwin Naroska * v2cc-const-fold.cc: bug in constant folding of physical literal constants fixed 2001-06-05 Edwin Naroska * v2cc-explore.cc: types and initial values of component declarations are analyzed 2001-04-03 Edwin Naroska * v2cc-cdfg-expr.cc, v2cc-cdfg-static-expr.cc, v2cc-cdfg-impl.cc: new files needed to support CDFG (control data flow graph) generation 2001-03-29 Edwin Naroska * v2cc-util.cc: function range_to_length fixed 2001-02-27 Edwin Naroska * v2cc-impl.cc: for loop bug fixed 2001-02-21 Edwin Naroska * v2cc-util.cc: missing return statements in get_basic_type added 2001-02-20 Edwin Naroska * v2cc-decl.cc: declaration in package std.textio are now handled like normal package declarations 2001-02-15 Edwin Naroska * v2cc-decl.cc: implicit function "endfile" is now declared correctly 2001-02-08 Edwin Naroska * v2cc-impl.cc: support for component instantiation via default binding added 2001-02-05 Edwin Naroska * v2cc-impl.cc, v2cc-decl.cc: implicit integer, floating point, physical subtypes implemented. 2001-01-22 Marius Vollmer * v2cc-chunk.t (IR_StaticLevel): Removed. 2001-01-25 Marius Vollmer * test-mapper.cc: Include to get a prototype for `exit'. 2001-01-21 Marius Vollmer * v2cc-chunk.t, v2cc-decl.cc, v2cc-explore.cc, v2cc.cc: Replaced VAUL_PredefOp with IIR_PredefinedFunctionDeclaration everywhere. 2001-01-06 Marius Vollmer * v2cc-explore.cc, v2cc-impl.cc: Adapted to changed node slots. 2000-12-21 Marius Vollmer * v2cc-util.cc (plot_rstack): Arbitrarily return 0. Replaced "or" with "mor" throughout. "or" seems to be a keyword in C++. Thanks to Philippe Reynes! * v2cc-decl.cc, v2cc-impl.cc: Name space hygiene. 2000-09-22 Marius Vollmer * v2cc.cc (mypool::get): Pass VAUL_PARSER_SKIP_BODIES flag into design file. * mapping.cc: Commented out debugging messages. 2000-08-10 Marius Vollmer * Reorganized names of Attribute nodes. Changed all references. 2000-03-31 Marius Vollmer * v2cc.cc (dry_run): New. (main): Set dry_run when passed the "-n" option. (emit): Do not emit code when dry_run is true. 2000-02-07 Marius Vollmer * Makefile.am, v2cc-chunk.t: Get vaul-chunk.t from freehdl/. Pass suitable "-I" option to gen-nodes. freehdl-0.0.7/v2cc/v2cc.h0000644000175000017500000007000510406477757011736 00000000000000#ifndef V2CC_HEADER #define V2CC_HEADER using namespace std; #include #include "mapping.h" // **************************************************************************** // * Definitons related to function qid and nid // **************************************************************************** // id_type is used to control the output of the qid and nid function. #define DEFAULT 0x1 #define SIGNAL 0x2 #define READER 0x4 #define DRIVER 0x8 #define TYPE 0x10 #define INFO 0x20 #define BARE 0x40 #define LIBRARY 0x80 #define ALIAS 0x100 #define ARCHREF 0x2 // object access shall look like "arch->..." #define DEREF 0x4 // object access shall look like "*..." #define NO_PREFIX 0x8 struct id_type { int obj; int acc; id_type (int o = DEFAULT, int a = DEFAULT) { obj = o; acc = a; } int object () const { return obj; } int access () const { return acc; } }; // **************************************************************************** // * Definition of template flag_array // **************************************************************************** // A template class to store an array of boolen values template < int C > struct flag_array { // The actual boolean values unsigned int data[(C + 31) / 32]; const int asize; // Some constructors flag_array ():asize ((C + 31) / 32) { memset (data, 0, sizeof (unsigned int) * asize); } flag_array (const flag_array & a):asize ((C + 31) / 32) { memcpy (data, a.data, sizeof (unsigned int) * asize); } flag_array (const int i):asize ((C + 31) / 32) { memset (data, 0, sizeof (unsigned int) * asize); data[i / 32] = 1 << (i % 32); } flag_array & operator = (const flag_array & a) { memcpy (data, a.data, sizeof (unsigned int) * asize); return *this; } // Test whether a specific bit is set bool is_set (const int i) { return (data[i / 32] & (1 << (i % 32))) != 0; } // Set a bit of the vector. The bit is speicified by the bit // position number. flag_array operator | (const int i) { flag_array result (*this); result.data[i / 32] |= 1 << (i % 32); return result; } // Perform an logical or operation on two flag_arrays flag_array operator | (const flag_array & a) { flag_array result (*this); for (int i = 0; i < asize; i++) result.data[i] |= a.data[i]; return result; } flag_array & operator |= (const flag_array & a) { for (int i = 0; i < asize; i++) data[i] |= a.data[i]; return *this; } // Perform an logical and operation on two flag_arrays flag_array operator & (const flag_array & a) { flag_array result; for (int i = 0; i < asize; i++) result.data[i] = data[i] & a.data[i]; return result; } // Perform an reduce or operation on the vector bits operator bool () { unsigned int result = 0; for (int i = 0; i < asize; i++) result |= data[i]; return result != 0; } }; // **************************************************************************** // * Definition of AccessFlags // **************************************************************************** // AccessFlags will store different types of operations performed on a // VHDL object typedef flag_array < 32 > AccessFlags; // constants to mark how objects are accessed #define READ AccessFlags(0) #define WRITE AccessFlags(1) #define SENSITIVE AccessFlags(2) #define FUNCTION_CALL AccessFlags(3) #define TYPE_CHECK AccessFlags(4) // Indicates that some type (range) checks has been made for a specific type #define TYPE_USED AccessFlags(5) // Indicates that a type has been used #define SIGNAL_FUNCTION_ATTRIBUTE AccessFlags(6) // A signal function kind Attribute has been applied on a signal #define ATTRIBUTE_DELAYED AccessFlags(7) // Signal kind attribute DELAYED #define ATTRIBUTE_TRANSACTION AccessFlags(8) // Signal kind attribute TRANSACTION #define ATTRIBUTE_STABLE AccessFlags(9) // Signal kind attribute STABLE #define ATTRIBUTE_QUIET AccessFlags(10) // Signal kind attribute QUIET #define PROCEDURE_CALL AccessFlags(11) #define SIGNAL_KIND_ATTRIBUTE (ATTRIBUTE_DELAYED | ATTRIBUTE_TRANSACTION | ATTRIBUTE_STABLE | ATTRIBUTE_QUIET) #define ACCESS (READ | WRITE | SENSITIVE | SIGNAL_FUNCTION_ATTRIBUTE | SIGNAL_KIND_ATTRIBUTE | \ FUNCTION_CALL | PROCEDURE_CALL) // **************************************************************************** // * Definition of RuntimeCheckFlags // **************************************************************************** // RuntimeCheckFlags store the type of check operations that must be perfomed // at runtime typedef flag_array < 32 > RuntimeCheckFlags; // Constants for check operations #define RT_CHECK_LEFT_BOUND RuntimeCheckFlags(0) #define RT_CHECK_RIGHT_BOUND RuntimeCheckFlags(1) #define RT_CHECK_DIRECTION RuntimeCheckFlags(2) #define RT_CHECK_LEFT_ARRAY_BOUND RuntimeCheckFlags(3) #define RT_CHECK_RIGHT_ARRAY_BOUND RuntimeCheckFlags(4) #define RT_CHECK_ARRAY_DIRECTION RuntimeCheckFlags(5) // **************************************************************************** // * Definition of CodeGeneratorFlags // **************************************************************************** // Flags to control the behaviour of the code generator. E.g., to // control whether code to check for type bounds are put into the // generated code. typedef flag_array < 32 > CodeGeneratorCheckFlags; #define CG_CHECK_SCALAR_TYPE_RANGE CodeGeneratorCheckFlags(0) #define CG_CHECK_COMPOSITE_TYPE_RANGE CodeGeneratorCheckFlags(1) #define CG_CHECK_OBJECT_RANGE CodeGeneratorCheckFlags(2) #define CG_CHECK_SIGNAL_RANGE CodeGeneratorCheckFlags(3) #define CG_CHECK_ARRAY_INDEX CodeGeneratorCheckFlags(4) #define CG_CHECK_ALL (\ CG_CHECK_SCALAR_TYPE_RANGE|\ CG_CHECK_COMPOSITE_TYPE_RANGE|\ CG_CHECK_OBJECT_RANGE|\ CG_CHECK_SIGNAL_RANGE|\ CG_CHECK_ARRAY_INDEX\ ) // **************************************************************************** // * Definition of processing steps that were performed on a node // **************************************************************************** // Optimization/compilation stages #define CONST_FOLD 0x1 #define EXPLORED 0x2 // **************************************************************************** // * Max and min values // **************************************************************************** // Max and min integer values #define INTEGER_MIN (INT_MIN + 1) #define INTEGER_MAX (INT_MAX) // Max and min physical type values #define PHYSICAL_MAX (9223372036854775807LL - 1LL) #define PHYSICAL_MIN (-9223372036854775807LL + 1LL) // **************************************************************************** // * Some definitions and functions // **************************************************************************** typedef long long int lint; // To save some typing inline int min (const int a, const int b) { return a < b ? a : b; } inline int max (const int a, const int b) { return a > b ? a : b; } inline lint min (const lint a, const lint b) { return a < b ? a : b; } inline lint max (const lint a, const lint b) { return a > b ? a : b; } inline bool and_reduce (const vector < bool > &vec) { for (unsigned int i = 0; i < vec.size (); i++) if (!vec[i]) return false; return true; } inline bool or_reduce (const vector < bool > &vec) { for (unsigned int i = 0; i < vec.size (); i++) if (vec[i]) return true; return false; } // Ordered list of declaration/bool mappings. typedef list < pair < pIIR_Declaration, bool > > decl_flag_list; // Virtual base class for static values struct StaticDataBase { virtual ~StaticDataBase() {}; virtual lint &long_value () { assert (false); }; virtual double &double_value () { assert (false); }; virtual vector &array_literal_value () { assert (false); }; virtual StaticDataBase *clone () const = 0; virtual string original_string () const { assert (false); }; virtual bool is_double_value () const { return false; } virtual bool is_long_value () const { return false; } virtual bool is_array_literal_value () const { return false; } }; // Stores a double value struct StaticDouble : public StaticDataBase { string orig_string; double value; virtual double & double_value () { return value; } StaticDouble (const double v) { value = v; } StaticDouble (const double v, const string &s) { value = v; orig_string = s; } StaticDouble () { value = 0; } virtual StaticDataBase *clone () const { return new StaticDouble (value, orig_string); } virtual string original_string () const { return orig_string; } virtual bool is_double_value () const { return true; } }; // Stores a long long int value struct StaticLint : public StaticDataBase { string orig_string; lint value; virtual lint & long_value () { return value; } StaticLint (const lint v) { value = v; } StaticLint (const lint v, const string &s) { value = v; orig_string = s; } StaticLint () { value = 0; } virtual StaticDataBase *clone () const { return new StaticLint (value, orig_string); } virtual string original_string () const { return orig_string; } virtual bool is_long_value () const { return true; } }; // Stores a array literal value struct StaticArrayLiteral : public StaticDataBase { vector value; virtual vector & array_literal_value () { return value; } StaticArrayLiteral (const vector v) { value = v; } StaticArrayLiteral () { } StaticDataBase *clone () const { return new StaticArrayLiteral (value); } virtual bool is_array_literal_value () const { return true; } }; // Union which either stores an integer, an double value or an array literal struct StaticDataType { StaticDataBase *value_p; // Contructor. Default is NO array literal value. StaticDataType () { value_p = NULL; } StaticDataType (const lint v) { value_p = new StaticLint (v); } StaticDataType (const double v) { value_p = new StaticDouble (v); } StaticDataType (const StaticDataType &v) { if (v.value_p == NULL) value_p = NULL; else value_p = v.value_p->clone (); } StaticDataType &operator = (const StaticLint &v) { if (value_p != NULL) delete value_p; value_p = v.clone (); return *this; } StaticDataType &operator = (const StaticDouble &v) { if (value_p != NULL) delete value_p; value_p = v.clone (); return *this; } // Cleanup instance. ~StaticDataType () { if (value_p != NULL) delete value_p; value_p = NULL; } lint &long_value () { if (value_p == NULL) value_p = new StaticLint; return value_p->long_value (); } double &double_value () { if (value_p == NULL) value_p = new StaticDouble; return value_p->double_value (); } // If an array literal is requested then check whether the array // literal pointer is valid. If not then allocate stroage to hold an // array literal. vector &array_literal_value () { if (value_p == NULL) value_p = new StaticArrayLiteral; return value_p->array_literal_value (); } string original_string () const { assert (value_p != NULL); return value_p->original_string (); } bool is_long_value () const { return value_p == NULL? false : value_p->is_long_value (); } bool is_double_value () const { return value_p == NULL? false : value_p->is_double_value (); } bool is_array_literal_value () const { return value_p == NULL? false : value_p->is_array_literal_value (); } }; struct mypool:vaul_pool { mypool (); vaul_design_unit *get (char *library, char *name); v2cc_mapper *mapper; FILE *dependencies_file; }; // Some constants to control handling of internal variables generated // by the code generator #define DECLARE_LOCALLY 0 // Declare locally #define DECLARE_AND_INIT 1 // The object shall be declared and directly initialized #define DECLARE_GLOBALLY 2 // The items should be declared as a global object #define INIT_ONLY 4 // Do not declare but initialize object // Size of various VHDL data types in bytes #define ENUM_SIZE 1 // Main parser node extern mypool vaul; // **************************************************************************** // * Definition of AccessDescriptor // **************************************************************************** // An AccessDescriptor instance stores information about the objects, // functions and types that are accessed within the VHDL source. struct AccessDescriptor { // points to the declaration (object, function or type declaration) pIIR_Declaration declaration; // stores what kind of operations/usage has been performed on a // specific object. E.g, read, written, sensed... AccessFlags access_type; // level the object is located at. The entire statement is assigned // level 0. The level is increased each time an object is included // in an argument to a subroutine or an index value of an array // reference. int level; // points to the part of the expression which references the // object/function pIIR_Expression access_expr; // Test whether the declaration matches a specific tree_kind bool is (const tree_kind a) { return declaration->is (a); } AccessDescriptor () { declaration = NULL; access_expr = NULL; access_type = AccessFlags (); level = 0; } AccessDescriptor (pIIR_ObjectDeclaration decl, pIIR_Expression ae, AccessFlags at = READ, int l = 0) { declaration = decl; access_expr = ae; access_type = at; level = l; }; AccessDescriptor (pIIR_FunctionDeclaration fdecl, pIIR_Expression ae, AccessFlags at = FUNCTION_CALL, int l = 0) { declaration = fdecl; access_expr = ae; access_type = at; level = l; }; AccessDescriptor (pIIR_ProcedureDeclaration pdecl, AccessFlags at = PROCEDURE_CALL, int l = 0) { declaration = pdecl; access_expr = NULL; access_type = at; level = l; }; AccessDescriptor (pIIR_TypeDeclaration tdecl, AccessFlags at = TYPE_USED) { declaration = tdecl; access_expr = NULL; access_type = at; level = 0; }; AccessDescriptor (const AccessDescriptor & sacs) { declaration = sacs.declaration; access_expr = sacs.access_expr; access_type = sacs.access_type; level = sacs.level; }; AccessDescriptor & operator = (const AccessDescriptor & sacs) { declaration = sacs.declaration; access_expr = sacs.access_expr; access_type = sacs.access_type; level = sacs.level; return *this; }; }; typedef list < AccessDescriptor > access_list; typedef AccessDescriptor *pAccessDescriptor; // Stores a list of tree_kind values class tree_kind_list:public vector < tree_kind > { public: tree_kind_list () { }; tree_kind_list (const tree_kind a) { push_back (a); } tree_kind_list (const tree_kind a, const tree_kind b) { push_back (a); push_back (b); } tree_kind_list (const tree_kind a, const tree_kind b, const tree_kind c) { push_back (a); push_back (b); push_back (c); } tree_kind_list & operator << (const tree_kind a) { push_back (a); return *this; } bool matches (const pIIR_Declaration decl) const { for (const_iterator iter = begin (); iter != end (); iter++) if (decl->is (*iter)) return true; return false; } }; // function generates a new list from an access_list which only // includes items that matche the access_type and the // object_kind. Example: filter(lst, WRITE, IR_SIGNAL_DECLARATION) // will create a new list from lst where only written signals are // inlcuded. inline list < AccessDescriptor > filter (list < AccessDescriptor > &lst, const AccessFlags access_type, const tree_kind_list & object_kind) { list < AccessDescriptor > result; for (list < AccessDescriptor >::iterator it = lst.begin (); it != lst.end (); it++) if (((*it).access_type & access_type) && object_kind.matches ((*it).declaration)) result.push_back (*it); return result; } // same as filter besides that no items with the same member // "declaration" will appear more than once on the list inline list < AccessDescriptor > filter_unique (list < AccessDescriptor > &lst, const AccessFlags access_type, const tree_kind_list & object_kind) { list < AccessDescriptor > result; set < pIIR_Declaration, less < void *> > obj_set; for (list < AccessDescriptor >::iterator it = lst.begin (); it != lst.end (); it++) if (((*it).access_type & access_type) && object_kind.matches ((*it).declaration) && obj_set.find ((*it).declaration) == obj_set.end ()) { result.push_back (*it); obj_set.insert ((*it).declaration); } return result; } // function generates a new list from an pIIR_DeclarationList where // only elements which matches the object node kinds stored in // object_kind are selected. inline list < pIIR_Declaration > filter_unique (pIIR_DeclarationList lst_begin, const tree_kind_list & object_kind) { list < pIIR_Declaration > result; set < pIIR_Declaration, less < void *> > obj_set; for (pIIR_DeclarationList lst = lst_begin; lst; lst = lst->rest) if (object_kind.matches (lst->first) && obj_set.find (lst->first) == obj_set.end ()) { result.push_back (lst->first); obj_set.insert (lst->first); } return result; } // **************************************************************************** // * Definition of struct ConetxtInfo // **************************************************************************** // A "ContextInfo" object is used to store data required by the code // generator struct ContextInfo { list < AccessDescriptor > accessed_objects; // accessed objects list < pIIR_SequentialStatement > wait_statements; // wait statements list < pIIR_SignalAssignmentStatement > signal_assignment_statements; // signal assignements list < AccessDescriptor > extra_interface_objects; // additional interface parameter void clear () { accessed_objects.clear (); wait_statements.clear (); signal_assignment_statements.clear (); extra_interface_objects.clear (); } }; typedef ContextInfo *pContextInfo; struct RegionStack:public deque < pIIR_DeclarativeRegion > { void push (pIIR_DeclarativeRegion r) { push_back (r); } void pop () { pop_back (); } }; inline char * to_chars (const AccessDescriptor & a) { return a.declaration->declarator->text.to_chars (); } // **************************************************************************** // * Definition of struct StaticRangeDescriptor // **************************************************************************** // class to store static range information. template struct StaticRangeDescriptor { // left bound, right bound and range direction T left, right; R dir; // Contains three elementes, whether the first element is true of // left is valid, the second element is true if dir is static and // the right element is true if right is static. vector valid; StaticRangeDescriptor () { valid.resize (3); fill (valid.begin (), valid.end (), true); }; StaticRangeDescriptor (const T l, const R d, const T r) : left (l), right (r), dir (d) { valid.resize (3); fill (valid.begin (), valid.end (), true); }; StaticRangeDescriptor (const StaticRangeDescriptor &a) : left (a.left), right (a.right), dir (a.dir), valid (a.valid) {}; StaticRangeDescriptor &operator = (const StaticRangeDescriptor &a) { left = a.left; dir = a.dir; right = a.right; valid = a.valid; return *this; }; bool operator == (const StaticRangeDescriptor &a) const { if (!and_reduce(valid) || !and_reduce(a.valid)) return false; return (left == a.left) && (dir == a.dir) && (right == a.right); } }; struct StaticRangeDescriptor_lint_Less : public binary_function , StaticRangeDescriptor, bool> { bool operator () (const StaticRangeDescriptor &a, const StaticRangeDescriptor &b) { // If not both ranges are static then return false if (! and_reduce (a.valid) || ! and_reduce (b.valid)) return false; // Next, check out whether some of the ranges are null ranges const bool null_range = a.dir == IR_DIRECTION_UP? a.left > a.right : a.left < a.right; const bool a_null_range = b.dir == IR_DIRECTION_UP? b.left > b.right : b.left < b.right; if (null_range || a_null_range) return null_range; // Finally, compare ranges const lint min_a = min (a.left, a.right); const lint min_b = min (b.left, b.right); return min_a != min_b ? min_a < min_b : max (a.left, a.right) < max (b.left, b.right); } }; // Compare function required to build maps where // StaticRangeDescriptor is a key! Note that the // ranges are not really compared. The function just defines some kind // of order among a set of StaticRangeDescriptor // elements. inline bool operator < (const StaticRangeDescriptor &a, const StaticRangeDescriptor &b) { if (a.left < b.left) return true; else if (a.left == b.left) if (a.dir == IR_DIRECTION_DOWN && b.dir != IR_DIRECTION_UP) return true; else if (a.dir == b.dir && a.right < b.right) return true; return false; } // **************************************************************************** // * Definition of struct RangeDescriptor // **************************************************************************** // class to store range information. Range information is either given // as an "explicit" range by specifying left border, right border and // direction or derived from an array instance via the attributes // RANGE or REVERSE_RANGE. class RangeDescriptor { public: // Members used to store "explicit" ranges pIIR_Root left, right; IR_Direction direction; // Member stores an array attribtute range expression. If this // pointer is not equal to NULL then an range attribute expression // is stored by the current range descriptor. pIIR_ArrayRange range_attribute; // Static level of the instance IR_StaticLevel static_level; RangeDescriptor () { left = right = NULL; direction = IR_DIRECTION_UP; range_attribute = NULL; static_level = IR_NOT_STATIC; } // Create range descriptor from "explitit" range RangeDescriptor (pIIR_Root l, IR_Direction d, pIIR_Root r, IR_StaticLevel slevel) { left = l; right = r; direction = d; static_level = slevel; range_attribute = NULL; // Flag explicit range } // Create range descriptor from array attribute RANGE or // REVERSE_RANGE RangeDescriptor (pIIR_ArrayRange ar) { left = right = NULL; direction = IR_DIRECTION_UP; range_attribute = ar; // Store RANGE attribute node static_level = IR_NOT_STATIC; } // Copy constructor RangeDescriptor (const RangeDescriptor & r) { left = r.left; right = r.right; direction = r.direction; static_level = r.static_level; range_attribute = r.range_attribute; } // Destructor. Nothing to do. ~RangeDescriptor () { }; // Returns true if range r and the current instance cover the same // range bool is_equal_to (const RangeDescriptor & r); // Returns true if range is "explicit" bool is_explicit_range () { return left != NULL && right != NULL; } // Convert a RangeDescriptor into corresponding integer values and // the direction. A boolean vector is returned where each item stores // whether the corresponding bound could be statically determined // (true). StaticRangeDescriptor rangedes_to_lint (RegionStack & rstack); // Convert a RangeDescriptor into corresponding double values and // the direction. A boolean vector is returned where each item stores // whether the corresponding bound could be statically determined // (true). StaticRangeDescriptor rangedes_to_double (RegionStack & rstack); // Convert a RangeDescriptor into corresponding integer value // strings and the direction strings. If a bound is not locally // static then appropriate code is emitted to extract the // corresponding values from the object. A boolean vector is // returned where each item stores whether the corresponding bound // could be statically determined (true). StaticRangeDescriptor rangedes_to_string (RegionStack & rstack, id_type t); // Same as previos method. However, string are generated according // to CDFG rules. StaticRangeDescriptor cdfg_rangedes_to_string (RegionStack & rstack, id_type t); // Returns Attribute node pIIR_ArrayRange get_attribute_range () { return range_attribute; }; // Constant fold int constant_fold_rangedes (RegionStack & rstack); }; // **************************************************************************** // * Definition of VHDLOperators (singleton class) // **************************************************************************** // Is used to convert VHDL operator calls to C++ code class VHDLOperators { public: static VHDLOperators *get_instance (); protected: VHDLOperators (); private: static VHDLOperators *single_instance; typedef map < string, string, less < string > >MapString2; // Stores macros to generate code for predefined unary and binary // operators. The variables are associative arrays indexed by the VHDL // operator name. Example: "unary_operator_macro[string("\"and\"")]" // will return the string "(%s&&%s)". The returned string may be used as // a format string for a "sprintf" function. MapString2 unary_operator_macro; MapString2 binary_operator_macro; // C++ operator function names for arrays MapString2 unary_array_operator_macro; MapString2 binary_array_operator_macro; // C++ names of user defined operator functions MapString2 unary_user_operator_name; MapString2 binary_user_operator_name; void init_operator_macros(); void init_array_operator_macros(); void init_user_operator_names(); public: /* Generate string for a call to a binary operator */ string get_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1, const string arg2); /* Generate string for a call to a unary operator */ string get_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1); // Generated code to concat two arrays string get_concat_operator_call_string(pIIR_FunctionCall fc, string &arg1, string &arg2, RegionStack &rstack); /* Get unary operator name string */ string get_unary_user_operator_name (const string &str); /* Get unary operator name string */ string get_binary_user_operator_name (const string &str); /* Test whether operator name denotes contat operator */ bool is_concat_operator (const string &str); }; // **************************************************************************** // * Globally defined functions // **************************************************************************** extern int constant_fold (RangeDescriptor & r, RegionStack & rstack); void emit_sig_interfacecon (pIIR_SignalInterfaceDeclaration s, string & str, RegionStack & rstack, int l); void emit_generic_interfacecon (pIIR_ConstantInterfaceDeclaration s, string & str, RegionStack & rstack, int l); void emit_handle (pIIR_ArchitectureDeclaration a, string & str); string sprint_acl (list < pair < pIIR_Expression, pIIR_Root > >&acl_expr_list, const string acl_object, RegionStack & rstack, id_type t = id_type ()); string sprint_object_reference(pIIR_ObjectDeclaration obj, vector > &static_range_vec, RegionStack &rstack); int get_acl_size (list < pair < pIIR_Expression, pIIR_Root > > &acl_expr_list); vector < pair < pIIR_Type, pIIR_Type > > get_types (list < pair < pIIR_Expression, pIIR_Root > > &acl_expr_list, const pIIR_Type type); void emit_constructor (pIIR_ArchitectureDeclaration a, string & str, RegionStack & rstack); void emit_decls (pIIR_DeclarationList decl_list, string & str, RegionStack & rstack, int l); void emit_process_body (pIIR_ProcessStatement p, string & str, RegionStack & rstack, int l); bool emit_associations (string & str, RegionStack & rstack, pIIR_AssociationList assocs, pIIR_InterfaceList formals); #endif freehdl-0.0.7/v2cc/v2cc.cc0000644000175000017500000006367010707452526012075 00000000000000 /* VHDL to C++ translator Copyright (C) 1999, 2000 Edwin Naroska. V2CC 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. V2CC 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 V2CC; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* This program translates the original VHDL source into C++. Usage: v2cc [-v] [-l lib] file... -v verbose -l lib use lib as the WORK library, default is "." -o file write output to FILE --depend=file write dependency information to FILE file... the design units to translate */ using namespace std; #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #if HAVE_GETOPT_H #include #endif #include #include #include #include #include #include "mapping.h" #include "v2cc-chunk.h" #include "v2cc-util.h" // Declare here for now -- TLD void emit_includes(string &str); string sprint_acl(list &acl_list, const string acl_object); pIIR_LibraryUnit get_library_unit(pIIR_DeclarativeRegion d); // ****************************************************************************************** // Implementation of member functions declared in v2cc.h // ****************************************************************************************** // Returns true if range r and the current instance cover the same // range bool RangeDescriptor::is_equal_to(const RangeDescriptor &r) { assert(range_attribute == NULL);// Currently not supported return (left == r.left) && (right == r.right) && (direction == r.direction); } // Convert a RangeDescriptor into corresponding integer values and // the direction. A boolean vector is returned where each item stores // whether the corresponding bound could be statically determined // (true). StaticRangeDescriptor RangeDescriptor::rangedes_to_lint(RegionStack &rstack) { StaticRangeDescriptor range; range.valid.resize (3); string str; bool ok = true; // If range is not explicit then return false if (!is_explicit_range()) { fill(range.valid.begin(), range.valid.end(), false); return range; } // Try to convert the left bounds to integer values constant_fold(left, rstack); if (valid_folded_value(left)) range.left = get_folded_value(left).long_value(); else ok = false; // If the expression is not simple then flag an error range.valid [0] = ok; // Store range direction range.dir = direction; range.valid [1] = true; // Try to convert the right bounds to integer values ok = true; constant_fold(right, rstack); if (valid_folded_value(right)) range.right = get_folded_value(right).long_value(); else ok = false; // If the expression is not simple then flag an error range.valid [2] = ok; return range; } // Convert a RangeDescriptor into corresponding double values and // the direction. A boolean vector is returned where each item stores // whether the corresponding bound could be statically determined // (true). StaticRangeDescriptor RangeDescriptor::rangedes_to_double(RegionStack &rstack) { StaticRangeDescriptor range; range.valid.resize (3); string str; bool ok = true; // If range is not explicit then return false if (!is_explicit_range()) { fill(range.valid.begin(), range.valid.end(), false); return range; } // Try to convert the left bounds to integer values constant_fold(left, rstack); if (valid_folded_value(left)) range.left = get_folded_value(left).double_value(); else ok = false; // If the expression is not simple then flag an error range.valid [0] = ok; // Store range direction range.dir = direction; range.valid [1] = true; // Try to convert the right bounds to integer values ok = true; constant_fold(right, rstack); if (valid_folded_value(right)) range.right = get_folded_value(right).double_value(); else ok = false; // If the expression is not simple then flag an error range.valid [2] = ok; return range; } // Convert a RangeDescriptor into corresponding integer value strings // and the direction strings. If a bound is not locally static then // appropriate code is emitted to extract the corresponding values // from the object. A boolean vector is returned where each item // stores whether the corresponding bound could be statically // determined (true). StaticRangeDescriptor RangeDescriptor::rangedes_to_string(RegionStack &rstack, id_type t) { StaticRangeDescriptor range; range.valid.resize (3); bool ok = true; // First, try to constant fold the range attribute expression constant_fold_rangedes(rstack); if (range_attribute != NULL) { // Range is specified via the RANGE or REVERSE_RANGE attribute bool reverse_range; if (range_attribute->is(IR_ATTR_ARRAY_RANGE)) reverse_range = false; else if (range_attribute->is(IR_ATTR_ARRAY_REVERSE_RANGE)) reverse_range = true; else assert(false); string info_instance_str; if (range_attribute->array != NULL) { // The range attribute has been applied on an array // instance. First, emit code to extract the info instance from // the array. emit_expr (range_attribute->array, info_instance_str, rstack, t); info_instance_str += ".info"; } else { // The range attribute has been applied on an array type. Emit // code to reference the range corresponding info instance. info_instance_str += qid(get_declaration(range_attribute->array_type), rstack, INFO) + "_INFO"; } // Get index number. Note that the index number must be locally // static. int index_number = 1; if (range_attribute->index != NULL) index_number = (int)get_folded_value(range_attribute->index).long_value(); // Build code to access the array info instance which // corresponds with the index_number for (int i = 1; i < index_number; i++) info_instance_str = "((array_info*)" + info_instance_str + "->element_type)"; // Print left, right and direction string depending on whether the // attribute RANGE or REVERSE_RANGE is used. When printing the // bounds check whether the bounds can be determined at compile // time. if (left != NULL) { constant_fold(left, rstack); range.valid [0] = emit_expr (left, range.left, rstack, t); } else { if (reverse_range) range.left = info_instance_str + "->right_bound"; else range.left = info_instance_str + "->left_bound"; range.valid [0] = false; } if (right != NULL && left != NULL) { range.dir = direction == IR_DIRECTION_UP? "to" : "downto"; range.valid [1] = true; } else { if (reverse_range) range.dir = "(" + info_instance_str + "->index_direction==to?downto:to)"; else range.dir = info_instance_str + "->index_direction"; range.valid [1] = false; } if (right != NULL) { constant_fold(right, rstack); range.valid [2] = emit_expr (right, range.right, rstack, t); } else { if (reverse_range) range.right = info_instance_str + "->left_bound"; else range.right = info_instance_str + "->right_bound"; range.valid [2] = false; } } else { // Range is explicit defined // Convert the left bounds to integer values constant_fold(left, rstack); range.valid [0] = emit_expr (left, range.left, rstack, t); // Store range direction range.dir = direction == IR_DIRECTION_UP? "to" : "downto"; range.valid [1] = true; constant_fold(right, rstack); range.valid [2] = emit_expr (right, range.right, rstack, t); } return range; } // Same as previos method. However, string are generated according // to CDFG rules. StaticRangeDescriptor RangeDescriptor::cdfg_rangedes_to_string(RegionStack &rstack, id_type t) { StaticRangeDescriptor range; range.valid.resize (3); bool ok = true; // First, try to constant fold the range attribute expression constant_fold_rangedes(rstack); if (range_attribute != NULL) { // Range is specified via the RANGE or REVERSE_RANGE attribute bool reverse_range; if (range_attribute->is(IR_ATTR_ARRAY_RANGE)) reverse_range = false; else if (range_attribute->is(IR_ATTR_ARRAY_REVERSE_RANGE)) reverse_range = true; else assert(false); string info_instance_str; if (range_attribute->array != NULL) { // The range attribute has been applied on an array // instance. First, emit code to extract the info instance from // the array. cdfg_emit_expr (range_attribute->array, info_instance_str, rstack, t); } else { // The range attribute has been applied on an array type. Emit // code to reference the range corresponding info instance. info_instance_str = get_escaped_string(get_long_name(get_declaration(range_attribute->array_type))); } // Get index number. Note that the index number must be locally // static. int index_number = 1; if (range_attribute->index != NULL) index_number = (int)get_folded_value(range_attribute->index).long_value(); string index_number_string = to_string(index_number); // Print left, right and direction string depending on whether the // attribute RANGE or REVERSE_RANGE is used. When printing the // bounds check whether the bounds can be determined directly. if (left != NULL) { constant_fold(left, rstack); range.valid [0] = cdfg_emit_expr (left, range.left, rstack, t); } else { if (reverse_range) range.left = "(create-array-attribute-call right " + info_instance_str + " " + index_number_string + ")"; else range.left = "(create-array-attribute-call left " + info_instance_str + " " + index_number_string + ")"; range.valid [0] = false; } if (right != NULL && left != NULL) { range.dir = direction == IR_DIRECTION_UP? "to" : "downto"; range.valid [1] = true; } else { if (reverse_range) range.dir = "(create-array-attribute-call-reverse direction " + info_instance_str + " " + index_number_string + ")"; else range.dir = "(create-array-attribute-call direction " + info_instance_str + " " + index_number_string + ")"; range.valid [1] = false; } if (right != NULL) { constant_fold(right, rstack); range.valid [2] = cdfg_emit_expr (right, range.right, rstack, t); } else { if (reverse_range) range.right = "(create-array-attribute-call left " + info_instance_str + " " + index_number_string + ")"; else range.right = "(create-array-attribute-call right " + info_instance_str + " " + index_number_string + ")"; range.valid [2] = false; } } else { // Range is explicit defined // Convert the left bounds to integer values constant_fold(left, rstack); range.valid [0] = cdfg_emit_expr (left, range.left, rstack, t); // Store range direction range.dir = direction == IR_DIRECTION_UP? "to" : "downto"; range.valid [1] = true; constant_fold(right, rstack); range.valid [2] = cdfg_emit_expr (right, range.right, rstack, t); } return range; } int RangeDescriptor::constant_fold_rangedes(RegionStack &rstack) { int error_count = 0; if (range_attribute != NULL) { vector range_des_vec; if (range_attribute->array != NULL) { // There is nothing to do if the array subtype is an // unconstrained array type if (!is_constrained_array_type(range_attribute->array->subtype)) return 0; // Get range descriptors from array object range_des_vec = get_discrete_range(range_attribute->array->subtype, rstack, IR_NOT_STATIC); } else if (range_attribute->array_type != NULL) // Get range descriptors from array type range_des_vec = get_discrete_range(range_attribute->array_type, rstack, IR_NOT_STATIC); else assert(false); // Constant fold corresponding range descriptor int dim_number = 1; if (range_attribute->index) { constant_fold(range_attribute->index, rstack); assert(valid_folded_value(range_attribute->index)); dim_number = folded_value(range_attribute->index).long_value(); } RangeDescriptor &range_des = range_des_vec[dim_number - 1]; error_count += range_des.constant_fold_rangedes(rstack); if (range_des.range_attribute != NULL) return error_count; if (range_attribute->is(IR_ATTR_ARRAY_RANGE)) { left = range_des.left; direction = range_des.direction; right = range_des.right; } else if (range_attribute->is(IR_ATTR_ARRAY_REVERSE_RANGE)) { left = range_des.right; direction = range_des.direction == IR_DIRECTION_UP? IR_DIRECTION_DOWN : IR_DIRECTION_UP; right = range_des.left; } else assert(false); } if (left != NULL) if (left->is(IR_EXPRESSION)) error_count += constant_fold(pIIR_Expression(left), rstack); else error_count += constant_fold(pIIR_Literal(left), rstack); if (right != NULL) if (right->is(IR_EXPRESSION)) error_count += constant_fold(pIIR_Expression(right), rstack); else error_count += constant_fold(pIIR_Literal(right), rstack); return error_count; } /* Exit the program with a usage message. */ void usage () { fprintf (stderr, "usage: %s [-v] [-l lib] [-L libdir] file...\n", vaul_application_name); exit (1); } vaul_parser_options parser_options; bool try_vhdl_source (char *fn) { for (char *cp = fn; *cp; cp++) *cp = tolower(*cp); return access (fn, R_OK) == 0; } char * find_vhdl_source (char *l, char *n) { char *fn = vaul_aprintf ("../libvaul/vlib/%s/%s.vhd", l, n); if (try_vhdl_source (fn)) return fn; free (fn); fn = vaul_aprintf ("../libvaul/vlib/%s/%s.vhdl", l, n); try_vhdl_source (fn); return fn; } mypool::mypool () { mapper = make_v2cc_mapper (); dependencies_file = NULL; } vaul_design_unit * mypool::get (char *l, char *n) { vaul_design_unit *du = vaul_pool::get (l, n); if (du == NULL) { char *fn = mapper->find_design_file (l, n); if (fn == NULL) return NULL; if (codegen_options.get_verbose ()) fprintf (stderr, "reading %s.%s from %s\n", l, n, fn); // We are only interested in packages and entities, so we // instruct the parser to skip over the rest. vaul_parser_options opts = parser_options; opts.set_skip_bodies (true); vaul_design_file df(fn, NULL, opts); begin_session (l); while (vaul_design_unit * du = df.read_design_unit (this)) { insert (du); if (du->is_error ()) du->print_err (fn); du->release (); } if (df.is_error ()) df.print_err (fn); end_session (); du = vaul_pool::get (l, n); if (dependencies_file && du && !du->is_error ()) fprintf (dependencies_file, " %s", fn); delete[] fn; } return du; } mypool vaul; #ifndef HAVE_GETOPT_H struct option { const char *name; int has_arg; int *flag; int val; }; #define no_argument 0 #define required_argument 1 #define optional_argument 2 extern "C" int getopt_long (int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex); #endif /* HAVE_GETOPT_H */ extern int optind, opterr; extern char *optarg; /* Parse FILE and output translation of all contained units to strings. Return true on success, false otherwise. */ bool emit (vaul_pool *pool, char *file, string &str, string &cdfg_str, string &main_cc_str); void init_v2cc_chunk (); bool dry_run = false; struct option long_options[] = { { "relaxed-component-visibility", 0, 0, 0 }, { "depend", required_argument, 0, 0 }, { 0, 0, 0, 0 } }; int main (int argc, char *argv[]) { int opt, option_index; const char *libname = "work"; char *generated_cc_file_name = NULL; char *main_cc_file_name = NULL; vaul_application_name = "v2cc"; opterr = 0; while ((opt=getopt_long (argc, argv, "vnl:L:RgDo:m:", long_options, &option_index)) != -1) { switch (opt) { case 0: { switch (option_index) { case 0: // allow_invisible_default_bindings_from_work parser_options. set_allow_invisible_default_bindings_from_work (true); break; case 1: // depend { FILE *depf = fopen (optarg, "w"); if (depf == NULL) { perror (optarg); exit (1); } vaul.dependencies_file = depf; } break; } } break; case 'v': codegen_options.set_verbose (true); parser_options.set_debug (true); parser_options.set_fullnames (true); tree_set_verbose (true); break; case 'l': libname = optarg; break; case 'L': vaul.mapper->add_libdir (optarg); break; case 'm': codegen_options.set_emit_main_cc_code (true); codegen_options.set_main_cc_filename (optarg); break; case 'n': dry_run = true; break; case 'R': codegen_options.set_emit_register_code (true); break; case 'g': codegen_options.set_emit_debug_code (true); break; case 'D': codegen_options.set_emit_cdfg_code (true); break; case 'o': generated_cc_file_name = strdup (optarg); break; case '?': usage (); break; } } vaul.mapper->add_default_libdirs (); if (optind >= argc || argc-1 > optind) usage (); init_v2cc_chunk (); if (vaul.dependencies_file) fprintf (vaul.dependencies_file, "%s:", generated_cc_file_name); bool success = true; vaul.begin_session ((char*)libname); string str, cdfg_str, main_cc_str; vector source_file_names; // Stores vhdl source files names emit_includes (str); // #includes for sim while (optind < argc) { if (vaul.dependencies_file) fprintf (vaul.dependencies_file, " %s", argv[optind]); source_file_names.push_back (string (argv [optind])); success = emit (&vaul, argv[optind], str, cdfg_str, main_cc_str) && success; optind++; } if (success) { if (generated_cc_file_name != NULL) { ofstream outfile(generated_cc_file_name); outfile << str; outfile.close(); } else { cout << str; cout.flush(); } // If CDFG code shall be emitted ... if (codegen_options.get_emit_cdfg_code ()) { ofstream cdfg_file; // Generate file name for CDFG code. Usually, the .vhdl // extension is replaced by .cdfg.lsp string file_name = source_file_names.front (); file_name.erase(file_name.rfind('.')); // If the file did not have any extension then use the first // entire file name as base for the output file name if (file_name == "") file_name = source_file_names.front (); file_name += ".cdfg.lsp"; cdfg_file.open(file_name.c_str()); // Write string to file cdfg_file << cdfg_str; cdfg_file.close(); // Close CDFG file } // If the main routine shall be emitted, then... if (codegen_options.get_emit_main_cc_code () && codegen_options.get_main_cc_filename () != "") { ofstream main_cc_file; main_cc_file.open (codegen_options.get_main_cc_filename ().c_str()); // Write string to file main_cc_file << main_cc_str; main_cc_file.close(); // Close CDFG file } } vaul.end_session (); if (vaul.dependencies_file) { fprintf (vaul.dependencies_file, "\n"); fclose (vaul.dependencies_file); vaul.dependencies_file = NULL; } return success? 0 : 1; } bool emit (vaul_pool *pool, char *file, string &str, string &cdfg_str, string &main_cc_str) { vaul_design_file df(file, NULL, parser_options); // Create a root node to store global code. Note that it is // important to have an SINGLE root node for all designs stored in // the design file in order to keep track of global definitions // common to all current designs. pIIR_DeclarativeRegion root_node = new IIR_DeclarativeRegion(NULL, NULL, NULL, NULL, 0, NULL, NULL); // Protect node so that it it is not removed by the garbage // collector tree_protect(root_node); bool success = true; // Vector to store all design units that are found in the source // file. vector du_vec; // First, parse *all* design units. This is done in order to be able // to find out which design units are dublicate and shall not be // emitted. while (vaul_design_unit *du = df.read_design_unit (pool)) { pool->insert (du); if (du->is_error ()) { du->print_err (file); success = false; } du_vec.push_back (du); } // Check for duplicate design units. Note that it is legal in VHDL // to redefine a enitity. In this case, the last definition should // overide any previous ones... First, generate an id string for // each library unit. vector ids (du_vec.size ()); for (unsigned int i = 0; i < du_vec.size (); i++) { RegionStack rstack; rstack.push(root_node); // Generate a unique id string from ids [i] = qid (du_vec [i]->get_tree (), rstack, id_type ()); } // Finally, search for dublicates and mark all dublicates with the // exception of the last one. for (int i = du_vec.size () - 1; i >= 1; i--) { for (int j = i - 1; j >= 0; j--) if (ids [j] == ids [i]) { codegen_error.info("%:warning: definition of library unit %n is overwritten by same named unit defined in line %;.", du_vec [j]->get_tree (), du_vec [j]->get_tree (), du_vec [i]->get_tree ()); generate_code (du_vec [j]->get_tree ()) = false; } } if (success && !dry_run) for (unsigned int i = 0; i < du_vec.size (); i++) { vaul_design_unit *du = du_vec [i]; if (codegen_options.get_verbose ()) fprintf (stderr, "emitting %s/%s\n", du->get_library (), du->get_name ()); RegionStack rstack; // Remove declarations from root node and push it on the // context stack root_node->declarations = NULL; extended_declarations(root_node) = NULL; rstack.push(root_node); // Set prefix name for internal variables set_internal_prefix_start(du->get_tree(), rstack); // Check VHDL code and prepare code for code generation! pIIR_LibraryUnit lu = du->get_tree(); if (explore_and_check(lu, rstack, true)) success = false; // Generate code if no error occured and if code shall be // generated for this library unit. if (success && generate_code (lu)) { string code; if (codegen_options.get_emit_debug_code ()) code = "#line 1000000 __FILE__\n"; emit_decl (lu, code, rstack, 0); str += code; } // If CDFG code shall be emitted ... if (success && codegen_options.get_emit_cdfg_code ()) { // Call cdfg_emit_impl to print CDFG code into a string cdfg_emit_impl(lu, cdfg_str, rstack, 0); } // If main code shall be emitted ... if (success && codegen_options.get_emit_main_cc_code ()) { main_cc_str = ""; // Only the last emitted main code is // needed. Hence, clear string before // calling emit_main. emit_main (lu, main_cc_str, rstack, 0); } // Push context from stack rstack.pop(); if (codegen_error.n_errors) exit(1); } for (unsigned int i = 0; i < du_vec.size (); i++) du_vec [i]->release(); // Allow garbage collector to destroy root node tree_unprotect(root_node); return success; } /* * Utility */ void emit_includes(string &str) { str += string ("#include \n") + string ("#include \n\n\n") // + //string ("#ifdef CC_FILE_NAME\n") + //string ("#undef CC_FILE_NAME\n") + //string ("#endif\n") + //string ("#define CC_FILE_NAME __FILE__\n") ; } // ****************************************************************************************** // Name: get_library_unit // // Description: returns library unit a declarative region belongs to // // Parameter: pIIR_DeclarativeRegion d = declarative region // // Return value: library unit // // ****************************************************************************************** pIIR_LibraryUnit get_library_unit(pIIR_DeclarativeRegion d) { while (d != NULL && !d->is(IR_LIBRARY_UNIT)) { d = d->declarative_region; } return (pIIR_LibraryUnit)d; } // returns name of the libraray char * get_lib_name(pIIR_DeclarativeRegion r) { pIIR_LibraryUnit lu = get_library_unit(r); return lu->library_name->text.to_chars(); } // ****************************************************************************************** // Name: m_get_operator_type (generic function) // // Description: returns type of an operator. Possible values are: // - NO_OP if the function does not denote an operator // - STD_OP if the funcion denotes an predefined VHDL operator // - BASIC_OP if the function denotes an operator defined in an // IEEE library (e.g. numeric_std) // - USER_OP an user defined operator // // Parameter: pIIR_FunctionDeclaration f = pointer to function declaration // // Return value: op_type // // ****************************************************************************************** op_type m_get_operator_type(pIIR_ProcedureDeclaration pd) { return NO_OP; } op_type m_get_operator_type(pIIR_FunctionDeclaration fd) { char *function_str = fd->declarator->text.to_chars(); // Get function name if (function_str[0] != '"') // Is function not an operator? return NO_OP; char *libname = get_lib_name(fd->declarative_region); if (!strcmp(libname, "std") || fd->is(IR_PREDEFINED_FUNCTION_DECLARATION)) // Function is defined in library "std" or a predefined VHDL // operator return STD_OP; else if (!strcmp(libname, "ieee")) // Function is defined in library "ieee" return BASIC_OP; else return USER_OP; } freehdl-0.0.7/v2cc/v2cc-chunk.h0000644000175000017500000015236311175357261013043 00000000000000// generated by gen-nodes from `v2cc-chunk.t'. Do not edit. #ifndef V2CC_H #define V2CC_H #include #include #include #include #include #include #include #include #include #include "v2cc.h" enum op_type { NO_OP, STD_OP, BASIC_OP, USER_OP }; extern tree_chunk_info v2cc_chunk_info; extern tree_ctype_info set_string_ctype_info; extern tree_ctype_info list_string_ctype_info; extern tree_ctype_info list_expr_pair_ref_ctype_info; extern tree_ctype_info vector_string_ctype_info; extern tree_ctype_info vector_string_ref_ctype_info; extern tree_ctype_info vector_bool_ctype_info; extern tree_ctype_info vector_lint_ref_ctype_info; extern tree_ctype_info RegionStack_ctype_info; extern tree_ctype_info RegionStack_ref_ctype_info; extern tree_ctype_info ContextInfo_ctype_info; extern tree_ctype_info ContextInfo_ref_ctype_info; extern tree_ctype_info pContextInfo_ctype_info; extern tree_ctype_info pAccessDescriptor_ctype_info; extern tree_ctype_info lint_ctype_info; extern tree_ctype_info StaticDataType_ctype_info; extern tree_ctype_info string_ctype_info; extern tree_ctype_info string_ref_ctype_info; extern tree_ctype_info set_IIR_SimpleReference_ctype_info; extern tree_ctype_info pIIR_ObjectDeclaration_ctype_info; extern tree_ctype_info RangeDescriptor_vec_ctype_info; extern tree_ctype_info RuntimeCheckFlags_ctype_info; extern tree_ctype_info id_type_ctype_info; extern tree_ctype_info op_type_ctype_info; struct V2CC_InternalObjectDeclaration; typedef V2CC_InternalObjectDeclaration *pV2CC_InternalObjectDeclaration; extern tree_kind_info V2CC_INTERNAL_OBJECT_DECLARATION_kind_info; #define V2CC_INTERNAL_OBJECT_DECLARATION (&V2CC_INTERNAL_OBJECT_DECLARATION_kind_info) struct V2CC_ImplicitSignalDeclaration; typedef V2CC_ImplicitSignalDeclaration *pV2CC_ImplicitSignalDeclaration; extern tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_kind_info; #define V2CC_IMPLICIT_SIGNAL_DECLARATION (&V2CC_IMPLICIT_SIGNAL_DECLARATION_kind_info) struct V2CC_ImplicitSignalDeclaration_WaitFor; typedef V2CC_ImplicitSignalDeclaration_WaitFor *pV2CC_ImplicitSignalDeclaration_WaitFor; extern tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR_kind_info; #define V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR (&V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR_kind_info) struct V2CC_ImplicitSignalDeclaration_Transaction; typedef V2CC_ImplicitSignalDeclaration_Transaction *pV2CC_ImplicitSignalDeclaration_Transaction; extern tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION_kind_info; #define V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION (&V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION_kind_info) struct V2CC_InternalCode; typedef V2CC_InternalCode *pV2CC_InternalCode; extern tree_kind_info V2CC_INTERNAL_CODE_kind_info; #define V2CC_INTERNAL_CODE (&V2CC_INTERNAL_CODE_kind_info) struct V2CC_ImplicitSubtypeDeclaration; typedef V2CC_ImplicitSubtypeDeclaration *pV2CC_ImplicitSubtypeDeclaration; extern tree_kind_info V2CC_IMPLICIT_SUBTYPE_DECLARATION_kind_info; #define V2CC_IMPLICIT_SUBTYPE_DECLARATION (&V2CC_IMPLICIT_SUBTYPE_DECLARATION_kind_info) struct V2CC_InternalObjectDeclaration : IIR_ObjectDeclaration { string cpp_type_string; string cpp_initial_string; int flags; V2CC_InternalObjectDeclaration (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type subtype, pIIR_Expression initial_value, pIIR_ObjectReference alias_base, string cpp_type_string, string cpp_initial_string, int flags) : IIR_ObjectDeclaration (pos, declarator, declarative_region, attributes, seqno, subtype, initial_value, alias_base), cpp_type_string (cpp_type_string), cpp_initial_string (cpp_initial_string), flags (flags) { } tree_kind kind (); }; struct V2CC_ImplicitSignalDeclaration : IIR_SignalDeclaration { V2CC_ImplicitSignalDeclaration (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type subtype, pIIR_Expression initial_value, pIIR_ObjectReference alias_base, IR_SignalKind signal_kind) : IIR_SignalDeclaration (pos, declarator, declarative_region, attributes, seqno, subtype, initial_value, alias_base, signal_kind) { } tree_kind kind (); }; struct V2CC_ImplicitSignalDeclaration_WaitFor : V2CC_ImplicitSignalDeclaration { V2CC_ImplicitSignalDeclaration_WaitFor (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type subtype, pIIR_Expression initial_value, pIIR_ObjectReference alias_base, IR_SignalKind signal_kind) : V2CC_ImplicitSignalDeclaration (pos, declarator, declarative_region, attributes, seqno, subtype, initial_value, alias_base, signal_kind) { } tree_kind kind (); }; struct V2CC_ImplicitSignalDeclaration_Transaction : V2CC_ImplicitSignalDeclaration { V2CC_ImplicitSignalDeclaration_Transaction (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type subtype, pIIR_Expression initial_value, pIIR_ObjectReference alias_base, IR_SignalKind signal_kind) : V2CC_ImplicitSignalDeclaration (pos, declarator, declarative_region, attributes, seqno, subtype, initial_value, alias_base, signal_kind) { } tree_kind kind (); }; struct V2CC_InternalCode : IIR_ObjectDeclaration { string cpp_header_string; string cpp_impl_string; int flags; V2CC_InternalCode (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type subtype, pIIR_Expression initial_value, pIIR_ObjectReference alias_base, string cpp_header_string, string cpp_impl_string, int flags) : IIR_ObjectDeclaration (pos, declarator, declarative_region, attributes, seqno, subtype, initial_value, alias_base), cpp_header_string (cpp_header_string), cpp_impl_string (cpp_impl_string), flags (flags) { } tree_kind kind (); }; struct V2CC_ImplicitSubtypeDeclaration : IIR_SubtypeDeclaration { V2CC_ImplicitSubtypeDeclaration (pIIR_PosInfo pos, pIIR_TextLiteral declarator, pIIR_DeclarativeRegion declarative_region, pIIR_AttributeValueList attributes, int seqno, pIIR_Type type) : IIR_SubtypeDeclaration (pos, declarator, declarative_region, attributes, seqno, type) { } tree_kind kind (); }; typedef void (*v2cc_generic_0_mtype) (tree_base_node*, string& str, RegionStack & ctxt, int l); extern tree_generic v2cc_generic_0; void emit_decl (tree_base_node *, string& str, RegionStack & ctxt, int l); typedef void (*v2cc_generic_1_mtype) (tree_base_node*, string& str, RegionStack & ctxt, int l); extern tree_generic v2cc_generic_1; void emit_main (tree_base_node *, string& str, RegionStack & ctxt, int l); typedef bool (*v2cc_generic_2_mtype) (tree_base_node*, string& str, RegionStack & ctxt, id_type t); extern tree_generic v2cc_generic_2; bool emit_expr (tree_base_node *, string& str, RegionStack & ctxt, id_type t); typedef bool (*v2cc_generic_3_mtype) (tree_base_node*, string& str, RegionStack & ctxt, id_type t); extern tree_generic v2cc_generic_3; bool cdfg_emit_expr (tree_base_node *, string& str, RegionStack & ctxt, id_type t); typedef void (*v2cc_generic_4_mtype) (tree_base_node*, string& str, RegionStack & ctxt, int l); extern tree_generic v2cc_generic_4; void emit_hdr (tree_base_node *, string& str, RegionStack & ctxt, int l); typedef void (*v2cc_generic_5_mtype) (tree_base_node*, string& str, RegionStack & ctxt, int l); extern tree_generic v2cc_generic_5; void emit_impl (tree_base_node *, string& str, RegionStack & ctxt, int l); typedef void (*v2cc_generic_6_mtype) (tree_base_node*, string& str, RegionStack & ctxt, int l); extern tree_generic v2cc_generic_6; void cdfg_emit_impl (tree_base_node *, string& str, RegionStack & ctxt, int l); typedef IR_StaticLevel (*v2cc_generic_7_mtype) (tree_base_node*, string& str, RegionStack & ctxt, bool static_info, int l); extern tree_generic v2cc_generic_7; IR_StaticLevel emit_info_init (tree_base_node *, string& str, RegionStack & ctxt, bool static_info, int l); typedef bool (*v2cc_generic_8_mtype) (tree_base_node*, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); extern tree_generic v2cc_generic_8; bool get_acl (tree_base_node *, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); typedef bool (*v2cc_generic_9_mtype) (tree_base_node*, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); extern tree_generic v2cc_generic_9; bool cdfg_get_static_expr (tree_base_node *, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); typedef int (*v2cc_generic_10_mtype) (tree_base_node*, RegionStack & rstack, bool collect_access_info); extern tree_generic v2cc_generic_10; int explore_and_check (tree_base_node *, RegionStack & rstack, bool collect_access_info); typedef pAccessDescriptor (*v2cc_generic_11_mtype) (tree_base_node*, ContextInfo & ctxt, RegionStack & rstack, bool target, int level); extern tree_generic v2cc_generic_11; pAccessDescriptor get_context (tree_base_node *, ContextInfo & ctxt, RegionStack & rstack, bool target, int level); typedef int (*v2cc_generic_12_mtype) (tree_base_node*, RegionStack & rstack); extern tree_generic v2cc_generic_12; int check_expression (tree_base_node *, RegionStack & rstack); typedef op_type (*v2cc_generic_13_mtype) (tree_base_node*); extern tree_generic v2cc_generic_13; op_type get_operator_type (tree_base_node *); typedef pIIR_ObjectDeclaration (*v2cc_generic_14_mtype) (tree_base_node*); extern tree_generic v2cc_generic_14; pIIR_ObjectDeclaration get_object_declaration (tree_base_node *); typedef string (*v2cc_generic_15_mtype) (tree_base_node*, RegionStack & rstack, id_type obj_access); extern tree_generic v2cc_generic_15; string qid (tree_base_node *, RegionStack & rstack, id_type obj_access); typedef string (*v2cc_generic_16_mtype) (tree_base_node*, RegionStack & rstack, bool static_object); extern tree_generic v2cc_generic_16; string get_type_info_obj (tree_base_node *, RegionStack & rstack, bool static_object); typedef vector (*v2cc_generic_17_mtype) (tree_base_node*, RegionStack & rstack, IR_StaticLevel slevel); extern tree_generic v2cc_generic_17; vector get_discrete_range (tree_base_node *, RegionStack & rstack, IR_StaticLevel slevel); typedef IR_StaticLevel (*v2cc_generic_18_mtype) (tree_base_node*, RegionStack & rstack); extern tree_generic v2cc_generic_18; IR_StaticLevel get_static_level (tree_base_node *, RegionStack & rstack); typedef int (*v2cc_generic_19_mtype) (tree_base_node*, RegionStack & rstack); extern tree_generic v2cc_generic_19; int constant_fold (tree_base_node *, RegionStack & rstack); typedef void (*v2cc_generic_20_mtype) (tree_base_node*, RegionStack & rstack); extern tree_generic v2cc_generic_20; void optimize (tree_base_node *, RegionStack & rstack); void m_emit_decl (pIIR_ComponentDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_ConfigurationDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_ArchitectureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_EntityDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_PackageBodyDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_PackageDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_TypeDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_SignalDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_FileDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_ConstantDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_VariableDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_SubprogramDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_decl (pIIR_Declaration , string& str, RegionStack & ctxt, int l); void m_emit_main (pIIR_ConfigurationDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_main (pIIR_ArchitectureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_main (pIIR_Declaration , string& str, RegionStack & ctxt, int l); bool m_emit_expr (pIIR_Allocator , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_NullExpression , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_EnumerationLiteral , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_Expression , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AttrTypeValue , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AttrTypeFunc , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AttrArrayFunc , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AttrSigFunc , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_SignalAttr , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AccessReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_SliceReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_ArrayAggregate , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_RecordAggregate , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_RecordReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_ArrayLiteralExpression , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_ArrayReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_EnumLiteralReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_QualifiedExpression , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_TypeConversion , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_AbstractLiteralExpression , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_SimpleReference , string& str, RegionStack & ctxt, id_type t); bool m_emit_expr (pIIR_FunctionCall , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_Allocator , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_NullExpression , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_EnumerationLiteral , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_Expression , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AttrTypeValue , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AttrTypeFunc , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AttrArrayFunc , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AttrSigFunc , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_SignalAttr , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AccessReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_SliceReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_ArrayAggregate , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_RecordAggregate , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_RecordReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_ArrayLiteralExpression , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_ArrayReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_EnumLiteralReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_QualifiedExpression , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_TypeConversion , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_AbstractLiteralExpression , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_SimpleReference , string& str, RegionStack & ctxt, id_type t); bool m_cdfg_emit_expr (pIIR_FunctionCall , string& str, RegionStack & ctxt, id_type t); void m_emit_hdr (pIIR_Root , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_RecordSubtype , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_RecordType , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_TypeDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ArraySubtype , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ArrayType , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ScalarSubtype , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_FileType , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_AccessType , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_EnumerationType , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_PredefinedProcedureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_PredefinedFunctionDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_SubprogramDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ConcurrentStatementList , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ConcurrentStatement , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ConcurrentGenerateStatement , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_BlockStatement , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ComponentInstantiationStatement , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ProcessStatement , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_PackageBodyDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_PackageDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_ArchitectureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_hdr (pIIR_EntityDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_RecordSubtype , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_RecordType , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_FileType , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_AccessType , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ArraySubtype , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ArrayType , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ScalarSubtype , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_EnumerationType , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_PredefinedProcedureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_PredefinedFunctionDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_SubprogramDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ConcurrentStatementList , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ConcurrentStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_SequentialStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_SequentialStatementList , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ConcurrentGenerateStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_BlockStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_PackageBodyDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_PackageDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ComponentInstantiationStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ProcessStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ArchitectureDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_EntityDeclaration , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_SequentialStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_SignalAssignmentStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ReportStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_AssertionStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_WaitStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ProcedureCallStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ExitStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_NextStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_LoopStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_CaseStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_IfStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_VariableAssignmentStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_ReturnStatement , string& str, RegionStack & ctxt, int l); void m_emit_impl (pIIR_NullStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_FileType , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_AccessType , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ArraySubtype , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ArrayType , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ScalarSubtype , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_EnumerationType , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_PredefinedProcedureDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_PredefinedFunctionDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_SubprogramDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ConcurrentStatementList , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ConcurrentStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_SequentialStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_SequentialStatementList , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ConcurrentGenerateStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_BlockStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_PackageBodyDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_PackageDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ComponentInstantiationStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ProcessStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ArchitectureDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_EntityDeclaration , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_SequentialStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_SignalAssignmentStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ReportStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_AssertionStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_WaitStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ProcedureCallStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ExitStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_NextStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_LoopStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_CaseStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_IfStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_VariableAssignmentStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_ReturnStatement , string& str, RegionStack & ctxt, int l); void m_cdfg_emit_impl (pIIR_NullStatement , string& str, RegionStack & ctxt, int l); IR_StaticLevel m_emit_info_init (pIIR_RecordSubtype , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_RecordType , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_FileType , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_AccessType , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_ArraySubtype , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_ArrayType , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_ScalarSubtype , string& str, RegionStack & ctxt, bool static_info, int l); IR_StaticLevel m_emit_info_init (pIIR_EnumerationType , string& str, RegionStack & ctxt, bool static_info, int l); bool m_get_acl (pIIR_SliceReference , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_get_acl (pIIR_ExplicitRange , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_get_acl (pIIR_RecordReference , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_get_acl (pIIR_ArrayReference , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_get_acl (pIIR_SimpleReference , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_get_acl (pIIR_Expression , list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start); bool m_cdfg_get_static_expr (pIIR_SliceReference , string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); bool m_cdfg_get_static_expr (pIIR_ExplicitRange , string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); bool m_cdfg_get_static_expr (pIIR_ArrayReference , string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); bool m_cdfg_get_static_expr (pIIR_SimpleReference , string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); bool m_cdfg_get_static_expr (pIIR_Expression , string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start); int m_explore_and_check (pIIR_PredefinedFunctionDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ConcurrentGenerateForStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ConcurrentGenerateIfStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ReturnStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_NullStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_Subtype , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ScalarSubtype , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_FileType , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ArraySubtype , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ArrayType , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_RecordType , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_Type , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_EnumerationType , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ProcedureCallStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ReportStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_AssertionStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ComponentInstantiationStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_VariableAssignmentStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_SignalAssignmentStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_AssociationElement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_WaitStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_CaseStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ExitStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_NextStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_LoopStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_WhileLoopStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ForLoopStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_IfStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_SequentialStatementList , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ComponentDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ConfigurationDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_SubprogramDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_PackageBodyDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_PackageDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ProcessStatement , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ConcurrentStatementList , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_ArchitectureDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_InterfaceDeclaration , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_DeclarationList , RegionStack & rstack, bool collect_access_info); int m_explore_and_check (pIIR_EntityDeclaration , RegionStack & rstack, bool collect_access_info); pAccessDescriptor m_get_context (pIIR_AttrArrayFunc , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_AttrTypeValue , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_AttrTypeFunc , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_Allocator , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_QualifiedExpression , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_Type , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_TypeConversion , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_AttrSigFunc , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_WaitStatement , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_RecordAggregate , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ArrayAggregate , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ExpressionList , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_Expression , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_RecordReference , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_SliceReference , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ElementAssociation , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_SingleIndexedAssociation , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_RangeIndexedAssociation , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_OthersIndexedAssociation , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ExplicitRange , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ArrayRange , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_AccessReference , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_ArrayReference , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_SimpleReference , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); pAccessDescriptor m_get_context (pIIR_FunctionCall , ContextInfo & ctxt, RegionStack & rstack, bool target, int level); int m_check_expression (pIIR_QualifiedExpression , RegionStack & rstack); int m_check_expression (pIIR_TypeConversion , RegionStack & rstack); int m_check_expression (pIIR_ArrayLiteralExpression , RegionStack & rstack); int m_check_expression (pIIR_AttrSigFunc , RegionStack & rstack); int m_check_expression (pIIR_RecordAggregate , RegionStack & rstack); int m_check_expression (pIIR_ArrayAggregate , RegionStack & rstack); int m_check_expression (pIIR_ExpressionList , RegionStack & rstack); int m_check_expression (pIIR_Expression , RegionStack & rstack); int m_check_expression (pIIR_RecordReference , RegionStack & rstack); int m_check_expression (pIIR_SliceReference , RegionStack & rstack); int m_check_expression (pIIR_SingleIndexedAssociation , RegionStack & rstack); int m_check_expression (pIIR_RangeIndexedAssociation , RegionStack & rstack); int m_check_expression (pIIR_OthersIndexedAssociation , RegionStack & rstack); int m_check_expression (pIIR_ExplicitRange , RegionStack & rstack); int m_check_expression (pIIR_ArrayRange , RegionStack & rstack); int m_check_expression (pIIR_ArrayReference , RegionStack & rstack); int m_check_expression (pIIR_AccessReference , RegionStack & rstack); int m_check_expression (pIIR_SimpleReference , RegionStack & rstack); int m_check_expression (pIIR_FunctionCall , RegionStack & rstack); op_type m_get_operator_type (pIIR_ProcedureDeclaration ); op_type m_get_operator_type (pIIR_FunctionDeclaration ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_RecordReference ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_ArrayReference ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_SignalAttr ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_SliceReference ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_SimpleReference ); pIIR_ObjectDeclaration m_get_object_declaration (pIIR_ObjectReference ); string m_qid (pIIR_Type , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_Subtype , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_TypeDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_SubprogramDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_SignalDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_ObjectDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pV2CC_ImplicitSignalDeclaration_WaitFor , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_SignalInterfaceDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_InterfaceDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_SignalDeclaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_Declaration , RegionStack & rstack, id_type obj_access); string m_qid (pIIR_LibraryUnit , RegionStack & rstack, id_type obj_access); string m_get_type_info_obj (pIIR_RecordType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_FileType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_AccessType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_ArraySubtype , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_ArrayType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_Subtype , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_RecordSubtype , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_ScalarSubtype , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_FloatingType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_PhysicalType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_IntegerType , RegionStack & rstack, bool static_object); string m_get_type_info_obj (pIIR_EnumerationType , RegionStack & rstack, bool static_object); vector m_get_discrete_range (pIIR_Attr_ArrayREVERSE_RANGE , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_Attr_ArrayRANGE , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_ArraySubtype , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_ArrayType , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_SliceReference , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_ExplicitRange , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_ScalarSubtype , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_FloatingType , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_PhysicalType , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_IntegerType , RegionStack & rstack, IR_StaticLevel slevel); vector m_get_discrete_range (pIIR_EnumerationType , RegionStack & rstack, IR_StaticLevel slevel); IR_StaticLevel m_get_static_level (pIIR_Expression , RegionStack & rstack); IR_StaticLevel m_get_static_level (pIIR_Type , RegionStack & rstack); int m_constant_fold (pIIR_Allocator , RegionStack & rstack); int m_constant_fold (pIIR_QualifiedExpression , RegionStack & rstack); int m_constant_fold (pIIR_PhysicalUnit , RegionStack & rstack); int m_constant_fold (pIIR_EnumerationLiteral , RegionStack & rstack); int m_constant_fold (pIIR_PhysicalLiteral , RegionStack & rstack); int m_constant_fold (pIIR_AbstractLiteralExpression , RegionStack & rstack); int m_constant_fold (pIIR_IntegerLiteral , RegionStack & rstack); int m_constant_fold (pIIR_FloatingPointLiteral , RegionStack & rstack); int m_constant_fold (pIIR_RecordAggregate , RegionStack & rstack); int m_constant_fold (pIIR_ArrayAggregate , RegionStack & rstack); int m_constant_fold (pIIR_ExpressionList , RegionStack & rstack); int m_constant_fold (pIIR_TypeConversion , RegionStack & rstack); int m_constant_fold (pIIR_Expression , RegionStack & rstack); int m_constant_fold (pIIR_RecordReference , RegionStack & rstack); int m_constant_fold (pIIR_SliceReference , RegionStack & rstack); int m_constant_fold (pIIR_SliceIndexedAssociation , RegionStack & rstack); int m_constant_fold (pIIR_RangeIndexedAssociation , RegionStack & rstack); int m_constant_fold (pIIR_SingleIndexedAssociation , RegionStack & rstack); int m_constant_fold (pIIR_OthersIndexedAssociation , RegionStack & rstack); int m_constant_fold (pIIR_ExplicitRange , RegionStack & rstack); int m_constant_fold (pIIR_AttrTypeValue , RegionStack & rstack); int m_constant_fold (pIIR_AttrTypeFunc , RegionStack & rstack); int m_constant_fold (pIIR_AttrArrayFunc , RegionStack & rstack); int m_constant_fold (pIIR_ArrayRange , RegionStack & rstack); int m_constant_fold (pIIR_ArrayReference , RegionStack & rstack); int m_constant_fold (pIIR_SimpleReference , RegionStack & rstack); int m_constant_fold (pIIR_FunctionCall , RegionStack & rstack); int m_constant_fold (pIIR_EnumLiteralReference , RegionStack & rstack); int m_constant_fold (pIIR_ArrayLiteralExpression , RegionStack & rstack); int m_constant_fold (pIIR_AttrSigFunc , RegionStack & rstack); int m_constant_fold (pIIR_ArraySubtype , RegionStack & rstack); int m_constant_fold (pIIR_ArrayType , RegionStack & rstack); int m_constant_fold (pIIR_ScalarSubtype , RegionStack & rstack); int m_constant_fold (pIIR_PhysicalType , RegionStack & rstack); int m_constant_fold (pIIR_Type , RegionStack & rstack); void m_optimize (pIIR_ConcurrentGenerateForStatement , RegionStack & rstack); void m_optimize (pIIR_ConcurrentGenerateIfStatement , RegionStack & rstack); void m_optimize (pIIR_ComponentInstantiationStatement , RegionStack & rstack); void m_optimize (pIIR_ComponentDeclaration , RegionStack & rstack); void m_optimize (pIIR_ConfigurationDeclaration , RegionStack & rstack); void m_optimize (pIIR_PackageBodyDeclaration , RegionStack & rstack); void m_optimize (pIIR_PackageDeclaration , RegionStack & rstack); void m_optimize (pIIR_ProcessStatement , RegionStack & rstack); void m_optimize (pIIR_ConcurrentStatementList , RegionStack & rstack); void m_optimize (pIIR_ArchitectureDeclaration , RegionStack & rstack); void m_optimize (pIIR_Type , RegionStack & rstack); void m_optimize (pIIR_EntityDeclaration , RegionStack & rstack); void m_optimize (pIIR_SubprogramDeclaration , RegionStack & rstack); void m_optimize (pIIR_PredefinedFunctionDeclaration , RegionStack & rstack); struct v2cc_IIR_Declaration_ext : tree_prop { v2cc_IIR_Declaration_ext (); tree_prop_info *get_info (); RuntimeCheckFlags runtime_checks; }; struct v2cc_IIR_Declaration_ext *get_v2cc_ext (pIIR_Declaration n); static inline RuntimeCheckFlags& runtime_checks (pIIR_Declaration n) { return get_v2cc_ext (n)->runtime_checks; } struct v2cc_IIR_Root_ext : tree_prop { v2cc_IIR_Root_ext (); tree_prop_info *get_info (); pIIR_DeclarativeRegion static_declarative_region; int done; }; struct v2cc_IIR_Root_ext *get_v2cc_ext (pIIR_Root n); static inline pIIR_DeclarativeRegion& static_declarative_region (pIIR_Root n) { return get_v2cc_ext (n)->static_declarative_region; } static inline int& done (pIIR_Root n) { return get_v2cc_ext (n)->done; } struct v2cc_IIR_LibraryUnit_ext : tree_prop { v2cc_IIR_LibraryUnit_ext (); tree_prop_info *get_info (); bool generate_code; }; struct v2cc_IIR_LibraryUnit_ext *get_v2cc_ext (pIIR_LibraryUnit n); static inline bool& generate_code (pIIR_LibraryUnit n) { return get_v2cc_ext (n)->generate_code; } struct v2cc_IIR_Expression_ext : tree_prop { v2cc_IIR_Expression_ext (); tree_prop_info *get_info (); RuntimeCheckFlags runtime_checks; bool valid_folded_value; StaticDataType folded_value; }; struct v2cc_IIR_Expression_ext *get_v2cc_ext (pIIR_Expression n); static inline RuntimeCheckFlags& runtime_checks (pIIR_Expression n) { return get_v2cc_ext (n)->runtime_checks; } static inline bool& valid_folded_value (pIIR_Expression n) { return get_v2cc_ext (n)->valid_folded_value; } static inline StaticDataType& folded_value (pIIR_Expression n) { return get_v2cc_ext (n)->folded_value; } struct v2cc_IIR_Literal_ext : tree_prop { v2cc_IIR_Literal_ext (); tree_prop_info *get_info (); bool valid_folded_value; StaticDataType folded_value; }; struct v2cc_IIR_Literal_ext *get_v2cc_ext (pIIR_Literal n); static inline bool& valid_folded_value (pIIR_Literal n) { return get_v2cc_ext (n)->valid_folded_value; } static inline StaticDataType& folded_value (pIIR_Literal n) { return get_v2cc_ext (n)->folded_value; } struct v2cc_IIR_EnumerationLiteral_ext : tree_prop { v2cc_IIR_EnumerationLiteral_ext (); tree_prop_info *get_info (); bool valid_folded_value; StaticDataType folded_value; }; struct v2cc_IIR_EnumerationLiteral_ext *get_v2cc_ext (pIIR_EnumerationLiteral n); static inline bool& valid_folded_value (pIIR_EnumerationLiteral n) { return get_v2cc_ext (n)->valid_folded_value; } static inline StaticDataType& folded_value (pIIR_EnumerationLiteral n) { return get_v2cc_ext (n)->folded_value; } struct v2cc_IIR_PhysicalUnit_ext : tree_prop { v2cc_IIR_PhysicalUnit_ext (); tree_prop_info *get_info (); bool valid_folded_value; StaticDataType folded_value; }; struct v2cc_IIR_PhysicalUnit_ext *get_v2cc_ext (pIIR_PhysicalUnit n); static inline bool& valid_folded_value (pIIR_PhysicalUnit n) { return get_v2cc_ext (n)->valid_folded_value; } static inline StaticDataType& folded_value (pIIR_PhysicalUnit n) { return get_v2cc_ext (n)->folded_value; } struct v2cc_IIR_Type_ext : tree_prop { v2cc_IIR_Type_ext (); tree_prop_info *get_info (); RuntimeCheckFlags runtime_checks; }; struct v2cc_IIR_Type_ext *get_v2cc_ext (pIIR_Type n); static inline RuntimeCheckFlags& runtime_checks (pIIR_Type n) { return get_v2cc_ext (n)->runtime_checks; } struct v2cc_IIR_Subtype_ext : tree_prop { v2cc_IIR_Subtype_ext (); tree_prop_info *get_info (); pV2CC_ImplicitSubtypeDeclaration implicit_subtype_declaration; }; struct v2cc_IIR_Subtype_ext *get_v2cc_ext (pIIR_Subtype n); static inline pV2CC_ImplicitSubtypeDeclaration& implicit_subtype_declaration (pIIR_Subtype n) { return get_v2cc_ext (n)->implicit_subtype_declaration; } struct v2cc_IIR_WaitStatement_ext : tree_prop { v2cc_IIR_WaitStatement_ext (); tree_prop_info *get_info (); int wait_info_index; }; struct v2cc_IIR_WaitStatement_ext *get_v2cc_ext (pIIR_WaitStatement n); static inline int& wait_info_index (pIIR_WaitStatement n) { return get_v2cc_ext (n)->wait_info_index; } struct v2cc_IIR_ProcedureCallStatement_ext : tree_prop { v2cc_IIR_ProcedureCallStatement_ext (); tree_prop_info *get_info (); int wait_info_index; }; struct v2cc_IIR_ProcedureCallStatement_ext *get_v2cc_ext (pIIR_ProcedureCallStatement n); static inline int& wait_info_index (pIIR_ProcedureCallStatement n) { return get_v2cc_ext (n)->wait_info_index; } struct v2cc_IIR_DeclarativeRegion_ext : tree_prop { v2cc_IIR_DeclarativeRegion_ext (); tree_prop_info *get_info (); pIIR_DeclarationList extended_declarations; ContextInfo context; }; struct v2cc_IIR_DeclarativeRegion_ext *get_v2cc_ext (pIIR_DeclarativeRegion n); static inline pIIR_DeclarationList& extended_declarations (pIIR_DeclarativeRegion n) { return get_v2cc_ext (n)->extended_declarations; } static inline ContextInfo& context (pIIR_DeclarativeRegion n) { return get_v2cc_ext (n)->context; } struct v2cc_IIR_EntityDeclaration_ext : tree_prop { v2cc_IIR_EntityDeclaration_ext (); tree_prop_info *get_info (); pIIR_DeclarationList extended_port_clause; pIIR_DeclarationList extended_generic_clause; }; struct v2cc_IIR_EntityDeclaration_ext *get_v2cc_ext (pIIR_EntityDeclaration n); static inline pIIR_DeclarationList& extended_port_clause (pIIR_EntityDeclaration n) { return get_v2cc_ext (n)->extended_port_clause; } static inline pIIR_DeclarationList& extended_generic_clause (pIIR_EntityDeclaration n) { return get_v2cc_ext (n)->extended_generic_clause; } struct v2cc_IIR_SubprogramDeclaration_ext : tree_prop { v2cc_IIR_SubprogramDeclaration_ext (); tree_prop_info *get_info (); pIIR_DeclarationList extended_interface_declarations; }; struct v2cc_IIR_SubprogramDeclaration_ext *get_v2cc_ext (pIIR_SubprogramDeclaration n); static inline pIIR_DeclarationList& extended_interface_declarations (pIIR_SubprogramDeclaration n) { return get_v2cc_ext (n)->extended_interface_declarations; } struct v2cc_IIR_ConcurrentStatement_ext : tree_prop { v2cc_IIR_ConcurrentStatement_ext (); tree_prop_info *get_info (); pIIR_DeclarationList extended_interface_declarations; }; struct v2cc_IIR_ConcurrentStatement_ext *get_v2cc_ext (pIIR_ConcurrentStatement n); static inline pIIR_DeclarationList& extended_interface_declarations (pIIR_ConcurrentStatement n) { return get_v2cc_ext (n)->extended_interface_declarations; } struct v2cc_IIR_BlockStatement_ext : tree_prop { v2cc_IIR_BlockStatement_ext (); tree_prop_info *get_info (); pIIR_DeclarationList extended_port_clause; pIIR_DeclarationList extended_generic_clause; }; struct v2cc_IIR_BlockStatement_ext *get_v2cc_ext (pIIR_BlockStatement n); static inline pIIR_DeclarationList& extended_port_clause (pIIR_BlockStatement n) { return get_v2cc_ext (n)->extended_port_clause; } static inline pIIR_DeclarationList& extended_generic_clause (pIIR_BlockStatement n) { return get_v2cc_ext (n)->extended_generic_clause; } struct v2cc_IIR_ArrayAggregate_ext : tree_prop { v2cc_IIR_ArrayAggregate_ext (); tree_prop_info *get_info (); int max_index; int min_index; int total_length; bool locally_static_ranges; bool has_others; bool known_subtype; bool named_association; IR_Direction dest_direction; int dest_right; int dest_left; int dest_length; }; struct v2cc_IIR_ArrayAggregate_ext *get_v2cc_ext (pIIR_ArrayAggregate n); static inline int& max_index (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->max_index; } static inline int& min_index (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->min_index; } static inline int& total_length (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->total_length; } static inline bool& locally_static_ranges (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->locally_static_ranges; } static inline bool& has_others (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->has_others; } static inline bool& known_subtype (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->known_subtype; } static inline bool& named_association (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->named_association; } static inline IR_Direction& dest_direction (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->dest_direction; } static inline int& dest_right (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->dest_right; } static inline int& dest_left (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->dest_left; } static inline int& dest_length (pIIR_ArrayAggregate n) { return get_v2cc_ext (n)->dest_length; } struct v2cc_IIR_IndexedAssociation_ext : tree_prop { v2cc_IIR_IndexedAssociation_ext (); tree_prop_info *get_info (); int max_index; int min_index; int length; bool locally_static_range; }; struct v2cc_IIR_IndexedAssociation_ext *get_v2cc_ext (pIIR_IndexedAssociation n); static inline int& max_index (pIIR_IndexedAssociation n) { return get_v2cc_ext (n)->max_index; } static inline int& min_index (pIIR_IndexedAssociation n) { return get_v2cc_ext (n)->min_index; } static inline int& length (pIIR_IndexedAssociation n) { return get_v2cc_ext (n)->length; } static inline bool& locally_static_range (pIIR_IndexedAssociation n) { return get_v2cc_ext (n)->locally_static_range; } struct v2cc_IIR_EnumerationType_ext : tree_prop { v2cc_IIR_EnumerationType_ext (); tree_prop_info *get_info (); int enum_item_number; }; struct v2cc_IIR_EnumerationType_ext *get_v2cc_ext (pIIR_EnumerationType n); static inline int& enum_item_number (pIIR_EnumerationType n) { return get_v2cc_ext (n)->enum_item_number; } struct v2cc_IIR_ObjectDeclaration_ext : tree_prop { v2cc_IIR_ObjectDeclaration_ext (); tree_prop_info *get_info (); bool alias_check_bounds; }; struct v2cc_IIR_ObjectDeclaration_ext *get_v2cc_ext (pIIR_ObjectDeclaration n); static inline bool& alias_check_bounds (pIIR_ObjectDeclaration n) { return get_v2cc_ext (n)->alias_check_bounds; } struct v2cc_IIR_LoopStatement_ext : tree_prop { v2cc_IIR_LoopStatement_ext (); tree_prop_info *get_info (); int loop_id; bool exit_statement_used; bool next_statement_used; }; struct v2cc_IIR_LoopStatement_ext *get_v2cc_ext (pIIR_LoopStatement n); static inline int& loop_id (pIIR_LoopStatement n) { return get_v2cc_ext (n)->loop_id; } static inline bool& exit_statement_used (pIIR_LoopStatement n) { return get_v2cc_ext (n)->exit_statement_used; } static inline bool& next_statement_used (pIIR_LoopStatement n) { return get_v2cc_ext (n)->next_statement_used; } struct v2cc_IIR_ProcessStatement_ext : tree_prop { v2cc_IIR_ProcessStatement_ext (); tree_prop_info *get_info (); bool has_wait_for; bool has_wait; }; struct v2cc_IIR_ProcessStatement_ext *get_v2cc_ext (pIIR_ProcessStatement n); static inline bool& has_wait_for (pIIR_ProcessStatement n) { return get_v2cc_ext (n)->has_wait_for; } static inline bool& has_wait (pIIR_ProcessStatement n) { return get_v2cc_ext (n)->has_wait; } struct v2cc_IIR_ProcedureDeclaration_ext : tree_prop { v2cc_IIR_ProcedureDeclaration_ext (); tree_prop_info *get_info (); bool has_wait_for; bool has_wait; }; struct v2cc_IIR_ProcedureDeclaration_ext *get_v2cc_ext (pIIR_ProcedureDeclaration n); static inline bool& has_wait_for (pIIR_ProcedureDeclaration n) { return get_v2cc_ext (n)->has_wait_for; } static inline bool& has_wait (pIIR_ProcedureDeclaration n) { return get_v2cc_ext (n)->has_wait; } void init_v2cc_chunk (); #endif freehdl-0.0.7/v2cc/v2cc-chunk.cc0000644000175000017500000111327311175357262013200 00000000000000// generated by gen-nodes from `v2cc-chunk.t'. Do not edit. #include "v2cc-chunk.h" tree_ctype_info op_type_ctype_info = { -1, "op_type", NULL, }; tree_ctype_info id_type_ctype_info = { -1, "id_type", NULL, }; tree_ctype_info RuntimeCheckFlags_ctype_info = { -1, "RuntimeCheckFlags", NULL, }; tree_ctype_info RangeDescriptor_vec_ctype_info = { -1, "RangeDescriptor_vec", NULL, }; tree_ctype_info pIIR_ObjectDeclaration_ctype_info = { -1, "pIIR_ObjectDeclaration", NULL, }; tree_ctype_info set_IIR_SimpleReference_ctype_info = { -1, "set_IIR_SimpleReference", NULL, }; tree_ctype_info string_ref_ctype_info = { -1, "string_ref", NULL, }; tree_ctype_info string_ctype_info = { -1, "string", NULL, }; tree_ctype_info StaticDataType_ctype_info = { -1, "StaticDataType", NULL, }; tree_ctype_info lint_ctype_info = { -1, "lint", NULL, }; tree_ctype_info pAccessDescriptor_ctype_info = { -1, "pAccessDescriptor", NULL, }; tree_ctype_info pContextInfo_ctype_info = { -1, "pContextInfo", NULL, }; tree_ctype_info ContextInfo_ref_ctype_info = { -1, "ContextInfo_ref", NULL, }; tree_ctype_info ContextInfo_ctype_info = { -1, "ContextInfo", NULL, }; tree_ctype_info RegionStack_ref_ctype_info = { -1, "RegionStack_ref", NULL, }; tree_ctype_info RegionStack_ctype_info = { -1, "RegionStack", NULL, }; tree_ctype_info vector_lint_ref_ctype_info = { -1, "vector_lint_ref", NULL, }; tree_ctype_info vector_bool_ctype_info = { -1, "vector_bool", NULL, }; tree_ctype_info vector_string_ref_ctype_info = { -1, "vector_string_ref", NULL, }; tree_ctype_info vector_string_ctype_info = { -1, "vector_string", NULL, }; tree_ctype_info list_expr_pair_ref_ctype_info = { -1, "list_expr_pair_ref", NULL, }; tree_ctype_info list_string_ctype_info = { -1, "list_string", NULL, }; tree_ctype_info set_string_ctype_info = { -1, "set_string", NULL, }; static tree_slot_info V2CC_ImplicitSubtypeDeclaration_slot_info[] = { }; tree_kind_info V2CC_IMPLICIT_SUBTYPE_DECLARATION_kind_info = { 0, "V2CC_ImplicitSubtypeDeclaration", &v2cc_chunk_info, IR_SUBTYPE_DECLARATION, V2CC_IMPLICIT_SUBTYPE_DECLARATION, IR_SUBTYPE_DECLARATION, 0, 0, V2CC_ImplicitSubtypeDeclaration_slot_info, sizeof(V2CC_ImplicitSubtypeDeclaration) }; static tree_slot_info V2CC_InternalCode_slot_info[] = { { (tree_kind_info*)&string_ctype_info, "cpp_header_string", (tree_base_node*tree_base_node::*)&V2CC_InternalCode::cpp_header_string }, { (tree_kind_info*)&string_ctype_info, "cpp_impl_string", (tree_base_node*tree_base_node::*)&V2CC_InternalCode::cpp_impl_string }, { (tree_kind_info*)&int_ctype_info, "flags", (tree_base_node*tree_base_node::*)&V2CC_InternalCode::flags }, }; tree_kind_info V2CC_INTERNAL_CODE_kind_info = { 1, "V2CC_InternalCode", &v2cc_chunk_info, IR_OBJECT_DECLARATION, V2CC_INTERNAL_CODE, IR_OBJECT_DECLARATION, 0, 3, V2CC_InternalCode_slot_info, sizeof(V2CC_InternalCode) }; static tree_slot_info V2CC_ImplicitSignalDeclaration_slot_info[] = { }; tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_kind_info = { 2, "V2CC_ImplicitSignalDeclaration", &v2cc_chunk_info, IR_SIGNAL_DECLARATION, V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR, IR_SIGNAL_DECLARATION, 0, 0, V2CC_ImplicitSignalDeclaration_slot_info, sizeof(V2CC_ImplicitSignalDeclaration) }; static tree_slot_info V2CC_ImplicitSignalDeclaration_Transaction_slot_info[] = { }; tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION_kind_info = { 3, "V2CC_ImplicitSignalDeclaration_Transaction", &v2cc_chunk_info, V2CC_IMPLICIT_SIGNAL_DECLARATION, V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION, IR_SIGNAL_DECLARATION, 0, 0, V2CC_ImplicitSignalDeclaration_Transaction_slot_info, sizeof(V2CC_ImplicitSignalDeclaration_Transaction) }; static tree_slot_info V2CC_ImplicitSignalDeclaration_WaitFor_slot_info[] = { }; tree_kind_info V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR_kind_info = { 4, "V2CC_ImplicitSignalDeclaration_WaitFor", &v2cc_chunk_info, V2CC_IMPLICIT_SIGNAL_DECLARATION, V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR, IR_SIGNAL_DECLARATION, 0, 0, V2CC_ImplicitSignalDeclaration_WaitFor_slot_info, sizeof(V2CC_ImplicitSignalDeclaration_WaitFor) }; static tree_slot_info V2CC_InternalObjectDeclaration_slot_info[] = { { (tree_kind_info*)&string_ctype_info, "cpp_type_string", (tree_base_node*tree_base_node::*)&V2CC_InternalObjectDeclaration::cpp_type_string }, { (tree_kind_info*)&string_ctype_info, "cpp_initial_string", (tree_base_node*tree_base_node::*)&V2CC_InternalObjectDeclaration::cpp_initial_string }, { (tree_kind_info*)&int_ctype_info, "flags", (tree_base_node*tree_base_node::*)&V2CC_InternalObjectDeclaration::flags }, }; tree_kind_info V2CC_INTERNAL_OBJECT_DECLARATION_kind_info = { 5, "V2CC_InternalObjectDeclaration", &v2cc_chunk_info, IR_OBJECT_DECLARATION, V2CC_INTERNAL_OBJECT_DECLARATION, IR_OBJECT_DECLARATION, 0, 3, V2CC_InternalObjectDeclaration_slot_info, sizeof(V2CC_InternalObjectDeclaration) }; tree_kind V2CC_InternalObjectDeclaration::kind () { return V2CC_INTERNAL_OBJECT_DECLARATION; } tree_kind V2CC_ImplicitSignalDeclaration::kind () { return V2CC_IMPLICIT_SIGNAL_DECLARATION; } tree_kind V2CC_ImplicitSignalDeclaration_WaitFor::kind () { return V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR; } tree_kind V2CC_ImplicitSignalDeclaration_Transaction::kind () { return V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION; } tree_kind V2CC_InternalCode::kind () { return V2CC_INTERNAL_CODE; } tree_kind V2CC_ImplicitSubtypeDeclaration::kind () { return V2CC_IMPLICIT_SUBTYPE_DECLARATION; } tree_generic v2cc_generic_0; void emit_decl (tree_base_node *__node__, string& str, RegionStack & ctxt, int l) { v2cc_generic_0_mtype __method__ = v2cc_generic_0.find (__node__->kind ()); (*__method__) (__node__, str, ctxt, l); } tree_generic v2cc_generic_1; void emit_main (tree_base_node *__node__, string& str, RegionStack & ctxt, int l) { v2cc_generic_1_mtype __method__ = v2cc_generic_1.find (__node__->kind ()); (*__method__) (__node__, str, ctxt, l); } tree_generic v2cc_generic_2; bool emit_expr (tree_base_node *__node__, string& str, RegionStack & ctxt, id_type t) { v2cc_generic_2_mtype __method__ = v2cc_generic_2.find (__node__->kind ()); return (*__method__) (__node__, str, ctxt, t); } tree_generic v2cc_generic_3; bool cdfg_emit_expr (tree_base_node *__node__, string& str, RegionStack & ctxt, id_type t) { v2cc_generic_3_mtype __method__ = v2cc_generic_3.find (__node__->kind ()); return (*__method__) (__node__, str, ctxt, t); } tree_generic v2cc_generic_4; void emit_hdr (tree_base_node *__node__, string& str, RegionStack & ctxt, int l) { v2cc_generic_4_mtype __method__ = v2cc_generic_4.find (__node__->kind ()); (*__method__) (__node__, str, ctxt, l); } tree_generic v2cc_generic_5; void emit_impl (tree_base_node *__node__, string& str, RegionStack & ctxt, int l) { v2cc_generic_5_mtype __method__ = v2cc_generic_5.find (__node__->kind ()); (*__method__) (__node__, str, ctxt, l); } tree_generic v2cc_generic_6; void cdfg_emit_impl (tree_base_node *__node__, string& str, RegionStack & ctxt, int l) { v2cc_generic_6_mtype __method__ = v2cc_generic_6.find (__node__->kind ()); (*__method__) (__node__, str, ctxt, l); } tree_generic v2cc_generic_7; IR_StaticLevel emit_info_init (tree_base_node *__node__, string& str, RegionStack & ctxt, bool static_info, int l) { v2cc_generic_7_mtype __method__ = v2cc_generic_7.find (__node__->kind ()); return (*__method__) (__node__, str, ctxt, static_info, l); } tree_generic v2cc_generic_8; bool get_acl (tree_base_node *__node__, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start) { v2cc_generic_8_mtype __method__ = v2cc_generic_8.find (__node__->kind ()); return (*__method__) (__node__, alist, ctxt, slevel, start); } tree_generic v2cc_generic_9; bool cdfg_get_static_expr (tree_base_node *__node__, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start) { v2cc_generic_9_mtype __method__ = v2cc_generic_9.find (__node__->kind ()); return (*__method__) (__node__, str, ctxt, slevel, t, start); } tree_generic v2cc_generic_10; int explore_and_check (tree_base_node *__node__, RegionStack & rstack, bool collect_access_info) { v2cc_generic_10_mtype __method__ = v2cc_generic_10.find (__node__->kind ()); return (*__method__) (__node__, rstack, collect_access_info); } tree_generic v2cc_generic_11; pAccessDescriptor get_context (tree_base_node *__node__, ContextInfo & ctxt, RegionStack & rstack, bool target, int level) { v2cc_generic_11_mtype __method__ = v2cc_generic_11.find (__node__->kind ()); return (*__method__) (__node__, ctxt, rstack, target, level); } tree_generic v2cc_generic_12; int check_expression (tree_base_node *__node__, RegionStack & rstack) { v2cc_generic_12_mtype __method__ = v2cc_generic_12.find (__node__->kind ()); return (*__method__) (__node__, rstack); } tree_generic v2cc_generic_13; op_type get_operator_type (tree_base_node *__node__) { v2cc_generic_13_mtype __method__ = v2cc_generic_13.find (__node__->kind ()); return (*__method__) (__node__); } tree_generic v2cc_generic_14; pIIR_ObjectDeclaration get_object_declaration (tree_base_node *__node__) { v2cc_generic_14_mtype __method__ = v2cc_generic_14.find (__node__->kind ()); return (*__method__) (__node__); } tree_generic v2cc_generic_15; string qid (tree_base_node *__node__, RegionStack & rstack, id_type obj_access) { v2cc_generic_15_mtype __method__ = v2cc_generic_15.find (__node__->kind ()); return (*__method__) (__node__, rstack, obj_access); } tree_generic v2cc_generic_16; string get_type_info_obj (tree_base_node *__node__, RegionStack & rstack, bool static_object) { v2cc_generic_16_mtype __method__ = v2cc_generic_16.find (__node__->kind ()); return (*__method__) (__node__, rstack, static_object); } tree_generic v2cc_generic_17; vector get_discrete_range (tree_base_node *__node__, RegionStack & rstack, IR_StaticLevel slevel) { v2cc_generic_17_mtype __method__ = v2cc_generic_17.find (__node__->kind ()); return (*__method__) (__node__, rstack, slevel); } tree_generic v2cc_generic_18; IR_StaticLevel get_static_level (tree_base_node *__node__, RegionStack & rstack) { v2cc_generic_18_mtype __method__ = v2cc_generic_18.find (__node__->kind ()); return (*__method__) (__node__, rstack); } tree_generic v2cc_generic_19; int constant_fold (tree_base_node *__node__, RegionStack & rstack) { v2cc_generic_19_mtype __method__ = v2cc_generic_19.find (__node__->kind ()); return (*__method__) (__node__, rstack); } tree_generic v2cc_generic_20; void optimize (tree_base_node *__node__, RegionStack & rstack) { v2cc_generic_20_mtype __method__ = v2cc_generic_20.find (__node__->kind ()); (*__method__) (__node__, rstack); } static v2cc_generic_0_mtype mtab_0_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_Declaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_UseClause (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_LibraryClause (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_Label (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_DisconnectSpecification (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_PhysicalUnit (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_LibraryDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_AttributeDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ObjectDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_InterfaceDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_FileInterfaceDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SignalInterfaceDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_VariableInterfaceDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConstantInterfaceDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_FileDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_FileDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SignalDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SignalDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_VariableDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_VariableDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_VariableDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SharedVariableDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_ConstantDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConstantDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_TypeDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_TypeDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_TypeDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SubtypeDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ElementDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_EnumerationLiteral (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_DeclarativeRegion (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConcurrentStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConcurrentGenerateStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConcurrentGenerateForStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ComponentInstantiationStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ProcessStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SensitizedProcessStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ImplicitProcessStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_BlockStatement (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConfigurationItem (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ComponentConfiguration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_BlockConfiguration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ArchitectureRef (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_LibraryUnit (v2cc_generic_0_mtype) ((void (*)(pIIR_ConfigurationDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ConfigurationDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_PackageBodyDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_PackageBodyDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_PackageDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_PackageDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_ArchitectureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ArchitectureDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_EntityDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_EntityDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_ComponentDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ComponentDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_SubprogramDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_FunctionDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_PredefinedFunctionDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_ProcedureDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_PredefinedProcedureDeclaration (v2cc_generic_0_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_decl), // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_0[1] = { { &fire_chunk_info, 205, mtab_0_fire }, }; static v2cc_generic_1_mtype mtab_1_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_Declaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_UseClause (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_LibraryClause (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_Label (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_DisconnectSpecification (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_PhysicalUnit (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_LibraryDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_AttributeDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ObjectDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_InterfaceDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_FileInterfaceDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SignalInterfaceDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_VariableInterfaceDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConstantInterfaceDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_FileDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SignalDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_VariableDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SharedVariableDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConstantDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_TypeDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SubtypeDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ElementDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_EnumerationLiteral (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_DeclarativeRegion (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConcurrentStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConcurrentGenerateStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConcurrentGenerateForStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ComponentInstantiationStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ProcessStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SensitizedProcessStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ImplicitProcessStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_BlockStatement (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConfigurationItem (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ComponentConfiguration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_BlockConfiguration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ArchitectureRef (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_LibraryUnit (v2cc_generic_1_mtype) ((void (*)(pIIR_ConfigurationDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ConfigurationDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_PackageBodyDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_PackageDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_ArchitectureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ArchitectureDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_EntityDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ComponentDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_SubprogramDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_FunctionDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_PredefinedFunctionDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_ProcedureDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_PredefinedProcedureDeclaration (v2cc_generic_1_mtype) ((void (*)(pIIR_Declaration, string& str, RegionStack & ctxt, int l))&m_emit_main), // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_1[1] = { { &fire_chunk_info, 205, mtab_1_fire }, }; static v2cc_generic_2_mtype mtab_2_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Expression (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ValueAttr (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AttrTypeValue (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LENGTH (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ASCENDING (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_HIGH (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LOW (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_RIGHT (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LEFT (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_FunctionAttr (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AttrArrayFunc (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayLENGTH (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayASCENDING (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayLOW (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayHIGH (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayRIGHT (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ArrayLEFT (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AttrTypeFunc (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_RIGHTOF (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LEFTOF (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_PRED (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_SUCC (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_VAL (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_POS (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_VALUE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_IMAGE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AttrSigFunc (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_DRIVING_VALUE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_DRIVING (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LAST_VALUE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LAST_ACTIVE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_LAST_EVENT (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_ACTIVE (v2cc_generic_2_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_EVENT (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ObjectReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_SignalAttr (v2cc_generic_2_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_TRANSACTION (v2cc_generic_2_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_QUIET (v2cc_generic_2_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_STABLE (v2cc_generic_2_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Attr_DELAYED (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_GenericArrayReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_SliceReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_SliceReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_ArrayReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ArrayReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_RecordReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_RecordReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_AccessReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AccessReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_SimpleReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_SimpleReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_OpenExpression (v2cc_generic_2_mtype) ((bool (*)(pIIR_Allocator, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Allocator (v2cc_generic_2_mtype) ((bool (*)(pIIR_TypeConversion, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_TypeConversion (v2cc_generic_2_mtype) ((bool (*)(pIIR_QualifiedExpression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_QualifiedExpression (v2cc_generic_2_mtype) ((bool (*)(pIIR_FunctionCall, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_FunctionCall (v2cc_generic_2_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_Aggregate (v2cc_generic_2_mtype) ((bool (*)(pIIR_ArrayAggregate, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ArrayAggregate (v2cc_generic_2_mtype) ((bool (*)(pIIR_ArrayAggregate, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ArtificialArrayAggregate (v2cc_generic_2_mtype) ((bool (*)(pIIR_RecordAggregate, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_RecordAggregate (v2cc_generic_2_mtype) ((bool (*)(pIIR_RecordAggregate, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ArtificialRecordAggregate (v2cc_generic_2_mtype) ((bool (*)(pIIR_NullExpression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_NullExpression (v2cc_generic_2_mtype) ((bool (*)(pIIR_EnumLiteralReference, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_EnumLiteralReference (v2cc_generic_2_mtype) ((bool (*)(pIIR_ArrayLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_ArrayLiteralExpression (v2cc_generic_2_mtype) ((bool (*)(pIIR_AbstractLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_AbstractLiteralExpression (v2cc_generic_2_mtype) ((bool (*)(pIIR_AbstractLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration (v2cc_generic_2_mtype) ((bool (*)(pIIR_EnumerationLiteral, string& str, RegionStack & ctxt, id_type t))&m_emit_expr), // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_2[1] = { { &fire_chunk_info, 205, mtab_2_fire }, }; static v2cc_generic_3_mtype mtab_3_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Expression (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ValueAttr (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AttrTypeValue (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LENGTH (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ASCENDING (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_HIGH (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LOW (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_RIGHT (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeValue, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LEFT (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_FunctionAttr (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AttrArrayFunc (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayLENGTH (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayASCENDING (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayLOW (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayHIGH (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayRIGHT (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrArrayFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ArrayLEFT (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AttrTypeFunc (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_RIGHTOF (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LEFTOF (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_PRED (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_SUCC (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_VAL (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_POS (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_VALUE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrTypeFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_IMAGE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AttrSigFunc (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_DRIVING_VALUE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_DRIVING (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LAST_VALUE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LAST_ACTIVE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_LAST_EVENT (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_ACTIVE (v2cc_generic_3_mtype) ((bool (*)(pIIR_AttrSigFunc, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_EVENT (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ObjectReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_SignalAttr (v2cc_generic_3_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_TRANSACTION (v2cc_generic_3_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_QUIET (v2cc_generic_3_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_STABLE (v2cc_generic_3_mtype) ((bool (*)(pIIR_SignalAttr, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Attr_DELAYED (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_GenericArrayReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_SliceReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_SliceReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_ArrayReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ArrayReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_RecordReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_RecordReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_AccessReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AccessReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_SimpleReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_SimpleReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_OpenExpression (v2cc_generic_3_mtype) ((bool (*)(pIIR_Allocator, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Allocator (v2cc_generic_3_mtype) ((bool (*)(pIIR_TypeConversion, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_TypeConversion (v2cc_generic_3_mtype) ((bool (*)(pIIR_QualifiedExpression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_QualifiedExpression (v2cc_generic_3_mtype) ((bool (*)(pIIR_FunctionCall, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_FunctionCall (v2cc_generic_3_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_Aggregate (v2cc_generic_3_mtype) ((bool (*)(pIIR_ArrayAggregate, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ArrayAggregate (v2cc_generic_3_mtype) ((bool (*)(pIIR_ArrayAggregate, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ArtificialArrayAggregate (v2cc_generic_3_mtype) ((bool (*)(pIIR_RecordAggregate, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_RecordAggregate (v2cc_generic_3_mtype) ((bool (*)(pIIR_RecordAggregate, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ArtificialRecordAggregate (v2cc_generic_3_mtype) ((bool (*)(pIIR_NullExpression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_NullExpression (v2cc_generic_3_mtype) ((bool (*)(pIIR_EnumLiteralReference, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_EnumLiteralReference (v2cc_generic_3_mtype) ((bool (*)(pIIR_ArrayLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_ArrayLiteralExpression (v2cc_generic_3_mtype) ((bool (*)(pIIR_AbstractLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_AbstractLiteralExpression (v2cc_generic_3_mtype) ((bool (*)(pIIR_AbstractLiteralExpression, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration (v2cc_generic_3_mtype) ((bool (*)(pIIR_EnumerationLiteral, string& str, RegionStack & ctxt, id_type t))&m_cdfg_emit_expr), // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_3[1] = { { &fire_chunk_info, 205, mtab_3_fire }, }; static v2cc_generic_4_mtype mtab_4_fire[] = { (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Root (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SequentialStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_NullStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ReturnStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LoopControlStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ExitStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_NextStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LoopStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_WhileLoopStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ForLoopStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_CaseStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IfStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ProcedureCallStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_VariableAssignmentStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SignalAssignmentStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ReportStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AssertionStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_WaitStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Expression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ValueAttr (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttrTypeValue (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LENGTH (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ASCENDING (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_HIGH (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LOW (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_RIGHT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LEFT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FunctionAttr (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttrArrayFunc (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayLENGTH (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayASCENDING (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayLOW (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayHIGH (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayRIGHT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayLEFT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttrTypeFunc (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_RIGHTOF (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LEFTOF (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_PRED (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_SUCC (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_VAL (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_POS (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_VALUE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_IMAGE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttrSigFunc (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_DRIVING_VALUE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_DRIVING (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LAST_VALUE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LAST_ACTIVE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_LAST_EVENT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ACTIVE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_EVENT (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ObjectReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SignalAttr (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_TRANSACTION (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_QUIET (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_STABLE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_DELAYED (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_GenericArrayReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SliceReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArrayReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_RecordReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AccessReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SimpleReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_OpenExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Allocator (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_TypeConversion (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_QualifiedExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FunctionCall (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Aggregate (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArrayAggregate (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArtificialArrayAggregate (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_RecordAggregate (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArtificialRecordAggregate (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_NullExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EnumLiteralReference (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArrayLiteralExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AbstractLiteralExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PhysicalLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Declaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_UseClause (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LibraryClause (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Label (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_DisconnectSpecification (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PhysicalUnit (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LibraryDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttributeDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ObjectDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_InterfaceDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FileInterfaceDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SignalInterfaceDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_VariableInterfaceDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConstantInterfaceDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FileDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SignalDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_VariableDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SharedVariableDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConstantDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_TypeDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_TypeDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_TypeDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SubtypeDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ElementDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EnumerationLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_DeclarativeRegion (v2cc_generic_4_mtype) ((void (*)(pIIR_ConcurrentStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConcurrentStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConcurrentGenerateStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConcurrentGenerateForStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ComponentInstantiationStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ComponentInstantiationStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ProcessStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SensitizedProcessStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ImplicitProcessStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_BlockStatement, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_BlockStatement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConfigurationItem (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ComponentConfiguration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_BlockConfiguration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArchitectureRef (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LibraryUnit (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConfigurationDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_PackageBodyDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PackageBodyDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_PackageDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PackageDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_ArchitectureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArchitectureDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_EntityDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EntityDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ComponentDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SubprogramDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FunctionDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_PredefinedFunctionDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PredefinedFunctionDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ProcedureDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_PredefinedProcedureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PredefinedProcedureDeclaration (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LoopDeclarativeRegion (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Type (v2cc_generic_4_mtype) ((void (*)(pIIR_FileType, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FileType (v2cc_generic_4_mtype) ((void (*)(pIIR_AccessType, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AccessType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_CompositeType (v2cc_generic_4_mtype) ((void (*)(pIIR_ArrayType, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArrayType (v2cc_generic_4_mtype) ((void (*)(pIIR_RecordType, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_RecordType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ScalarType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_PhysicalType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FloatingType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IntegerType (v2cc_generic_4_mtype) ((void (*)(pIIR_EnumerationType, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EnumerationType (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Subtype (v2cc_generic_4_mtype) ((void (*)(pIIR_ArraySubtype, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArraySubtype (v2cc_generic_4_mtype) ((void (*)(pIIR_RecordSubtype, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_RecordSubtype (v2cc_generic_4_mtype) ((void (*)(pIIR_ScalarSubtype, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ScalarSubtype (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Range (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ArrayRange (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayREVERSE_RANGE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Attr_ArrayRANGE (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ExplicitRange (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_List (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IdentifierList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConfigurationSpecificationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ComponentInstantiationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ElementAssociationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IndexedAssociationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ExpressionList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_TypeList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_WaveformList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_UnitList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SequentialStatementList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_LibraryUnitList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_InterfaceList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EnumerationLiteralList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EntityClassEntryList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ElementDeclarationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_DeclarationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConfigurationItemList (v2cc_generic_4_mtype) ((void (*)(pIIR_ConcurrentStatementList, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConcurrentStatementList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ChoiceList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_CaseStatementAlternativeList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttributeValueList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AssociationList (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Tuple (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ConfigurationSpecification (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_BindingIndication (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AttributeValue (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IndexedAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_OthersIndexedAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_RangeIndexedAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SliceIndexedAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_SingleIndexedAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ElementAssociation (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_WaveformElement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_EntityClassEntry (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Choice (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ChoiceByOthers (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ChoiceByRange (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_ChoiceByExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_CaseStatementAlternative (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AssociationElement (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AssociationElementOpen (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AssociationElementByExpression (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Literal (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_AbstractLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_FloatingPointLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_IntegerLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_TextLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_StringLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_CharacterLiteral (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Identifier (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Dummy (v2cc_generic_4_mtype) ((void (*)(pIIR_Root, string& str, RegionStack & ctxt, int l))&m_emit_hdr), // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_4[1] = { { &fire_chunk_info, 205, mtab_4_fire }, }; static v2cc_generic_5_mtype mtab_5_fire[] = { 0, // IIR_Root (v2cc_generic_5_mtype) ((void (*)(pIIR_SequentialStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_SequentialStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_NullStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_NullStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ReturnStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ReturnStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_SequentialStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_LoopControlStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ExitStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ExitStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_NextStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_NextStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_LoopStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_WhileLoopStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ForLoopStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_CaseStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_CaseStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_IfStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_IfStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ProcedureCallStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ProcedureCallStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_VariableAssignmentStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_VariableAssignmentStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_SignalAssignmentStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_SignalAssignmentStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ReportStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ReportStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_AssertionStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_AssertionStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_WaitStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion (v2cc_generic_5_mtype) ((void (*)(pIIR_ConcurrentStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ConcurrentStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ConcurrentGenerateStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ConcurrentGenerateForStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ComponentInstantiationStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ComponentInstantiationStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ProcessStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_SensitizedProcessStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ImplicitProcessStatement (v2cc_generic_5_mtype) ((void (*)(pIIR_BlockStatement, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_PackageBodyDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_PackageBodyDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_PackageDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_PackageDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_ArchitectureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ArchitectureDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_EntityDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_SubprogramDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_FunctionDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_PredefinedFunctionDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_PredefinedFunctionDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ProcedureDeclaration (v2cc_generic_5_mtype) ((void (*)(pIIR_PredefinedProcedureDeclaration, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type (v2cc_generic_5_mtype) ((void (*)(pIIR_FileType, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_FileType (v2cc_generic_5_mtype) ((void (*)(pIIR_AccessType, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_AccessType 0, // IIR_CompositeType (v2cc_generic_5_mtype) ((void (*)(pIIR_ArrayType, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ArrayType (v2cc_generic_5_mtype) ((void (*)(pIIR_RecordType, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType (v2cc_generic_5_mtype) ((void (*)(pIIR_EnumerationType, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_EnumerationType 0, // IIR_Subtype (v2cc_generic_5_mtype) ((void (*)(pIIR_ArraySubtype, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ArraySubtype (v2cc_generic_5_mtype) ((void (*)(pIIR_RecordSubtype, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_RecordSubtype (v2cc_generic_5_mtype) ((void (*)(pIIR_ScalarSubtype, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList (v2cc_generic_5_mtype) ((void (*)(pIIR_SequentialStatementList, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList (v2cc_generic_5_mtype) ((void (*)(pIIR_ConcurrentStatementList, string& str, RegionStack & ctxt, int l))&m_emit_impl), // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_5[1] = { { &fire_chunk_info, 205, mtab_5_fire }, }; static v2cc_generic_6_mtype mtab_6_fire[] = { 0, // IIR_Root (v2cc_generic_6_mtype) ((void (*)(pIIR_SequentialStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_SequentialStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_NullStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_NullStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ReturnStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ReturnStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_SequentialStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_LoopControlStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ExitStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ExitStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_NextStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_NextStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_LoopStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_WhileLoopStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_LoopStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ForLoopStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_CaseStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_CaseStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_IfStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_IfStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ProcedureCallStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ProcedureCallStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_VariableAssignmentStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_VariableAssignmentStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_SignalAssignmentStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_SignalAssignmentStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ReportStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ReportStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_AssertionStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_AssertionStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_WaitStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion (v2cc_generic_6_mtype) ((void (*)(pIIR_ConcurrentStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ConcurrentStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ConcurrentGenerateStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ConcurrentGenerateStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ConcurrentGenerateForStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ComponentInstantiationStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ComponentInstantiationStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ProcessStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_SensitizedProcessStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_ProcessStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ImplicitProcessStatement (v2cc_generic_6_mtype) ((void (*)(pIIR_BlockStatement, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_PackageBodyDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_PackageBodyDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_PackageDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_PackageDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_ArchitectureDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ArchitectureDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_EntityDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_SubprogramDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_FunctionDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_PredefinedFunctionDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_PredefinedFunctionDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_SubprogramDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ProcedureDeclaration (v2cc_generic_6_mtype) ((void (*)(pIIR_PredefinedProcedureDeclaration, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type (v2cc_generic_6_mtype) ((void (*)(pIIR_FileType, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_FileType (v2cc_generic_6_mtype) ((void (*)(pIIR_AccessType, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_AccessType 0, // IIR_CompositeType (v2cc_generic_6_mtype) ((void (*)(pIIR_ArrayType, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType (v2cc_generic_6_mtype) ((void (*)(pIIR_EnumerationType, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_EnumerationType 0, // IIR_Subtype (v2cc_generic_6_mtype) ((void (*)(pIIR_ArraySubtype, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ArraySubtype 0, // IIR_RecordSubtype (v2cc_generic_6_mtype) ((void (*)(pIIR_ScalarSubtype, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList (v2cc_generic_6_mtype) ((void (*)(pIIR_SequentialStatementList, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList (v2cc_generic_6_mtype) ((void (*)(pIIR_ConcurrentStatementList, string& str, RegionStack & ctxt, int l))&m_cdfg_emit_impl), // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_6[1] = { { &fire_chunk_info, 205, mtab_6_fire }, }; static v2cc_generic_7_mtype mtab_7_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_FileType, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_FileType (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_AccessType, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_AccessType 0, // IIR_CompositeType (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_ArrayType, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_ArrayType (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_RecordType, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_EnumerationType, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_EnumerationType 0, // IIR_Subtype (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_ArraySubtype, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_ArraySubtype (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_RecordSubtype, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_RecordSubtype (v2cc_generic_7_mtype) ((IR_StaticLevel (*)(pIIR_ScalarSubtype, string& str, RegionStack & ctxt, bool static_info, int l))&m_emit_info_init), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_7[1] = { { &fire_chunk_info, 205, mtab_7_fire }, }; static v2cc_generic_8_mtype mtab_8_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Expression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ValueAttr (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AttrTypeValue (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LENGTH (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ASCENDING (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_HIGH (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LOW (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_RIGHT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LEFT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_FunctionAttr (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AttrArrayFunc (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayLENGTH (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayASCENDING (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayLOW (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayHIGH (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayRIGHT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ArrayLEFT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AttrTypeFunc (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_RIGHTOF (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LEFTOF (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_PRED (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_SUCC (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_VAL (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_POS (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_VALUE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_IMAGE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AttrSigFunc (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_DRIVING_VALUE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_DRIVING (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LAST_VALUE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LAST_ACTIVE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_LAST_EVENT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_ACTIVE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_EVENT (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ObjectReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_SignalAttr (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_TRANSACTION (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_QUIET (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_STABLE (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Attr_DELAYED (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_GenericArrayReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_SliceReference, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_SliceReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_ArrayReference, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ArrayReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_RecordReference, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_RecordReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AccessReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_SimpleReference, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_SimpleReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_OpenExpression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Allocator (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_TypeConversion (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_QualifiedExpression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_FunctionCall (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_Aggregate (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ArrayAggregate (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ArtificialArrayAggregate (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_RecordAggregate (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ArtificialRecordAggregate (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_NullExpression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_EnumLiteralReference (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ArrayLiteralExpression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_AbstractLiteralExpression (v2cc_generic_8_mtype) ((bool (*)(pIIR_Expression, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE (v2cc_generic_8_mtype) ((bool (*)(pIIR_ExplicitRange, list >& alist, RegionStack & ctxt, IR_StaticLevel slevel, bool start))&m_get_acl), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_8[1] = { { &fire_chunk_info, 205, mtab_8_fire }, }; static v2cc_generic_9_mtype mtab_9_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Expression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ValueAttr (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AttrTypeValue (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LENGTH (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ASCENDING (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_HIGH (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LOW (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_RIGHT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LEFT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_FunctionAttr (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AttrArrayFunc (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayLENGTH (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayASCENDING (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayLOW (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayHIGH (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayRIGHT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ArrayLEFT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AttrTypeFunc (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_RIGHTOF (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LEFTOF (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_PRED (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_SUCC (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_VAL (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_POS (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_VALUE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_IMAGE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AttrSigFunc (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_DRIVING_VALUE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_DRIVING (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LAST_VALUE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LAST_ACTIVE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_LAST_EVENT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_ACTIVE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_EVENT (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ObjectReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_SignalAttr (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_TRANSACTION (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_QUIET (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_STABLE (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Attr_DELAYED (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_GenericArrayReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_SliceReference, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_SliceReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_ArrayReference, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ArrayReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_RecordReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AccessReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_SimpleReference, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_SimpleReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_OpenExpression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Allocator (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_TypeConversion (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_QualifiedExpression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_FunctionCall (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_Aggregate (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ArrayAggregate (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ArtificialArrayAggregate (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_RecordAggregate (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ArtificialRecordAggregate (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_NullExpression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_EnumLiteralReference (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ArrayLiteralExpression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_AbstractLiteralExpression (v2cc_generic_9_mtype) ((bool (*)(pIIR_Expression, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE (v2cc_generic_9_mtype) ((bool (*)(pIIR_ExplicitRange, string& str, RegionStack & ctxt, IR_StaticLevel slevel, id_type t, bool start))&m_cdfg_get_static_expr), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_9[1] = { { &fire_chunk_info, 205, mtab_9_fire }, }; static v2cc_generic_10_mtype mtab_10_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_NullStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_NullStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ReturnStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ReturnStatement 0, // IIR_LoopControlStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ExitStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ExitStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_NextStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_NextStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_LoopStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_LoopStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_WhileLoopStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_WhileLoopStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ForLoopStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ForLoopStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_CaseStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_CaseStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_IfStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_IfStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ProcedureCallStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ProcedureCallStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_VariableAssignmentStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_VariableAssignmentStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_SignalAssignmentStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_SignalAssignmentStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ReportStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ReportStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_AssertionStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_AssertionStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_WaitStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_InterfaceDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_FileInterfaceDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_SignalInterfaceDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_VariableInterfaceDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ConcurrentGenerateIfStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ConcurrentGenerateForStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ConcurrentGenerateForStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ComponentInstantiationStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ComponentInstantiationStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ProcessStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ProcessStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ProcessStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_SensitizedProcessStatement (v2cc_generic_10_mtype) ((int (*)(pIIR_ProcessStatement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit (v2cc_generic_10_mtype) ((int (*)(pIIR_ConfigurationDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ConfigurationDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_PackageBodyDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_PackageBodyDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_PackageDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_PackageDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_ArchitectureDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ArchitectureDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_EntityDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_EntityDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_ComponentDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ComponentDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_SubprogramDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_FunctionDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_PredefinedFunctionDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_PredefinedFunctionDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ProcedureDeclaration (v2cc_generic_10_mtype) ((int (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_Type (v2cc_generic_10_mtype) ((int (*)(pIIR_FileType, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_FileType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_AccessType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_CompositeType (v2cc_generic_10_mtype) ((int (*)(pIIR_ArrayType, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ArrayType (v2cc_generic_10_mtype) ((int (*)(pIIR_RecordType, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_RecordType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ScalarType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_PhysicalType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_FloatingType (v2cc_generic_10_mtype) ((int (*)(pIIR_Type, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_IntegerType (v2cc_generic_10_mtype) ((int (*)(pIIR_EnumerationType, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_EnumerationType (v2cc_generic_10_mtype) ((int (*)(pIIR_Subtype, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_Subtype (v2cc_generic_10_mtype) ((int (*)(pIIR_ArraySubtype, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ArraySubtype (v2cc_generic_10_mtype) ((int (*)(pIIR_Subtype, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_RecordSubtype (v2cc_generic_10_mtype) ((int (*)(pIIR_ScalarSubtype, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList (v2cc_generic_10_mtype) ((int (*)(pIIR_SequentialStatementList, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList (v2cc_generic_10_mtype) ((int (*)(pIIR_DeclarationList, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_DeclarationList 0, // IIR_ConfigurationItemList (v2cc_generic_10_mtype) ((int (*)(pIIR_ConcurrentStatementList, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative (v2cc_generic_10_mtype) ((int (*)(pIIR_AssociationElement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_AssociationElement (v2cc_generic_10_mtype) ((int (*)(pIIR_AssociationElement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_AssociationElementOpen (v2cc_generic_10_mtype) ((int (*)(pIIR_AssociationElement, RegionStack & rstack, bool collect_access_info))&m_explore_and_check), // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_10[1] = { { &fire_chunk_info, 205, mtab_10_fire }, }; static v2cc_generic_11_mtype mtab_11_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_WaitStatement, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_WaitStatement (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Expression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ValueAttr (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AttrTypeValue (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LENGTH (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ASCENDING (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_HIGH (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LOW (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_RIGHT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeValue, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LEFT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_FunctionAttr (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AttrArrayFunc (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayLENGTH (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayASCENDING (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayLOW (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayHIGH (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayRIGHT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrArrayFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayLEFT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AttrTypeFunc (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_RIGHTOF (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LEFTOF (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_PRED (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_SUCC (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_VAL (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_POS (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_VALUE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrTypeFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_IMAGE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AttrSigFunc (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_DRIVING_VALUE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_DRIVING (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LAST_VALUE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LAST_ACTIVE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_LAST_EVENT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ACTIVE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AttrSigFunc, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_EVENT (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ObjectReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_SignalAttr (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_TRANSACTION (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_QUIET (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_STABLE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_DELAYED (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_GenericArrayReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_SliceReference, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_SliceReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayReference, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArrayReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_RecordReference, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_RecordReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_AccessReference, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AccessReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_SimpleReference, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_SimpleReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_OpenExpression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Allocator, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Allocator (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_TypeConversion, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_TypeConversion (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_QualifiedExpression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_QualifiedExpression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_FunctionCall, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_FunctionCall (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Aggregate (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayAggregate, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArrayAggregate (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayAggregate, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArtificialArrayAggregate (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_RecordAggregate, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_RecordAggregate (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_RecordAggregate, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArtificialRecordAggregate (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_NullExpression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_EnumLiteralReference (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArrayLiteralExpression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AbstractLiteralExpression (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Expression, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Type (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_FileType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_AccessType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_CompositeType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArrayType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_RecordType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ScalarType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_PhysicalType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_FloatingType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_IntegerType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_EnumerationType (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Subtype (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArraySubtype (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_RecordSubtype (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_Type, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ScalarSubtype 0, // IIR_Range (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayRange, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ArrayRange (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayRange, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayREVERSE_RANGE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ArrayRange, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_Attr_ArrayRANGE (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ExplicitRange, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ExpressionList, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_OthersIndexedAssociation, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_OthersIndexedAssociation (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_RangeIndexedAssociation, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_RangeIndexedAssociation (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_RangeIndexedAssociation, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_SliceIndexedAssociation (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_SingleIndexedAssociation, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_SingleIndexedAssociation (v2cc_generic_11_mtype) ((pAccessDescriptor (*)(pIIR_ElementAssociation, ContextInfo & ctxt, RegionStack & rstack, bool target, int level))&m_get_context), // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_11[1] = { { &fire_chunk_info, 205, mtab_11_fire }, }; static v2cc_generic_12_mtype mtab_12_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Expression (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_ValueAttr (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_AttrTypeValue (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_LENGTH (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ASCENDING (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_HIGH (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_LOW (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_RIGHT (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_LEFT (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_FunctionAttr (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_AttrArrayFunc (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayLENGTH (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayASCENDING (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayLOW (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayHIGH (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayRIGHT (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayLEFT (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_AttrTypeFunc (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_RIGHTOF (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_LEFTOF (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_PRED (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_SUCC (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_VAL (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_POS (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_VALUE (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_IMAGE (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_AttrSigFunc (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_DRIVING_VALUE (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_DRIVING (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_LAST_VALUE (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_LAST_ACTIVE (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_LAST_EVENT (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_ACTIVE (v2cc_generic_12_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_check_expression), // IIR_Attr_EVENT (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_ObjectReference (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_SignalAttr (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_TRANSACTION (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_QUIET (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_STABLE (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Attr_DELAYED (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_GenericArrayReference (v2cc_generic_12_mtype) ((int (*)(pIIR_SliceReference, RegionStack & rstack))&m_check_expression), // IIR_SliceReference (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayReference, RegionStack & rstack))&m_check_expression), // IIR_ArrayReference (v2cc_generic_12_mtype) ((int (*)(pIIR_RecordReference, RegionStack & rstack))&m_check_expression), // IIR_RecordReference (v2cc_generic_12_mtype) ((int (*)(pIIR_AccessReference, RegionStack & rstack))&m_check_expression), // IIR_AccessReference (v2cc_generic_12_mtype) ((int (*)(pIIR_SimpleReference, RegionStack & rstack))&m_check_expression), // IIR_SimpleReference (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_OpenExpression (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Allocator (v2cc_generic_12_mtype) ((int (*)(pIIR_TypeConversion, RegionStack & rstack))&m_check_expression), // IIR_TypeConversion (v2cc_generic_12_mtype) ((int (*)(pIIR_QualifiedExpression, RegionStack & rstack))&m_check_expression), // IIR_QualifiedExpression (v2cc_generic_12_mtype) ((int (*)(pIIR_FunctionCall, RegionStack & rstack))&m_check_expression), // IIR_FunctionCall (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_Aggregate (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayAggregate, RegionStack & rstack))&m_check_expression), // IIR_ArrayAggregate (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayAggregate, RegionStack & rstack))&m_check_expression), // IIR_ArtificialArrayAggregate (v2cc_generic_12_mtype) ((int (*)(pIIR_RecordAggregate, RegionStack & rstack))&m_check_expression), // IIR_RecordAggregate (v2cc_generic_12_mtype) ((int (*)(pIIR_RecordAggregate, RegionStack & rstack))&m_check_expression), // IIR_ArtificialRecordAggregate (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_NullExpression (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_EnumLiteralReference (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayLiteralExpression, RegionStack & rstack))&m_check_expression), // IIR_ArrayLiteralExpression (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_AbstractLiteralExpression (v2cc_generic_12_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_check_expression), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_check_expression), // IIR_ArrayRange (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayREVERSE_RANGE (v2cc_generic_12_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_check_expression), // IIR_Attr_ArrayRANGE (v2cc_generic_12_mtype) ((int (*)(pIIR_ExplicitRange, RegionStack & rstack))&m_check_expression), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList (v2cc_generic_12_mtype) ((int (*)(pIIR_ExpressionList, RegionStack & rstack))&m_check_expression), // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation (v2cc_generic_12_mtype) ((int (*)(pIIR_OthersIndexedAssociation, RegionStack & rstack))&m_check_expression), // IIR_OthersIndexedAssociation (v2cc_generic_12_mtype) ((int (*)(pIIR_RangeIndexedAssociation, RegionStack & rstack))&m_check_expression), // IIR_RangeIndexedAssociation (v2cc_generic_12_mtype) ((int (*)(pIIR_RangeIndexedAssociation, RegionStack & rstack))&m_check_expression), // IIR_SliceIndexedAssociation (v2cc_generic_12_mtype) ((int (*)(pIIR_SingleIndexedAssociation, RegionStack & rstack))&m_check_expression), // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_12[1] = { { &fire_chunk_info, 205, mtab_12_fire }, }; static v2cc_generic_13_mtype mtab_13_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration (v2cc_generic_13_mtype) ((op_type (*)(pIIR_FunctionDeclaration))&m_get_operator_type), // IIR_FunctionDeclaration (v2cc_generic_13_mtype) ((op_type (*)(pIIR_FunctionDeclaration))&m_get_operator_type), // IIR_PredefinedFunctionDeclaration (v2cc_generic_13_mtype) ((op_type (*)(pIIR_ProcedureDeclaration))&m_get_operator_type), // IIR_ProcedureDeclaration (v2cc_generic_13_mtype) ((op_type (*)(pIIR_ProcedureDeclaration))&m_get_operator_type), // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_13[1] = { { &fire_chunk_info, 205, mtab_13_fire }, }; static v2cc_generic_14_mtype mtab_14_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_ObjectReference))&m_get_object_declaration), // IIR_ObjectReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SignalAttr))&m_get_object_declaration), // IIR_SignalAttr (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SignalAttr))&m_get_object_declaration), // IIR_Attr_TRANSACTION (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SignalAttr))&m_get_object_declaration), // IIR_Attr_QUIET (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SignalAttr))&m_get_object_declaration), // IIR_Attr_STABLE (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SignalAttr))&m_get_object_declaration), // IIR_Attr_DELAYED (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_ObjectReference))&m_get_object_declaration), // IIR_GenericArrayReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SliceReference))&m_get_object_declaration), // IIR_SliceReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_ArrayReference))&m_get_object_declaration), // IIR_ArrayReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_RecordReference))&m_get_object_declaration), // IIR_RecordReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_ObjectReference))&m_get_object_declaration), // IIR_AccessReference (v2cc_generic_14_mtype) ((pIIR_ObjectDeclaration (*)(pIIR_SimpleReference))&m_get_object_declaration), // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType 0, // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType 0, // IIR_PhysicalType 0, // IIR_FloatingType 0, // IIR_IntegerType 0, // IIR_EnumerationType 0, // IIR_Subtype 0, // IIR_ArraySubtype 0, // IIR_RecordSubtype 0, // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_14[1] = { { &fire_chunk_info, 205, mtab_14_fire }, }; static v2cc_generic_15_mtype mtab_15_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_Declaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_UseClause (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_LibraryClause (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_Label (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_DisconnectSpecification (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PhysicalUnit (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_LibraryDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_AttributeDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ObjectDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_InterfaceDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_FileInterfaceDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SignalInterfaceDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SignalInterfaceDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_VariableInterfaceDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_InterfaceDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConstantInterfaceDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_FileDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SignalDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SignalDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_VariableDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SharedVariableDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConstantDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_TypeDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_TypeDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_TypeDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SubtypeDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ElementDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_EnumerationLiteral (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_DeclarativeRegion (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConcurrentStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConcurrentGenerateStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConcurrentGenerateForStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ComponentInstantiationStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ProcessStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SensitizedProcessStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ImplicitProcessStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_BlockStatement (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConfigurationItem (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ComponentConfiguration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_BlockConfiguration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ArchitectureRef (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_LibraryUnit (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ConfigurationDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PackageBodyDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PackageDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ArchitectureDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_LibraryUnit, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_EntityDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ComponentDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_SubprogramDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_FunctionDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PredefinedFunctionDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ProcedureDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SubprogramDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PredefinedProcedureDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_Declaration, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_LoopDeclarativeRegion (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_Type (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_FileType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_AccessType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_CompositeType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ArrayType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_RecordType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ScalarType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_PhysicalType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_FloatingType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_IntegerType (v2cc_generic_15_mtype) ((string (*)(pIIR_Type, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_EnumerationType (v2cc_generic_15_mtype) ((string (*)(pIIR_Subtype, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_Subtype (v2cc_generic_15_mtype) ((string (*)(pIIR_Subtype, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ArraySubtype (v2cc_generic_15_mtype) ((string (*)(pIIR_Subtype, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_RecordSubtype (v2cc_generic_15_mtype) ((string (*)(pIIR_Subtype, RegionStack & rstack, id_type obj_access))&m_qid), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static v2cc_generic_15_mtype mtab_15_v2cc[] = { (v2cc_generic_15_mtype) ((string (*)(pIIR_TypeDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_ImplicitSubtypeDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_InternalCode (v2cc_generic_15_mtype) ((string (*)(pIIR_SignalDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_ImplicitSignalDeclaration (v2cc_generic_15_mtype) ((string (*)(pIIR_SignalDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_ImplicitSignalDeclaration_Transaction (v2cc_generic_15_mtype) ((string (*)(pV2CC_ImplicitSignalDeclaration_WaitFor, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_ImplicitSignalDeclaration_WaitFor (v2cc_generic_15_mtype) ((string (*)(pIIR_ObjectDeclaration, RegionStack & rstack, id_type obj_access))&m_qid), // V2CC_InternalObjectDeclaration }; static tree_chunk_tab ctab_15[2] = { { &fire_chunk_info, 205, mtab_15_fire }, { &v2cc_chunk_info, 6, mtab_15_v2cc }, }; static v2cc_generic_16_mtype mtab_16_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type (v2cc_generic_16_mtype) ((string (*)(pIIR_FileType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_FileType (v2cc_generic_16_mtype) ((string (*)(pIIR_AccessType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_AccessType 0, // IIR_CompositeType (v2cc_generic_16_mtype) ((string (*)(pIIR_ArrayType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_ArrayType (v2cc_generic_16_mtype) ((string (*)(pIIR_RecordType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_RecordType 0, // IIR_ScalarType (v2cc_generic_16_mtype) ((string (*)(pIIR_PhysicalType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_PhysicalType (v2cc_generic_16_mtype) ((string (*)(pIIR_FloatingType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_FloatingType (v2cc_generic_16_mtype) ((string (*)(pIIR_IntegerType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_IntegerType (v2cc_generic_16_mtype) ((string (*)(pIIR_EnumerationType, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_EnumerationType (v2cc_generic_16_mtype) ((string (*)(pIIR_Subtype, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_Subtype (v2cc_generic_16_mtype) ((string (*)(pIIR_ArraySubtype, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_ArraySubtype (v2cc_generic_16_mtype) ((string (*)(pIIR_RecordSubtype, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_RecordSubtype (v2cc_generic_16_mtype) ((string (*)(pIIR_ScalarSubtype, RegionStack & rstack, bool static_object))&m_get_type_info_obj), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_16[1] = { { &fire_chunk_info, 205, mtab_16_fire }, }; static v2cc_generic_17_mtype mtab_17_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference (v2cc_generic_17_mtype) ((vector (*)(pIIR_SliceReference, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion 0, // IIR_Type 0, // IIR_FileType 0, // IIR_AccessType 0, // IIR_CompositeType (v2cc_generic_17_mtype) ((vector (*)(pIIR_ArrayType, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_ArrayType 0, // IIR_RecordType 0, // IIR_ScalarType (v2cc_generic_17_mtype) ((vector (*)(pIIR_PhysicalType, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_PhysicalType (v2cc_generic_17_mtype) ((vector (*)(pIIR_FloatingType, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_FloatingType (v2cc_generic_17_mtype) ((vector (*)(pIIR_IntegerType, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_IntegerType (v2cc_generic_17_mtype) ((vector (*)(pIIR_EnumerationType, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_EnumerationType 0, // IIR_Subtype (v2cc_generic_17_mtype) ((vector (*)(pIIR_ArraySubtype, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_ArraySubtype 0, // IIR_RecordSubtype (v2cc_generic_17_mtype) ((vector (*)(pIIR_ScalarSubtype, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange (v2cc_generic_17_mtype) ((vector (*)(pIIR_Attr_ArrayREVERSE_RANGE, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_Attr_ArrayREVERSE_RANGE (v2cc_generic_17_mtype) ((vector (*)(pIIR_Attr_ArrayRANGE, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_Attr_ArrayRANGE (v2cc_generic_17_mtype) ((vector (*)(pIIR_ExplicitRange, RegionStack & rstack, IR_StaticLevel slevel))&m_get_discrete_range), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_17[1] = { { &fire_chunk_info, 205, mtab_17_fire }, }; static v2cc_generic_18_mtype mtab_18_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Expression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ValueAttr (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AttrTypeValue (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LENGTH (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ASCENDING (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_HIGH (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LOW (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_RIGHT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LEFT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_FunctionAttr (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AttrArrayFunc (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayLENGTH (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayASCENDING (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayLOW (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayHIGH (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayRIGHT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ArrayLEFT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AttrTypeFunc (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_RIGHTOF (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LEFTOF (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_PRED (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_SUCC (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_VAL (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_POS (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_VALUE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_IMAGE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AttrSigFunc (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_DRIVING_VALUE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_DRIVING (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LAST_VALUE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LAST_ACTIVE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_LAST_EVENT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_ACTIVE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_EVENT (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ObjectReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_SignalAttr (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_TRANSACTION (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_QUIET (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_STABLE (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Attr_DELAYED (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_GenericArrayReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_SliceReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ArrayReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_RecordReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AccessReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_SimpleReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_OpenExpression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Allocator (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_TypeConversion (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_QualifiedExpression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_FunctionCall (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_Aggregate (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ArrayAggregate (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ArtificialArrayAggregate (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_RecordAggregate (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ArtificialRecordAggregate (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_NullExpression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_EnumLiteralReference (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_ArrayLiteralExpression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_AbstractLiteralExpression (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Expression, RegionStack & rstack))&m_get_static_level), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_Type (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_FileType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_AccessType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_CompositeType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_ArrayType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_RecordType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_ScalarType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_PhysicalType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_FloatingType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_IntegerType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_EnumerationType (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_Subtype (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_ArraySubtype (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_RecordSubtype (v2cc_generic_18_mtype) ((IR_StaticLevel (*)(pIIR_Type, RegionStack & rstack))&m_get_static_level), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_18[1] = { { &fire_chunk_info, 205, mtab_18_fire }, }; static v2cc_generic_19_mtype mtab_19_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Expression (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_ValueAttr (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_AttrTypeValue (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LENGTH (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ASCENDING (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_HIGH (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LOW (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_RIGHT (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeValue, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LEFT (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_FunctionAttr (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_AttrArrayFunc (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayLENGTH (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayASCENDING (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayLOW (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayHIGH (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayRIGHT (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrArrayFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayLEFT (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_AttrTypeFunc (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_RIGHTOF (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LEFTOF (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_PRED (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_SUCC (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_VAL (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_POS (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_VALUE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrTypeFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_IMAGE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_AttrSigFunc (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_DRIVING_VALUE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_DRIVING (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LAST_VALUE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LAST_ACTIVE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_LAST_EVENT (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ACTIVE (v2cc_generic_19_mtype) ((int (*)(pIIR_AttrSigFunc, RegionStack & rstack))&m_constant_fold), // IIR_Attr_EVENT (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_ObjectReference (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_SignalAttr (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Attr_TRANSACTION (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Attr_QUIET (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Attr_STABLE (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Attr_DELAYED (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_GenericArrayReference (v2cc_generic_19_mtype) ((int (*)(pIIR_SliceReference, RegionStack & rstack))&m_constant_fold), // IIR_SliceReference (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayReference, RegionStack & rstack))&m_constant_fold), // IIR_ArrayReference (v2cc_generic_19_mtype) ((int (*)(pIIR_RecordReference, RegionStack & rstack))&m_constant_fold), // IIR_RecordReference (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_AccessReference (v2cc_generic_19_mtype) ((int (*)(pIIR_SimpleReference, RegionStack & rstack))&m_constant_fold), // IIR_SimpleReference (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_OpenExpression (v2cc_generic_19_mtype) ((int (*)(pIIR_Allocator, RegionStack & rstack))&m_constant_fold), // IIR_Allocator (v2cc_generic_19_mtype) ((int (*)(pIIR_TypeConversion, RegionStack & rstack))&m_constant_fold), // IIR_TypeConversion (v2cc_generic_19_mtype) ((int (*)(pIIR_QualifiedExpression, RegionStack & rstack))&m_constant_fold), // IIR_QualifiedExpression (v2cc_generic_19_mtype) ((int (*)(pIIR_FunctionCall, RegionStack & rstack))&m_constant_fold), // IIR_FunctionCall (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_Aggregate (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayAggregate, RegionStack & rstack))&m_constant_fold), // IIR_ArrayAggregate (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayAggregate, RegionStack & rstack))&m_constant_fold), // IIR_ArtificialArrayAggregate (v2cc_generic_19_mtype) ((int (*)(pIIR_RecordAggregate, RegionStack & rstack))&m_constant_fold), // IIR_RecordAggregate (v2cc_generic_19_mtype) ((int (*)(pIIR_RecordAggregate, RegionStack & rstack))&m_constant_fold), // IIR_ArtificialRecordAggregate (v2cc_generic_19_mtype) ((int (*)(pIIR_Expression, RegionStack & rstack))&m_constant_fold), // IIR_NullExpression (v2cc_generic_19_mtype) ((int (*)(pIIR_EnumLiteralReference, RegionStack & rstack))&m_constant_fold), // IIR_EnumLiteralReference (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayLiteralExpression, RegionStack & rstack))&m_constant_fold), // IIR_ArrayLiteralExpression (v2cc_generic_19_mtype) ((int (*)(pIIR_AbstractLiteralExpression, RegionStack & rstack))&m_constant_fold), // IIR_AbstractLiteralExpression (v2cc_generic_19_mtype) ((int (*)(pIIR_PhysicalLiteral, RegionStack & rstack))&m_constant_fold), // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification (v2cc_generic_19_mtype) ((int (*)(pIIR_PhysicalUnit, RegionStack & rstack))&m_constant_fold), // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration (v2cc_generic_19_mtype) ((int (*)(pIIR_EnumerationLiteral, RegionStack & rstack))&m_constant_fold), // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement 0, // IIR_ConcurrentGenerateIfStatement 0, // IIR_ConcurrentGenerateForStatement 0, // IIR_ComponentInstantiationStatement 0, // IIR_ProcessStatement 0, // IIR_SensitizedProcessStatement 0, // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit 0, // IIR_ConfigurationDeclaration 0, // IIR_PackageBodyDeclaration 0, // IIR_PackageDeclaration 0, // IIR_ArchitectureDeclaration 0, // IIR_EntityDeclaration 0, // IIR_ComponentDeclaration 0, // IIR_SubprogramDeclaration 0, // IIR_FunctionDeclaration 0, // IIR_PredefinedFunctionDeclaration 0, // IIR_ProcedureDeclaration 0, // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_Type (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_FileType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_AccessType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_CompositeType (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayType, RegionStack & rstack))&m_constant_fold), // IIR_ArrayType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_RecordType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_ScalarType (v2cc_generic_19_mtype) ((int (*)(pIIR_PhysicalType, RegionStack & rstack))&m_constant_fold), // IIR_PhysicalType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_FloatingType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_IntegerType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_EnumerationType (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_Subtype (v2cc_generic_19_mtype) ((int (*)(pIIR_ArraySubtype, RegionStack & rstack))&m_constant_fold), // IIR_ArraySubtype (v2cc_generic_19_mtype) ((int (*)(pIIR_Type, RegionStack & rstack))&m_constant_fold), // IIR_RecordSubtype (v2cc_generic_19_mtype) ((int (*)(pIIR_ScalarSubtype, RegionStack & rstack))&m_constant_fold), // IIR_ScalarSubtype 0, // IIR_Range (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_constant_fold), // IIR_ArrayRange (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayREVERSE_RANGE (v2cc_generic_19_mtype) ((int (*)(pIIR_ArrayRange, RegionStack & rstack))&m_constant_fold), // IIR_Attr_ArrayRANGE (v2cc_generic_19_mtype) ((int (*)(pIIR_ExplicitRange, RegionStack & rstack))&m_constant_fold), // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList (v2cc_generic_19_mtype) ((int (*)(pIIR_ExpressionList, RegionStack & rstack))&m_constant_fold), // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList 0, // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation (v2cc_generic_19_mtype) ((int (*)(pIIR_OthersIndexedAssociation, RegionStack & rstack))&m_constant_fold), // IIR_OthersIndexedAssociation (v2cc_generic_19_mtype) ((int (*)(pIIR_RangeIndexedAssociation, RegionStack & rstack))&m_constant_fold), // IIR_RangeIndexedAssociation (v2cc_generic_19_mtype) ((int (*)(pIIR_SliceIndexedAssociation, RegionStack & rstack))&m_constant_fold), // IIR_SliceIndexedAssociation (v2cc_generic_19_mtype) ((int (*)(pIIR_SingleIndexedAssociation, RegionStack & rstack))&m_constant_fold), // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral (v2cc_generic_19_mtype) ((int (*)(pIIR_FloatingPointLiteral, RegionStack & rstack))&m_constant_fold), // IIR_FloatingPointLiteral (v2cc_generic_19_mtype) ((int (*)(pIIR_IntegerLiteral, RegionStack & rstack))&m_constant_fold), // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_19[1] = { { &fire_chunk_info, 205, mtab_19_fire }, }; static v2cc_generic_20_mtype mtab_20_fire[] = { 0, // IIR_Root 0, // IIR_SequentialStatement 0, // IIR_NullStatement 0, // IIR_ReturnStatement 0, // IIR_LoopControlStatement 0, // IIR_ExitStatement 0, // IIR_NextStatement 0, // IIR_LoopStatement 0, // IIR_WhileLoopStatement 0, // IIR_ForLoopStatement 0, // IIR_CaseStatement 0, // IIR_IfStatement 0, // IIR_ProcedureCallStatement 0, // IIR_VariableAssignmentStatement 0, // IIR_SignalAssignmentStatement 0, // IIR_ReportStatement 0, // IIR_AssertionStatement 0, // IIR_WaitStatement 0, // IIR_Expression 0, // IIR_ValueAttr 0, // IIR_AttrTypeValue 0, // IIR_Attr_LENGTH 0, // IIR_Attr_ASCENDING 0, // IIR_Attr_HIGH 0, // IIR_Attr_LOW 0, // IIR_Attr_RIGHT 0, // IIR_Attr_LEFT 0, // IIR_FunctionAttr 0, // IIR_AttrArrayFunc 0, // IIR_Attr_ArrayLENGTH 0, // IIR_Attr_ArrayASCENDING 0, // IIR_Attr_ArrayLOW 0, // IIR_Attr_ArrayHIGH 0, // IIR_Attr_ArrayRIGHT 0, // IIR_Attr_ArrayLEFT 0, // IIR_AttrTypeFunc 0, // IIR_Attr_RIGHTOF 0, // IIR_Attr_LEFTOF 0, // IIR_Attr_PRED 0, // IIR_Attr_SUCC 0, // IIR_Attr_VAL 0, // IIR_Attr_POS 0, // IIR_Attr_VALUE 0, // IIR_Attr_IMAGE 0, // IIR_AttrSigFunc 0, // IIR_Attr_DRIVING_VALUE 0, // IIR_Attr_DRIVING 0, // IIR_Attr_LAST_VALUE 0, // IIR_Attr_LAST_ACTIVE 0, // IIR_Attr_LAST_EVENT 0, // IIR_Attr_ACTIVE 0, // IIR_Attr_EVENT 0, // IIR_ObjectReference 0, // IIR_SignalAttr 0, // IIR_Attr_TRANSACTION 0, // IIR_Attr_QUIET 0, // IIR_Attr_STABLE 0, // IIR_Attr_DELAYED 0, // IIR_GenericArrayReference 0, // IIR_SliceReference 0, // IIR_ArrayReference 0, // IIR_RecordReference 0, // IIR_AccessReference 0, // IIR_SimpleReference 0, // IIR_OpenExpression 0, // IIR_Allocator 0, // IIR_TypeConversion 0, // IIR_QualifiedExpression 0, // IIR_FunctionCall 0, // IIR_Aggregate 0, // IIR_ArrayAggregate 0, // IIR_ArtificialArrayAggregate 0, // IIR_RecordAggregate 0, // IIR_ArtificialRecordAggregate 0, // IIR_NullExpression 0, // IIR_EnumLiteralReference 0, // IIR_ArrayLiteralExpression 0, // IIR_AbstractLiteralExpression 0, // IIR_PhysicalLiteral 0, // IIR_Declaration 0, // IIR_UseClause 0, // IIR_LibraryClause 0, // IIR_Label 0, // IIR_DisconnectSpecification 0, // IIR_PhysicalUnit 0, // IIR_LibraryDeclaration 0, // IIR_AttributeDeclaration 0, // IIR_ObjectDeclaration 0, // IIR_InterfaceDeclaration 0, // IIR_FileInterfaceDeclaration 0, // IIR_SignalInterfaceDeclaration 0, // IIR_VariableInterfaceDeclaration 0, // IIR_ConstantInterfaceDeclaration 0, // IIR_FileDeclaration 0, // IIR_SignalDeclaration 0, // IIR_VariableDeclaration 0, // IIR_SharedVariableDeclaration 0, // IIR_ConstantDeclaration 0, // IIR_TypeDeclaration 0, // IIR_SubtypeDeclaration 0, // IIR_ElementDeclaration 0, // IIR_EnumerationLiteral 0, // IIR_DeclarativeRegion 0, // IIR_ConcurrentStatement 0, // IIR_ConcurrentGenerateStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ConcurrentGenerateIfStatement, RegionStack & rstack))&m_optimize), // IIR_ConcurrentGenerateIfStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ConcurrentGenerateForStatement, RegionStack & rstack))&m_optimize), // IIR_ConcurrentGenerateForStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ComponentInstantiationStatement, RegionStack & rstack))&m_optimize), // IIR_ComponentInstantiationStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ProcessStatement, RegionStack & rstack))&m_optimize), // IIR_ProcessStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ProcessStatement, RegionStack & rstack))&m_optimize), // IIR_SensitizedProcessStatement (v2cc_generic_20_mtype) ((void (*)(pIIR_ProcessStatement, RegionStack & rstack))&m_optimize), // IIR_ImplicitProcessStatement 0, // IIR_BlockStatement 0, // IIR_ConfigurationItem 0, // IIR_ComponentConfiguration 0, // IIR_BlockConfiguration 0, // IIR_ArchitectureRef 0, // IIR_LibraryUnit (v2cc_generic_20_mtype) ((void (*)(pIIR_ConfigurationDeclaration, RegionStack & rstack))&m_optimize), // IIR_ConfigurationDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_PackageBodyDeclaration, RegionStack & rstack))&m_optimize), // IIR_PackageBodyDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_PackageDeclaration, RegionStack & rstack))&m_optimize), // IIR_PackageDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_ArchitectureDeclaration, RegionStack & rstack))&m_optimize), // IIR_ArchitectureDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_EntityDeclaration, RegionStack & rstack))&m_optimize), // IIR_EntityDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_ComponentDeclaration, RegionStack & rstack))&m_optimize), // IIR_ComponentDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_SubprogramDeclaration, RegionStack & rstack))&m_optimize), // IIR_SubprogramDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_SubprogramDeclaration, RegionStack & rstack))&m_optimize), // IIR_FunctionDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_PredefinedFunctionDeclaration, RegionStack & rstack))&m_optimize), // IIR_PredefinedFunctionDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_SubprogramDeclaration, RegionStack & rstack))&m_optimize), // IIR_ProcedureDeclaration (v2cc_generic_20_mtype) ((void (*)(pIIR_SubprogramDeclaration, RegionStack & rstack))&m_optimize), // IIR_PredefinedProcedureDeclaration 0, // IIR_LoopDeclarativeRegion (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_Type (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_FileType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_AccessType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_CompositeType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_ArrayType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_RecordType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_ScalarType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_PhysicalType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_FloatingType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_IntegerType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_EnumerationType (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_Subtype (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_ArraySubtype (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_RecordSubtype (v2cc_generic_20_mtype) ((void (*)(pIIR_Type, RegionStack & rstack))&m_optimize), // IIR_ScalarSubtype 0, // IIR_Range 0, // IIR_ArrayRange 0, // IIR_Attr_ArrayREVERSE_RANGE 0, // IIR_Attr_ArrayRANGE 0, // IIR_ExplicitRange 0, // IIR_List 0, // IIR_IdentifierList 0, // IIR_ConfigurationSpecificationList 0, // IIR_ComponentInstantiationList 0, // IIR_ElementAssociationList 0, // IIR_IndexedAssociationList 0, // IIR_ExpressionList 0, // IIR_TypeList 0, // IIR_WaveformList 0, // IIR_UnitList 0, // IIR_SequentialStatementList 0, // IIR_LibraryUnitList 0, // IIR_InterfaceList 0, // IIR_EnumerationLiteralList 0, // IIR_EntityClassEntryList 0, // IIR_ElementDeclarationList 0, // IIR_DeclarationList 0, // IIR_ConfigurationItemList (v2cc_generic_20_mtype) ((void (*)(pIIR_ConcurrentStatementList, RegionStack & rstack))&m_optimize), // IIR_ConcurrentStatementList 0, // IIR_ChoiceList 0, // IIR_CaseStatementAlternativeList 0, // IIR_AttributeValueList 0, // IIR_AssociationList 0, // IIR_Tuple 0, // IIR_ConfigurationSpecification 0, // IIR_BindingIndication 0, // IIR_AttributeValue 0, // IIR_IndexedAssociation 0, // IIR_OthersIndexedAssociation 0, // IIR_RangeIndexedAssociation 0, // IIR_SliceIndexedAssociation 0, // IIR_SingleIndexedAssociation 0, // IIR_ElementAssociation 0, // IIR_WaveformElement 0, // IIR_EntityClassEntry 0, // IIR_Choice 0, // IIR_ChoiceByOthers 0, // IIR_ChoiceByRange 0, // IIR_ChoiceByExpression 0, // IIR_CaseStatementAlternative 0, // IIR_AssociationElement 0, // IIR_AssociationElementOpen 0, // IIR_AssociationElementByExpression 0, // IIR_Literal 0, // IIR_AbstractLiteral 0, // IIR_FloatingPointLiteral 0, // IIR_IntegerLiteral 0, // IIR_TextLiteral 0, // IIR_StringLiteral 0, // IIR_CharacterLiteral 0, // IIR_Identifier 0, // IIR_Dummy 0, // IIR_Signature 0, // IIR_PosInfo 0, // IIR_PosInfo_Sheet 0, // IIR_PosInfo_TextFile }; static tree_chunk_tab ctab_20[1] = { { &fire_chunk_info, 205, mtab_20_fire }, }; v2cc_IIR_Declaration_ext::v2cc_IIR_Declaration_ext () { } static tree_propslot_info v2cc_IIR_Declaration_propslot_info[] = { { (tree_kind_info*)&RuntimeCheckFlags_ctype_info, "runtime_checks",(tree_base_node*tree_prop::*)&v2cc_IIR_Declaration_ext::runtime_checks }, }; static struct tree_prop_info v2cc_IIR_Declaration_prop_info = { 0, 1, v2cc_IIR_Declaration_propslot_info }; tree_prop_info * v2cc_IIR_Declaration_ext::get_info () { return &v2cc_IIR_Declaration_prop_info; } static int v2cc_IIR_Declaration_key; v2cc_IIR_Declaration_ext *get_v2cc_ext (pIIR_Declaration n) { v2cc_IIR_Declaration_ext *attrs = (v2cc_IIR_Declaration_ext *) n->get (v2cc_IIR_Declaration_key); if (attrs == 0) { attrs = new v2cc_IIR_Declaration_ext; n->put (v2cc_IIR_Declaration_key, attrs); } return attrs; } v2cc_IIR_Root_ext::v2cc_IIR_Root_ext () { done = 0; static_declarative_region = NULL; } static tree_propslot_info v2cc_IIR_Root_propslot_info[] = { { IR_DECLARATIVE_REGION, "static_declarative_region",(tree_base_node*tree_prop::*)&v2cc_IIR_Root_ext::static_declarative_region }, { (tree_kind_info*)&int_ctype_info, "done",(tree_base_node*tree_prop::*)&v2cc_IIR_Root_ext::done }, }; static struct tree_prop_info v2cc_IIR_Root_prop_info = { 1, 2, v2cc_IIR_Root_propslot_info }; tree_prop_info * v2cc_IIR_Root_ext::get_info () { return &v2cc_IIR_Root_prop_info; } static int v2cc_IIR_Root_key; v2cc_IIR_Root_ext *get_v2cc_ext (pIIR_Root n) { v2cc_IIR_Root_ext *attrs = (v2cc_IIR_Root_ext *) n->get (v2cc_IIR_Root_key); if (attrs == 0) { attrs = new v2cc_IIR_Root_ext; n->put (v2cc_IIR_Root_key, attrs); } return attrs; } v2cc_IIR_LibraryUnit_ext::v2cc_IIR_LibraryUnit_ext () { generate_code = true; } static tree_propslot_info v2cc_IIR_LibraryUnit_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "generate_code",(tree_base_node*tree_prop::*)&v2cc_IIR_LibraryUnit_ext::generate_code }, }; static struct tree_prop_info v2cc_IIR_LibraryUnit_prop_info = { 0, 1, v2cc_IIR_LibraryUnit_propslot_info }; tree_prop_info * v2cc_IIR_LibraryUnit_ext::get_info () { return &v2cc_IIR_LibraryUnit_prop_info; } static int v2cc_IIR_LibraryUnit_key; v2cc_IIR_LibraryUnit_ext *get_v2cc_ext (pIIR_LibraryUnit n) { v2cc_IIR_LibraryUnit_ext *attrs = (v2cc_IIR_LibraryUnit_ext *) n->get (v2cc_IIR_LibraryUnit_key); if (attrs == 0) { attrs = new v2cc_IIR_LibraryUnit_ext; n->put (v2cc_IIR_LibraryUnit_key, attrs); } return attrs; } v2cc_IIR_Expression_ext::v2cc_IIR_Expression_ext () { valid_folded_value = false; } static tree_propslot_info v2cc_IIR_Expression_propslot_info[] = { { (tree_kind_info*)&StaticDataType_ctype_info, "folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_Expression_ext::folded_value }, { (tree_kind_info*)&bool_ctype_info, "valid_folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_Expression_ext::valid_folded_value }, { (tree_kind_info*)&RuntimeCheckFlags_ctype_info, "runtime_checks",(tree_base_node*tree_prop::*)&v2cc_IIR_Expression_ext::runtime_checks }, }; static struct tree_prop_info v2cc_IIR_Expression_prop_info = { 0, 3, v2cc_IIR_Expression_propslot_info }; tree_prop_info * v2cc_IIR_Expression_ext::get_info () { return &v2cc_IIR_Expression_prop_info; } static int v2cc_IIR_Expression_key; v2cc_IIR_Expression_ext *get_v2cc_ext (pIIR_Expression n) { v2cc_IIR_Expression_ext *attrs = (v2cc_IIR_Expression_ext *) n->get (v2cc_IIR_Expression_key); if (attrs == 0) { attrs = new v2cc_IIR_Expression_ext; n->put (v2cc_IIR_Expression_key, attrs); } return attrs; } v2cc_IIR_Literal_ext::v2cc_IIR_Literal_ext () { valid_folded_value = false; } static tree_propslot_info v2cc_IIR_Literal_propslot_info[] = { { (tree_kind_info*)&StaticDataType_ctype_info, "folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_Literal_ext::folded_value }, { (tree_kind_info*)&bool_ctype_info, "valid_folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_Literal_ext::valid_folded_value }, }; static struct tree_prop_info v2cc_IIR_Literal_prop_info = { 0, 2, v2cc_IIR_Literal_propslot_info }; tree_prop_info * v2cc_IIR_Literal_ext::get_info () { return &v2cc_IIR_Literal_prop_info; } static int v2cc_IIR_Literal_key; v2cc_IIR_Literal_ext *get_v2cc_ext (pIIR_Literal n) { v2cc_IIR_Literal_ext *attrs = (v2cc_IIR_Literal_ext *) n->get (v2cc_IIR_Literal_key); if (attrs == 0) { attrs = new v2cc_IIR_Literal_ext; n->put (v2cc_IIR_Literal_key, attrs); } return attrs; } v2cc_IIR_EnumerationLiteral_ext::v2cc_IIR_EnumerationLiteral_ext () { valid_folded_value = false; } static tree_propslot_info v2cc_IIR_EnumerationLiteral_propslot_info[] = { { (tree_kind_info*)&StaticDataType_ctype_info, "folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_EnumerationLiteral_ext::folded_value }, { (tree_kind_info*)&bool_ctype_info, "valid_folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_EnumerationLiteral_ext::valid_folded_value }, }; static struct tree_prop_info v2cc_IIR_EnumerationLiteral_prop_info = { 0, 2, v2cc_IIR_EnumerationLiteral_propslot_info }; tree_prop_info * v2cc_IIR_EnumerationLiteral_ext::get_info () { return &v2cc_IIR_EnumerationLiteral_prop_info; } static int v2cc_IIR_EnumerationLiteral_key; v2cc_IIR_EnumerationLiteral_ext *get_v2cc_ext (pIIR_EnumerationLiteral n) { v2cc_IIR_EnumerationLiteral_ext *attrs = (v2cc_IIR_EnumerationLiteral_ext *) n->get (v2cc_IIR_EnumerationLiteral_key); if (attrs == 0) { attrs = new v2cc_IIR_EnumerationLiteral_ext; n->put (v2cc_IIR_EnumerationLiteral_key, attrs); } return attrs; } v2cc_IIR_PhysicalUnit_ext::v2cc_IIR_PhysicalUnit_ext () { valid_folded_value = false; } static tree_propslot_info v2cc_IIR_PhysicalUnit_propslot_info[] = { { (tree_kind_info*)&StaticDataType_ctype_info, "folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_PhysicalUnit_ext::folded_value }, { (tree_kind_info*)&bool_ctype_info, "valid_folded_value",(tree_base_node*tree_prop::*)&v2cc_IIR_PhysicalUnit_ext::valid_folded_value }, }; static struct tree_prop_info v2cc_IIR_PhysicalUnit_prop_info = { 0, 2, v2cc_IIR_PhysicalUnit_propslot_info }; tree_prop_info * v2cc_IIR_PhysicalUnit_ext::get_info () { return &v2cc_IIR_PhysicalUnit_prop_info; } static int v2cc_IIR_PhysicalUnit_key; v2cc_IIR_PhysicalUnit_ext *get_v2cc_ext (pIIR_PhysicalUnit n) { v2cc_IIR_PhysicalUnit_ext *attrs = (v2cc_IIR_PhysicalUnit_ext *) n->get (v2cc_IIR_PhysicalUnit_key); if (attrs == 0) { attrs = new v2cc_IIR_PhysicalUnit_ext; n->put (v2cc_IIR_PhysicalUnit_key, attrs); } return attrs; } v2cc_IIR_Type_ext::v2cc_IIR_Type_ext () { } static tree_propslot_info v2cc_IIR_Type_propslot_info[] = { { (tree_kind_info*)&RuntimeCheckFlags_ctype_info, "runtime_checks",(tree_base_node*tree_prop::*)&v2cc_IIR_Type_ext::runtime_checks }, }; static struct tree_prop_info v2cc_IIR_Type_prop_info = { 0, 1, v2cc_IIR_Type_propslot_info }; tree_prop_info * v2cc_IIR_Type_ext::get_info () { return &v2cc_IIR_Type_prop_info; } static int v2cc_IIR_Type_key; v2cc_IIR_Type_ext *get_v2cc_ext (pIIR_Type n) { v2cc_IIR_Type_ext *attrs = (v2cc_IIR_Type_ext *) n->get (v2cc_IIR_Type_key); if (attrs == 0) { attrs = new v2cc_IIR_Type_ext; n->put (v2cc_IIR_Type_key, attrs); } return attrs; } v2cc_IIR_Subtype_ext::v2cc_IIR_Subtype_ext () { implicit_subtype_declaration = NULL; } static tree_propslot_info v2cc_IIR_Subtype_propslot_info[] = { { V2CC_IMPLICIT_SUBTYPE_DECLARATION, "implicit_subtype_declaration",(tree_base_node*tree_prop::*)&v2cc_IIR_Subtype_ext::implicit_subtype_declaration }, }; static struct tree_prop_info v2cc_IIR_Subtype_prop_info = { 1, 1, v2cc_IIR_Subtype_propslot_info }; tree_prop_info * v2cc_IIR_Subtype_ext::get_info () { return &v2cc_IIR_Subtype_prop_info; } static int v2cc_IIR_Subtype_key; v2cc_IIR_Subtype_ext *get_v2cc_ext (pIIR_Subtype n) { v2cc_IIR_Subtype_ext *attrs = (v2cc_IIR_Subtype_ext *) n->get (v2cc_IIR_Subtype_key); if (attrs == 0) { attrs = new v2cc_IIR_Subtype_ext; n->put (v2cc_IIR_Subtype_key, attrs); } return attrs; } v2cc_IIR_WaitStatement_ext::v2cc_IIR_WaitStatement_ext () { } static tree_propslot_info v2cc_IIR_WaitStatement_propslot_info[] = { { (tree_kind_info*)&int_ctype_info, "wait_info_index",(tree_base_node*tree_prop::*)&v2cc_IIR_WaitStatement_ext::wait_info_index }, }; static struct tree_prop_info v2cc_IIR_WaitStatement_prop_info = { 0, 1, v2cc_IIR_WaitStatement_propslot_info }; tree_prop_info * v2cc_IIR_WaitStatement_ext::get_info () { return &v2cc_IIR_WaitStatement_prop_info; } static int v2cc_IIR_WaitStatement_key; v2cc_IIR_WaitStatement_ext *get_v2cc_ext (pIIR_WaitStatement n) { v2cc_IIR_WaitStatement_ext *attrs = (v2cc_IIR_WaitStatement_ext *) n->get (v2cc_IIR_WaitStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_WaitStatement_ext; n->put (v2cc_IIR_WaitStatement_key, attrs); } return attrs; } v2cc_IIR_ProcedureCallStatement_ext::v2cc_IIR_ProcedureCallStatement_ext () { } static tree_propslot_info v2cc_IIR_ProcedureCallStatement_propslot_info[] = { { (tree_kind_info*)&int_ctype_info, "wait_info_index",(tree_base_node*tree_prop::*)&v2cc_IIR_ProcedureCallStatement_ext::wait_info_index }, }; static struct tree_prop_info v2cc_IIR_ProcedureCallStatement_prop_info = { 0, 1, v2cc_IIR_ProcedureCallStatement_propslot_info }; tree_prop_info * v2cc_IIR_ProcedureCallStatement_ext::get_info () { return &v2cc_IIR_ProcedureCallStatement_prop_info; } static int v2cc_IIR_ProcedureCallStatement_key; v2cc_IIR_ProcedureCallStatement_ext *get_v2cc_ext (pIIR_ProcedureCallStatement n) { v2cc_IIR_ProcedureCallStatement_ext *attrs = (v2cc_IIR_ProcedureCallStatement_ext *) n->get (v2cc_IIR_ProcedureCallStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_ProcedureCallStatement_ext; n->put (v2cc_IIR_ProcedureCallStatement_key, attrs); } return attrs; } v2cc_IIR_DeclarativeRegion_ext::v2cc_IIR_DeclarativeRegion_ext () { extended_declarations = NULL; } static tree_propslot_info v2cc_IIR_DeclarativeRegion_propslot_info[] = { { IR_DECLARATION_LIST, "extended_declarations",(tree_base_node*tree_prop::*)&v2cc_IIR_DeclarativeRegion_ext::extended_declarations }, { (tree_kind_info*)&ContextInfo_ctype_info, "context",(tree_base_node*tree_prop::*)&v2cc_IIR_DeclarativeRegion_ext::context }, }; static struct tree_prop_info v2cc_IIR_DeclarativeRegion_prop_info = { 1, 2, v2cc_IIR_DeclarativeRegion_propslot_info }; tree_prop_info * v2cc_IIR_DeclarativeRegion_ext::get_info () { return &v2cc_IIR_DeclarativeRegion_prop_info; } static int v2cc_IIR_DeclarativeRegion_key; v2cc_IIR_DeclarativeRegion_ext *get_v2cc_ext (pIIR_DeclarativeRegion n) { v2cc_IIR_DeclarativeRegion_ext *attrs = (v2cc_IIR_DeclarativeRegion_ext *) n->get (v2cc_IIR_DeclarativeRegion_key); if (attrs == 0) { attrs = new v2cc_IIR_DeclarativeRegion_ext; n->put (v2cc_IIR_DeclarativeRegion_key, attrs); } return attrs; } v2cc_IIR_EntityDeclaration_ext::v2cc_IIR_EntityDeclaration_ext () { extended_generic_clause = NULL; extended_port_clause = NULL; } static tree_propslot_info v2cc_IIR_EntityDeclaration_propslot_info[] = { { IR_DECLARATION_LIST, "extended_generic_clause",(tree_base_node*tree_prop::*)&v2cc_IIR_EntityDeclaration_ext::extended_generic_clause }, { IR_DECLARATION_LIST, "extended_port_clause",(tree_base_node*tree_prop::*)&v2cc_IIR_EntityDeclaration_ext::extended_port_clause }, }; static struct tree_prop_info v2cc_IIR_EntityDeclaration_prop_info = { 2, 2, v2cc_IIR_EntityDeclaration_propslot_info }; tree_prop_info * v2cc_IIR_EntityDeclaration_ext::get_info () { return &v2cc_IIR_EntityDeclaration_prop_info; } static int v2cc_IIR_EntityDeclaration_key; v2cc_IIR_EntityDeclaration_ext *get_v2cc_ext (pIIR_EntityDeclaration n) { v2cc_IIR_EntityDeclaration_ext *attrs = (v2cc_IIR_EntityDeclaration_ext *) n->get (v2cc_IIR_EntityDeclaration_key); if (attrs == 0) { attrs = new v2cc_IIR_EntityDeclaration_ext; n->put (v2cc_IIR_EntityDeclaration_key, attrs); } return attrs; } v2cc_IIR_SubprogramDeclaration_ext::v2cc_IIR_SubprogramDeclaration_ext () { extended_interface_declarations = NULL; } static tree_propslot_info v2cc_IIR_SubprogramDeclaration_propslot_info[] = { { IR_DECLARATION_LIST, "extended_interface_declarations",(tree_base_node*tree_prop::*)&v2cc_IIR_SubprogramDeclaration_ext::extended_interface_declarations }, }; static struct tree_prop_info v2cc_IIR_SubprogramDeclaration_prop_info = { 1, 1, v2cc_IIR_SubprogramDeclaration_propslot_info }; tree_prop_info * v2cc_IIR_SubprogramDeclaration_ext::get_info () { return &v2cc_IIR_SubprogramDeclaration_prop_info; } static int v2cc_IIR_SubprogramDeclaration_key; v2cc_IIR_SubprogramDeclaration_ext *get_v2cc_ext (pIIR_SubprogramDeclaration n) { v2cc_IIR_SubprogramDeclaration_ext *attrs = (v2cc_IIR_SubprogramDeclaration_ext *) n->get (v2cc_IIR_SubprogramDeclaration_key); if (attrs == 0) { attrs = new v2cc_IIR_SubprogramDeclaration_ext; n->put (v2cc_IIR_SubprogramDeclaration_key, attrs); } return attrs; } v2cc_IIR_ConcurrentStatement_ext::v2cc_IIR_ConcurrentStatement_ext () { extended_interface_declarations = NULL; } static tree_propslot_info v2cc_IIR_ConcurrentStatement_propslot_info[] = { { IR_DECLARATION_LIST, "extended_interface_declarations",(tree_base_node*tree_prop::*)&v2cc_IIR_ConcurrentStatement_ext::extended_interface_declarations }, }; static struct tree_prop_info v2cc_IIR_ConcurrentStatement_prop_info = { 1, 1, v2cc_IIR_ConcurrentStatement_propslot_info }; tree_prop_info * v2cc_IIR_ConcurrentStatement_ext::get_info () { return &v2cc_IIR_ConcurrentStatement_prop_info; } static int v2cc_IIR_ConcurrentStatement_key; v2cc_IIR_ConcurrentStatement_ext *get_v2cc_ext (pIIR_ConcurrentStatement n) { v2cc_IIR_ConcurrentStatement_ext *attrs = (v2cc_IIR_ConcurrentStatement_ext *) n->get (v2cc_IIR_ConcurrentStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_ConcurrentStatement_ext; n->put (v2cc_IIR_ConcurrentStatement_key, attrs); } return attrs; } v2cc_IIR_BlockStatement_ext::v2cc_IIR_BlockStatement_ext () { extended_generic_clause = NULL; extended_port_clause = NULL; } static tree_propslot_info v2cc_IIR_BlockStatement_propslot_info[] = { { IR_DECLARATION_LIST, "extended_generic_clause",(tree_base_node*tree_prop::*)&v2cc_IIR_BlockStatement_ext::extended_generic_clause }, { IR_DECLARATION_LIST, "extended_port_clause",(tree_base_node*tree_prop::*)&v2cc_IIR_BlockStatement_ext::extended_port_clause }, }; static struct tree_prop_info v2cc_IIR_BlockStatement_prop_info = { 2, 2, v2cc_IIR_BlockStatement_propslot_info }; tree_prop_info * v2cc_IIR_BlockStatement_ext::get_info () { return &v2cc_IIR_BlockStatement_prop_info; } static int v2cc_IIR_BlockStatement_key; v2cc_IIR_BlockStatement_ext *get_v2cc_ext (pIIR_BlockStatement n) { v2cc_IIR_BlockStatement_ext *attrs = (v2cc_IIR_BlockStatement_ext *) n->get (v2cc_IIR_BlockStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_BlockStatement_ext; n->put (v2cc_IIR_BlockStatement_key, attrs); } return attrs; } v2cc_IIR_ArrayAggregate_ext::v2cc_IIR_ArrayAggregate_ext () { } static tree_propslot_info v2cc_IIR_ArrayAggregate_propslot_info[] = { { (tree_kind_info*)&int_ctype_info, "dest_length",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::dest_length }, { (tree_kind_info*)&int_ctype_info, "dest_left",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::dest_left }, { (tree_kind_info*)&int_ctype_info, "dest_right",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::dest_right }, { (tree_kind_info*)&IR_Direction_ctype_info, "dest_direction",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::dest_direction }, { (tree_kind_info*)&bool_ctype_info, "named_association",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::named_association }, { (tree_kind_info*)&bool_ctype_info, "known_subtype",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::known_subtype }, { (tree_kind_info*)&bool_ctype_info, "has_others",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::has_others }, { (tree_kind_info*)&bool_ctype_info, "locally_static_ranges",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::locally_static_ranges }, { (tree_kind_info*)&int_ctype_info, "total_length",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::total_length }, { (tree_kind_info*)&int_ctype_info, "min_index",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::min_index }, { (tree_kind_info*)&int_ctype_info, "max_index",(tree_base_node*tree_prop::*)&v2cc_IIR_ArrayAggregate_ext::max_index }, }; static struct tree_prop_info v2cc_IIR_ArrayAggregate_prop_info = { 0, 11, v2cc_IIR_ArrayAggregate_propslot_info }; tree_prop_info * v2cc_IIR_ArrayAggregate_ext::get_info () { return &v2cc_IIR_ArrayAggregate_prop_info; } static int v2cc_IIR_ArrayAggregate_key; v2cc_IIR_ArrayAggregate_ext *get_v2cc_ext (pIIR_ArrayAggregate n) { v2cc_IIR_ArrayAggregate_ext *attrs = (v2cc_IIR_ArrayAggregate_ext *) n->get (v2cc_IIR_ArrayAggregate_key); if (attrs == 0) { attrs = new v2cc_IIR_ArrayAggregate_ext; n->put (v2cc_IIR_ArrayAggregate_key, attrs); } return attrs; } v2cc_IIR_IndexedAssociation_ext::v2cc_IIR_IndexedAssociation_ext () { } static tree_propslot_info v2cc_IIR_IndexedAssociation_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "locally_static_range",(tree_base_node*tree_prop::*)&v2cc_IIR_IndexedAssociation_ext::locally_static_range }, { (tree_kind_info*)&int_ctype_info, "length",(tree_base_node*tree_prop::*)&v2cc_IIR_IndexedAssociation_ext::length }, { (tree_kind_info*)&int_ctype_info, "min_index",(tree_base_node*tree_prop::*)&v2cc_IIR_IndexedAssociation_ext::min_index }, { (tree_kind_info*)&int_ctype_info, "max_index",(tree_base_node*tree_prop::*)&v2cc_IIR_IndexedAssociation_ext::max_index }, }; static struct tree_prop_info v2cc_IIR_IndexedAssociation_prop_info = { 0, 4, v2cc_IIR_IndexedAssociation_propslot_info }; tree_prop_info * v2cc_IIR_IndexedAssociation_ext::get_info () { return &v2cc_IIR_IndexedAssociation_prop_info; } static int v2cc_IIR_IndexedAssociation_key; v2cc_IIR_IndexedAssociation_ext *get_v2cc_ext (pIIR_IndexedAssociation n) { v2cc_IIR_IndexedAssociation_ext *attrs = (v2cc_IIR_IndexedAssociation_ext *) n->get (v2cc_IIR_IndexedAssociation_key); if (attrs == 0) { attrs = new v2cc_IIR_IndexedAssociation_ext; n->put (v2cc_IIR_IndexedAssociation_key, attrs); } return attrs; } v2cc_IIR_EnumerationType_ext::v2cc_IIR_EnumerationType_ext () { } static tree_propslot_info v2cc_IIR_EnumerationType_propslot_info[] = { { (tree_kind_info*)&int_ctype_info, "enum_item_number",(tree_base_node*tree_prop::*)&v2cc_IIR_EnumerationType_ext::enum_item_number }, }; static struct tree_prop_info v2cc_IIR_EnumerationType_prop_info = { 0, 1, v2cc_IIR_EnumerationType_propslot_info }; tree_prop_info * v2cc_IIR_EnumerationType_ext::get_info () { return &v2cc_IIR_EnumerationType_prop_info; } static int v2cc_IIR_EnumerationType_key; v2cc_IIR_EnumerationType_ext *get_v2cc_ext (pIIR_EnumerationType n) { v2cc_IIR_EnumerationType_ext *attrs = (v2cc_IIR_EnumerationType_ext *) n->get (v2cc_IIR_EnumerationType_key); if (attrs == 0) { attrs = new v2cc_IIR_EnumerationType_ext; n->put (v2cc_IIR_EnumerationType_key, attrs); } return attrs; } v2cc_IIR_ObjectDeclaration_ext::v2cc_IIR_ObjectDeclaration_ext () { } static tree_propslot_info v2cc_IIR_ObjectDeclaration_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "alias_check_bounds",(tree_base_node*tree_prop::*)&v2cc_IIR_ObjectDeclaration_ext::alias_check_bounds }, }; static struct tree_prop_info v2cc_IIR_ObjectDeclaration_prop_info = { 0, 1, v2cc_IIR_ObjectDeclaration_propslot_info }; tree_prop_info * v2cc_IIR_ObjectDeclaration_ext::get_info () { return &v2cc_IIR_ObjectDeclaration_prop_info; } static int v2cc_IIR_ObjectDeclaration_key; v2cc_IIR_ObjectDeclaration_ext *get_v2cc_ext (pIIR_ObjectDeclaration n) { v2cc_IIR_ObjectDeclaration_ext *attrs = (v2cc_IIR_ObjectDeclaration_ext *) n->get (v2cc_IIR_ObjectDeclaration_key); if (attrs == 0) { attrs = new v2cc_IIR_ObjectDeclaration_ext; n->put (v2cc_IIR_ObjectDeclaration_key, attrs); } return attrs; } v2cc_IIR_LoopStatement_ext::v2cc_IIR_LoopStatement_ext () { next_statement_used = false; exit_statement_used = false; loop_id = -1; } static tree_propslot_info v2cc_IIR_LoopStatement_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "next_statement_used",(tree_base_node*tree_prop::*)&v2cc_IIR_LoopStatement_ext::next_statement_used }, { (tree_kind_info*)&bool_ctype_info, "exit_statement_used",(tree_base_node*tree_prop::*)&v2cc_IIR_LoopStatement_ext::exit_statement_used }, { (tree_kind_info*)&int_ctype_info, "loop_id",(tree_base_node*tree_prop::*)&v2cc_IIR_LoopStatement_ext::loop_id }, }; static struct tree_prop_info v2cc_IIR_LoopStatement_prop_info = { 0, 3, v2cc_IIR_LoopStatement_propslot_info }; tree_prop_info * v2cc_IIR_LoopStatement_ext::get_info () { return &v2cc_IIR_LoopStatement_prop_info; } static int v2cc_IIR_LoopStatement_key; v2cc_IIR_LoopStatement_ext *get_v2cc_ext (pIIR_LoopStatement n) { v2cc_IIR_LoopStatement_ext *attrs = (v2cc_IIR_LoopStatement_ext *) n->get (v2cc_IIR_LoopStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_LoopStatement_ext; n->put (v2cc_IIR_LoopStatement_key, attrs); } return attrs; } v2cc_IIR_ProcessStatement_ext::v2cc_IIR_ProcessStatement_ext () { has_wait = false; has_wait_for = false; } static tree_propslot_info v2cc_IIR_ProcessStatement_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "has_wait",(tree_base_node*tree_prop::*)&v2cc_IIR_ProcessStatement_ext::has_wait }, { (tree_kind_info*)&bool_ctype_info, "has_wait_for",(tree_base_node*tree_prop::*)&v2cc_IIR_ProcessStatement_ext::has_wait_for }, }; static struct tree_prop_info v2cc_IIR_ProcessStatement_prop_info = { 0, 2, v2cc_IIR_ProcessStatement_propslot_info }; tree_prop_info * v2cc_IIR_ProcessStatement_ext::get_info () { return &v2cc_IIR_ProcessStatement_prop_info; } static int v2cc_IIR_ProcessStatement_key; v2cc_IIR_ProcessStatement_ext *get_v2cc_ext (pIIR_ProcessStatement n) { v2cc_IIR_ProcessStatement_ext *attrs = (v2cc_IIR_ProcessStatement_ext *) n->get (v2cc_IIR_ProcessStatement_key); if (attrs == 0) { attrs = new v2cc_IIR_ProcessStatement_ext; n->put (v2cc_IIR_ProcessStatement_key, attrs); } return attrs; } v2cc_IIR_ProcedureDeclaration_ext::v2cc_IIR_ProcedureDeclaration_ext () { has_wait = false; has_wait_for = false; } static tree_propslot_info v2cc_IIR_ProcedureDeclaration_propslot_info[] = { { (tree_kind_info*)&bool_ctype_info, "has_wait",(tree_base_node*tree_prop::*)&v2cc_IIR_ProcedureDeclaration_ext::has_wait }, { (tree_kind_info*)&bool_ctype_info, "has_wait_for",(tree_base_node*tree_prop::*)&v2cc_IIR_ProcedureDeclaration_ext::has_wait_for }, }; static struct tree_prop_info v2cc_IIR_ProcedureDeclaration_prop_info = { 0, 2, v2cc_IIR_ProcedureDeclaration_propslot_info }; tree_prop_info * v2cc_IIR_ProcedureDeclaration_ext::get_info () { return &v2cc_IIR_ProcedureDeclaration_prop_info; } static int v2cc_IIR_ProcedureDeclaration_key; v2cc_IIR_ProcedureDeclaration_ext *get_v2cc_ext (pIIR_ProcedureDeclaration n) { v2cc_IIR_ProcedureDeclaration_ext *attrs = (v2cc_IIR_ProcedureDeclaration_ext *) n->get (v2cc_IIR_ProcedureDeclaration_key); if (attrs == 0) { attrs = new v2cc_IIR_ProcedureDeclaration_ext; n->put (v2cc_IIR_ProcedureDeclaration_key, attrs); } return attrs; } static tree_kind v2cc_kinds[6] = { V2CC_INTERNAL_OBJECT_DECLARATION, V2CC_IMPLICIT_SIGNAL_DECLARATION, V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR, V2CC_IMPLICIT_SIGNAL_DECLARATION_TRANSACTION, V2CC_INTERNAL_CODE, V2CC_IMPLICIT_SUBTYPE_DECLARATION, }; struct tree_chunk_info v2cc_chunk_info = { -1, "v2cc", 6, v2cc_kinds }; void init_v2cc_chunk () { if (v2cc_chunk_info.chunk_id != -1) return; init_fire_chunk (); tree_register_chunk (&v2cc_chunk_info); v2cc_generic_0.init ("emit_decl"); v2cc_generic_1.init ("emit_main"); v2cc_generic_2.init ("emit_expr"); v2cc_generic_3.init ("cdfg_emit_expr"); v2cc_generic_4.init ("emit_hdr"); v2cc_generic_5.init ("emit_impl"); v2cc_generic_6.init ("cdfg_emit_impl"); v2cc_generic_7.init ("emit_info_init"); v2cc_generic_8.init ("get_acl"); v2cc_generic_9.init ("cdfg_get_static_expr"); v2cc_generic_10.init ("explore_and_check"); v2cc_generic_11.init ("get_context"); v2cc_generic_12.init ("check_expression"); v2cc_generic_13.init ("get_operator_type"); v2cc_generic_14.init ("get_object_declaration"); v2cc_generic_15.init ("qid"); v2cc_generic_16.init ("get_type_info_obj"); v2cc_generic_17.init ("get_discrete_range"); v2cc_generic_18.init ("get_static_level"); v2cc_generic_19.init ("constant_fold"); v2cc_generic_20.init ("optimize"); v2cc_generic_0.merge (1, ctab_0); v2cc_generic_1.merge (1, ctab_1); v2cc_generic_2.merge (1, ctab_2); v2cc_generic_3.merge (1, ctab_3); v2cc_generic_4.merge (1, ctab_4); v2cc_generic_5.merge (1, ctab_5); v2cc_generic_6.merge (1, ctab_6); v2cc_generic_7.merge (1, ctab_7); v2cc_generic_8.merge (1, ctab_8); v2cc_generic_9.merge (1, ctab_9); v2cc_generic_10.merge (1, ctab_10); v2cc_generic_11.merge (1, ctab_11); v2cc_generic_12.merge (1, ctab_12); v2cc_generic_13.merge (1, ctab_13); v2cc_generic_14.merge (1, ctab_14); v2cc_generic_15.merge (2, ctab_15); v2cc_generic_16.merge (1, ctab_16); v2cc_generic_17.merge (1, ctab_17); v2cc_generic_18.merge (1, ctab_18); v2cc_generic_19.merge (1, ctab_19); v2cc_generic_20.merge (1, ctab_20); v2cc_IIR_Declaration_key = tree_uniq_prop_key (IR_DECLARATION); v2cc_IIR_Root_key = tree_uniq_prop_key (IR_ROOT); v2cc_IIR_LibraryUnit_key = tree_uniq_prop_key (IR_LIBRARY_UNIT); v2cc_IIR_Expression_key = tree_uniq_prop_key (IR_EXPRESSION); v2cc_IIR_Literal_key = tree_uniq_prop_key (IR_LITERAL); v2cc_IIR_EnumerationLiteral_key = tree_uniq_prop_key (IR_ENUMERATION_LITERAL); v2cc_IIR_PhysicalUnit_key = tree_uniq_prop_key (IR_PHYSICAL_UNIT); v2cc_IIR_Type_key = tree_uniq_prop_key (IR_TYPE); v2cc_IIR_Subtype_key = tree_uniq_prop_key (IR_SUBTYPE); v2cc_IIR_WaitStatement_key = tree_uniq_prop_key (IR_WAIT_STATEMENT); v2cc_IIR_ProcedureCallStatement_key = tree_uniq_prop_key (IR_PROCEDURE_CALL_STATEMENT); v2cc_IIR_DeclarativeRegion_key = tree_uniq_prop_key (IR_DECLARATIVE_REGION); v2cc_IIR_EntityDeclaration_key = tree_uniq_prop_key (IR_ENTITY_DECLARATION); v2cc_IIR_SubprogramDeclaration_key = tree_uniq_prop_key (IR_SUBPROGRAM_DECLARATION); v2cc_IIR_ConcurrentStatement_key = tree_uniq_prop_key (IR_CONCURRENT_STATEMENT); v2cc_IIR_BlockStatement_key = tree_uniq_prop_key (IR_BLOCK_STATEMENT); v2cc_IIR_ArrayAggregate_key = tree_uniq_prop_key (IR_ARRAY_AGGREGATE); v2cc_IIR_IndexedAssociation_key = tree_uniq_prop_key (IR_INDEXED_ASSOCIATION); v2cc_IIR_EnumerationType_key = tree_uniq_prop_key (IR_ENUMERATION_TYPE); v2cc_IIR_ObjectDeclaration_key = tree_uniq_prop_key (IR_OBJECT_DECLARATION); v2cc_IIR_LoopStatement_key = tree_uniq_prop_key (IR_LOOP_STATEMENT); v2cc_IIR_ProcessStatement_key = tree_uniq_prop_key (IR_PROCESS_STATEMENT); v2cc_IIR_ProcedureDeclaration_key = tree_uniq_prop_key (IR_PROCEDURE_DECLARATION); } struct v2cc_auto_initializer { v2cc_auto_initializer () { init_v2cc_chunk (); } } v2cc_ignition; freehdl-0.0.7/v2cc/mapping.h0000644000175000017500000000052007046277015012516 00000000000000#ifndef MAPPING_H #define MAPPING_H struct v2cc_mapper { v2cc_mapper (); virtual ~v2cc_mapper (); virtual char *find_design_file (const char *lib, const char *unit) = 0; virtual void add_libdir (const char *libdir) = 0; virtual void add_default_libdirs () = 0; }; v2cc_mapper *make_v2cc_mapper (); #endif /* MAPPING_H */ freehdl-0.0.7/v2cc/mapping.cc0000644000175000017500000002507610755352703012670 00000000000000/* mapping.cc - implement the mapping from lib/unit to file. Copyright (C) 2000, 2003 Marius Vollmer. V2CC 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. V2CC 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 V2CC; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ // XXX - this whole thing needs serious performance improvements. At // least a cache of previously unsucessful lookups should be // maintained. // XXX - it also needs a much better way of handling errors. #include "mapping.h" #include #include #include #include #include #include #include using namespace std; v2cc_mapper::v2cc_mapper () { } v2cc_mapper::~v2cc_mapper () { } #define me v2cc_mapper_impl struct me : v2cc_mapper { me (); ~me (); char *find_design_file (const char *lib, const char *unit); void add_libdir (const char *libdir); void add_libdir (const string libdir); void add_default_libdirs (); list libdirs; bool translate (string &res, string lib, string map, string ext); struct mapfile { struct rule { string pattern; string subst; bool has_subst; }; list rules; bool parse (string file); bool translate (string &res, string str, string ext); private: bool next_token (string &buf, istream &on); bool match (string p, string s, map &matches); bool match (string p, int pp, string s, int ss, map &matches); string subst (string t, map &matches); }; map mapfiles; mapfile *get_mapfile (string); void remember (mapfile*, string); }; me::me () { } me::~me () { } v2cc_mapper * make_v2cc_mapper () { return new me; } void me::add_libdir (const char *libdir) { add_libdir (string (libdir)); } void me::add_libdir (const string libdir) { libdirs.push_back (libdir); } void me::add_default_libdirs () { const char *ext = getenv ("V2CC_LIBRARY_PATH"); if (ext == NULL) ext = "*"; for (const char *start = ext, *stop = start; *start; start = stop) { while (*stop && *stop != ':') stop++; if (*start == '*' && stop == start+1) add_libdir (DEFAULT_V2CC_LIBRARY_DIR); else add_libdir (string (start, stop-start)); if (*stop) stop++; } } static char * xstrdup (string &str) { int len = str.length(); char *mem = new char[len+1]; str.copy (mem, len); mem[len] = '\0'; return mem; } static bool file_exists (const string &f) { struct stat st; return (stat (f.c_str(), &st) == 0); } static bool is_regular_file (const string &f) { struct stat st; return (stat (f.c_str(), &st) == 0) && S_ISREG (st.st_mode); } static bool is_directory (const string &f) { struct stat st; return (stat (f.c_str(), &st) == 0) && S_ISDIR (st.st_mode); } // Stores list of translated library/unit to file name values map design_file_name_cache; char * me::find_design_file (const char *lib, const char *unit) { // Query file name cache string key = ":" + string(lib) + ":" + string(unit); map::iterator iter = design_file_name_cache.find(key); if (iter != design_file_name_cache.end()) { // cerr << (*iter).second << " exists (found in file name cache)\n"; return xstrdup ((*iter).second); } for (list::iterator i = libdirs.begin(); i != libdirs.end(); i++) { const string l = *i; // cerr << "looking into " << l << "\n"; string lmap; if (is_regular_file (l)) lmap = l; else if (is_directory (l)) lmap = l + "/v2cc.libs"; else continue; // cerr << "using lmap " << lmap << "\n"; string flib; if (!translate (flib, lib, lmap, "")) continue; // cerr << lib << " translates to " << flib << "\n"; string umap = flib + ".vhdl"; if (file_exists (umap)) { // cerr << umap << " exists\n"; design_file_name_cache[key] = umap; // Add entry to cache return xstrdup (umap); } umap = flib + ".v2cc"; if (file_exists (umap)) ; else if (is_directory (flib)) umap = flib + "/v2cc.units"; else continue; // cerr << "using umap " << umap << "\n"; string funit; if (!translate (funit, unit, umap, ".vhdl")) continue; design_file_name_cache[key] = funit; // Add entry to cache return xstrdup (funit); } // cerr << "not found\n"; return NULL; } static string directory_name (string file) { int pos = file.rfind ('/'); if (pos == -1) return "."; else return file.substr (0, pos); } static string canonicalize (string ostr) { string str = ostr; string::iterator p = str.begin(); if (*p != '\\' && *p != '\'') while (p != str.end()) { *p = tolower (*p); p++; } return str; } bool me::translate (string &res, string str, string map, string ext) { str = canonicalize (str); if (!file_exists (map)) res = str + ext; else { mapfile *m = get_mapfile (map); if (m == NULL) { m = new mapfile; if (!m->parse (map)) { delete m; return false; } remember (m, map); } if (!m->translate (res, str, ext)) return false; } if (res[0] != '/') res = directory_name (map) + "/" + res; return true; } /* Mapfile parser. */ me::mapfile * me::get_mapfile (string filename) { return mapfiles[filename]; } void me::remember (mapfile *map, string filename) { mapfiles[filename] = map; } static inline bool is_whitespace (char c) { return (c == ' ' || c == '\n' || c == '\t' || c == '\f' || c == '\v'); } static inline bool is_comment (char c) { return c == '#'; } static inline bool is_operator (char c) { return c == ':' || c == ',' || c == '{' || c == '}'; } static inline bool is_symbolchar (char c) { return !(is_whitespace (c) || is_operator (c) || is_comment (c)); } bool me::mapfile::next_token (string &buf, istream &in) { int c; buf.erase (); // skip whitespace and comments while ((c = in.get()) != EOF) { if (c == '\\') break; if (is_comment (c)) { while ((c = in.get()) != EOF && c != '\n') ; continue; } if (!is_whitespace (c)) break; } if (in.eof()) return false; // read token, either a symbol or an operator buf.append (1, char(c)); if (is_operator (c)) return true; while ((c = in.get()) != EOF) { if (c == '\\') if ((c = in.get()) != EOF) { buf.append (1, char(c)); continue; } else break; if (!is_symbolchar (c)) { in.putback (c); break; } buf.append (1, char(c)); } return buf.length() > 0; } bool me::mapfile::parse (string filename) { string token (128, '\0'); ifstream in(filename.c_str()); if (!next_token (token, in) || token != "v2cc_mapfile") { cerr << filename << ": not a v2cc mapfile\n"; return false; } if (!next_token (token, in) || token != "0") { cerr << filename << ": incompatible mapfile version " << token << "\n"; return false; } while (next_token (token, in)) { rule r; r.pattern = token; if (next_token (token, in) && token == ":") { if (!next_token (token, in)) { cerr << filename << ": missing substitution template\n"; return false; } r.subst = token; r.has_subst = true; } else r.has_subst = false; rules.push_back (r); } return true; } bool me::mapfile::translate (string &res, string str, string ext) { for (list::iterator i = rules.begin(); i != rules.end(); i++) { map matches; if (match (i->pattern, str, matches)) { if (i->has_subst) res = subst (i->subst, matches); else res = str + ext; return true; } } return false; } bool me::mapfile::match (string p, string s, map &matches) { return match (p, 0, s, 0, matches); } bool me::mapfile::match (string p, int pp, string s, int sp, map &matches) { // cerr << "trying " << p << " " << pp << ", " << s << ", " << sp << "\n"; while (pp < p.length() && sp < s.length() && p[pp] != '<') { if (p[pp] != s[sp]) { // cerr << "no match " << p[pp] << " " << s[sp] << "\n"; return false; } pp++, sp++; } if (pp == p.length() || sp == s.length()) { //cerr << "at end " << pp << "(" << p.length() << "), " // << sp << "(" << s.length() << ")\n"; return pp == p.length() && sp == s.length(); } if (p[pp] == '<') { int ps = pp; while (++pp < p.length() && p[pp] != '>') ; if (pp == p.length()) { cerr << "unbalanced angle brackets in pattern: " << p << "\n"; return false; } string name = p.substr(ps, pp+1-ps); if (pp+1 == p.length()) // matches everything till end { //cerr << "found: " << name << " == " << s.substr(sp, s.length()-sp) // << "\n"; matches[name] = s.substr(sp, s.length()-sp); return true; } ++pp; if (p[pp] == '<') { cerr << "can't have two consecutive wildcards\n"; return false; } int ss = sp; while (sp < s.length ()) { while (sp < s.length() && s[sp] != p[pp]) sp++; if (match (p, pp, s, sp, matches)) { //cerr << "found: " << name << " == " << s.substr(ss, sp-ss) // << "\n"; matches[name] = s.substr(ss, sp-ss); return true; } sp++; } return false; } return true; } string me::mapfile::subst (string t, map &matches) { string r = ""; for (int tp = 0; tp < t.length();) { if (t[tp] == '<') { int ts = tp; while (tp < t.length() && t[tp] != '>') tp++; if (tp == t.length()) { cerr << "unbalanced angle brackets: " << t << "\n"; return ""; } string name = t.substr(ts, tp+1-ts); map::iterator m = matches.find (name); if (m == matches.end()) { cerr << "no such wildcard: " << name << "\n"; return ""; } r = r + m->second; tp++; } else { int ts = tp; while (tp < t.length() && t[tp] != '<') tp++; r += t.substr(ts, tp-ts); } } return r; } freehdl-0.0.7/v2cc/v2cc-explore.cc0000644000175000017500000051646210755353016013550 00000000000000#include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" using namespace std; // Used to generate error messages extern vaul_error_printer codegen_error; // Dummy filter function which does not filter out anything! This // class is necessary to implement unfiltered filter_list operations. struct no_filter { no_filter() {}; no_filter(pIIR_Declaration d) {}; operator bool() { return true; } }; // This class is used to filter out interface declarations which are // NOT an alias declaration! struct filter_local_declarations { const pIIR_Declaration node; filter_local_declarations() : node(NULL) { } filter_local_declarations(pIIR_Declaration n) : node(n) { } operator bool() { if (node->is(IR_OBJECT_DECLARATION)) { return (!node->is(IR_INTERFACE_DECLARATION)) || (pIIR_ObjectDeclaration(node)->alias_base != NULL); } else return true; } }; // Template function to create a copy of a interface or declaration // list. Further, for each anonymous type used within the declarations // a implicitly declaration entry is created and added to the list. T // denotes the list type (either IIR_DeclarationList or // IIR_InterfaceList). template pIIR_DeclarationList build_extended_declaration_list(T* list, RegionStack &rstack) { // First, create a copy of the original list pIIR_DeclarationList new_list = filter_list(list); // Analyze each declaration included in the list //return new_list; for (pIIR_DeclarationList l = new_list, *last_rest_p = &new_list; l; last_rest_p = &l->rest, l = l->rest) { // Search for object declarations where the object type is an // implicity delcared subtype (e.g., "variable var : integer range // 0 to 7"). For this kind of anonymouse subtypes an implicit // named subtype declaration shall be created. if (!l->first->is(IR_OBJECT_DECLARATION) || !is_implicit_subtype(pIIR_ObjectDeclaration(l->first)->subtype)) continue; // If the object is defined within a procedure or function that is // declared in a package, then do not create an explicit anonymous // type because this might generate initialization races if the // function/subrogram is used to initialize a constant of the // package! E.g., // package race is // function func return integer; // constant const : integer := func; // end package; // package body race is // function func return integer is // constant const2 : integer := const; // begin // return const2; // end func; // end package body; // In the C++ code the package body is elaborated AFTER the package // declaration. Hence, if const2 is initialized globally, if will // get its initial value too late! if (l->first->declarative_region->is(IR_SUBPROGRAM_DECLARATION) && pIIR_SubprogramDeclaration (l->first->declarative_region) ->declarative_region->is(IR_PACKAGE_BODY_DECLARATION)) continue; pIIR_ObjectDeclaration object = pIIR_ObjectDeclaration(l->first); pIIR_Subtype implicit_subtype = pIIR_Subtype(pIIR_ObjectDeclaration(l->first)->subtype); // Skip this subtype if it is already associated with an implicit // subtype declaration. if (implicit_subtype_declaration(implicit_subtype) != NULL) continue; // Create a unique name for the new implicit type // declaration. Note that this name is actually NOT a valid VHDL // subtype name. pIIR_TextLiteral new_subtype_name = to_TextLiteral("_t" + to_string(get_unique_int_id())); // Create an "implicit subtype declaration node". pV2CC_ImplicitSubtypeDeclaration new_implicit_subtype_declaration = new V2CC_ImplicitSubtypeDeclaration(l->pos, new_subtype_name, ActiveDeclarativeRegion(rstack), NULL, -1, implicit_subtype); // Link subtype node with the implicit subtype declaration! implicit_subtype_declaration(implicit_subtype) = new_implicit_subtype_declaration; // Create a new entry for the declaration list and put it before // the current declaration into the list. *last_rest_p = new IIR_DeclarationList(l->pos, new_implicit_subtype_declaration, l); } return new_list; } int check_for_static_names(pIIR_Expression expr, IR_StaticLevel slevel, RegionStack &rstack) { int error_count = 0; ContextInfo tmp_ctxt; // Determine all objects which are accessed in expr get_context(expr, tmp_ctxt, rstack, false, 0); // Analyze all accessed objects besides the primary name. for (list::iterator iter = tmp_ctxt.accessed_objects.begin(); iter != tmp_ctxt.accessed_objects.end(); iter++) // Skip primary name if ((*iter).level > 0) { pIIR_Declaration decl = (*iter).declaration; // Check for function call. Check whether the result of the // function call matches the required static level. if (decl->is(IR_FUNCTION_DECLARATION)) { assert (((*iter).access_type & FUNCTION_CALL)); pIIR_FunctionDeclaration fdecl = pIIR_FunctionDeclaration((*iter).declaration); if (!level_match((*iter).access_expr->static_level, slevel)) { codegen_error.error("%:error: result of function %n is not %s static.", expr, (*iter).access_expr, (slevel == IR_LOCALLY_STATIC? "locally" : "globally")); error_count++; } continue; } // Check for alias object. Bail out if locally static is // required. if (decl->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decl)->alias_base != NULL && slevel == IR_GLOBALLY_STATIC) continue; // Check for constant object. If constant is deferred then // report an error if name shall be locally static. if (decl->is(IR_CONSTANT_DECLARATION)) if (pIIR_ConstantDeclaration(decl)->initial_value != NULL || slevel == IR_GLOBALLY_STATIC) continue; // Check for generic parameter. Bail out if name shall be // locally static if (decl->is(IR_CONSTANT_INTERFACE_DECLARATION) && slevel == IR_GLOBALLY_STATIC) continue; codegen_error.error("%:error: %n is not a %s static name as %n is not %s static.", expr, expr, (slevel == IR_LOCALLY_STATIC? "locally" : "globally"), decl, (slevel == IR_LOCALLY_STATIC? "locally" : "globally")); error_count++; } return error_count; } void merge_accessed_objects_lists(list &target, pIIR_DeclarativeRegion target_region, list &src) { // Create a list of declarative region pointers beginning from the // target region up to the root region list RegionList = create_region_list(target_region); // Check accessed objects for (list::iterator iter = src.begin(); iter != src.end(); iter++ ) { if ((*iter).declaration == NULL || (!(*iter).declaration->is(IR_OBJECT_DECLARATION) && !(*iter).declaration->is(IR_TYPE_DECLARATION))) continue; // Test whether the source region of the declared object is // included in the region list. I.e., check whether the object is // visible from the target scope pIIR_DeclarativeRegion obj_decl_region = (*iter).declaration->declarative_region; if (find(RegionList.begin(), RegionList.end(), obj_decl_region) != RegionList.end()) // Add access descriptor to target context target.push_back(*iter); } } // Return the more `inner' one of R1 and R2. This is used to // determine the static region of an item that is known to be static // in R1 and R2. pIIR_DeclarativeRegion max_inner (pIIR_DeclarativeRegion r1, pIIR_DeclarativeRegion r2, RegionStack &rstack) { // Step up from R1 until hitting R2. If we don't hit R2, R2 is more // `inner' than R1; else R1 is more inner than R2. // XXX - what about `continued' declarative regions? Continued // declarative regions only occur on LibraryUnits (i.e. file scope), // and BlockConfigs. We should be safe from LibraryUnits, at least. for (pIIR_DeclarativeRegion r = r1; r != NULL; r = get_parent_declarative_region(r, rstack)) { //cerr << r->kind_name() << " " << r2->kind_name() << endl; if (r == r2) return r1; } return r2; } /* Removes entries from the external declaration list which shall not be converted into "extern" declarations. */ void cleanup_external_declaration_list (decl_flag_list &ext_decl_list) { decl_flag_list::iterator iter = ext_decl_list.begin (); while (iter != ext_decl_list.end ()) { pIIR_Declaration decl = iter->first; if (decl->is (IR_CONSTANT_INTERFACE_DECLARATION) || decl->is (IR_SIGNAL_INTERFACE_DECLARATION)) { iter = ext_decl_list.erase (iter); } else iter ++; } } // ****************************************************************************************** // Name: m_explore_and_check, generic function // // Description: explore (collect informations about node) and check // node for correctness // // Return value: returns number of errors found // // ****************************************************************************************** int m_explore_and_check (pIIR_InterfaceDeclaration id, RegionStack &rstack, bool collect_access_info) { if (done(id) & EXPLORED) return 0; else done(id) |= EXPLORED; int error_count = 0; ContextInfo &ctxt = *ActiveContext(rstack); error_count += explore_and_check(id->subtype, rstack, collect_access_info); if (id->initial_value && id->initial_value->is(IR_EXPRESSION)) { if (collect_access_info) { get_context(id->initial_value, ctxt, rstack, false, 0); get_context(id->initial_value->subtype, ctxt, rstack, false, 0); } error_count += explore_and_check(id->initial_value->subtype, rstack, collect_access_info); error_count += constant_fold(id->initial_value, rstack); error_count += check_expression(id->initial_value, rstack); } return error_count; } int m_explore_and_check (pIIR_PredefinedFunctionDeclaration sp, RegionStack &rstack, bool collect_access_info) { if (done(sp) & EXPLORED) return 0; else done(sp) |= EXPLORED; rstack.push(sp); int error_count = 0; if (sp->interface_declarations != NULL) { extended_interface_declarations(sp) = clone_list(sp->interface_declarations); error_count += explore_and_check(extended_interface_declarations(sp), rstack, collect_access_info); } rstack.pop(); return error_count; } int m_explore_and_check (pIIR_SubprogramDeclaration sp, RegionStack &rstack, bool collect_access_info) { if (done(sp) & EXPLORED) return 0; else done(sp) |= EXPLORED; rstack.push(sp); int error_count = 0; if (sp->interface_declarations != NULL) { if (sp->subprogram_body != NULL) extended_interface_declarations(sp) = build_extended_declaration_list(sp->interface_declarations, rstack); else extended_interface_declarations(sp) = clone_list(sp->interface_declarations); error_count += explore_and_check(extended_interface_declarations(sp), rstack, collect_access_info); } if (sp->declarations != NULL) { // Build extended declaration list. However, any interface // decalrations which are usually also included in the declaration // list are NOT copied to the extended_declaration list! The class // filter_local_declarations implements a unary function which // performs the check operation for each item on the original // list. extended_declarations(sp) = build_extended_declaration_list(sp->declarations, rstack); // Because the extended_declaration list may be empty (in spite of // the original declaration list being NOT empty) check for empty // list again! if (extended_declarations(sp) != NULL) error_count += explore_and_check(extended_declarations(sp), rstack, collect_access_info); } if (sp->subprogram_body != NULL) error_count += explore_and_check(sp->subprogram_body, rstack, collect_access_info); if (sp->is(IR_FUNCTION_DECLARATION)) error_count += explore_and_check(pIIR_FunctionDeclaration(sp)->return_type, rstack, collect_access_info); // ********************************************************************** // Analyze all objects which were directly or indirectly referenced // within the subprogram code. Note that while in VHDL it is // permitted to directly access objects declared outside of the // subprogram code this cannot be directly mapped to C++. Hence, // these objects are passed over to the generated subprogram as // additional interface parameters. // ********************************************************************** // Create a list of declarative region pointers beginning from the // father region of the subprogram up to (but not including) the // root region list RegionList = create_region_list(sp->declarative_region); // Remove any package regions and package body regions because these // objects will be globally declared and hence can be accessed // directly from the generated subprogram code. while (RegionList.begin() != RegionList.end() && is_PackageDeclarativeRegion(*RegionList.begin())) RegionList.pop_front(); list &objects = context(sp).accessed_objects; list &extra_interface_objects = context(sp).extra_interface_objects; // Analyze all objects directly or indirectly accessed within the // subprogram for (list::iterator obj = objects.begin(); obj != objects.end(); obj++) { if ((*obj).declaration == NULL) continue; // Test whether the object is defined within predecessor region of // the current region list::iterator home_region = find(RegionList.begin(), RegionList.end(), (*obj).declaration->declarative_region); if (home_region == RegionList.end()) continue; // Ok, obviously the current object has been accessed without // being passed over into the subprogram via the interface. Hence, // add it to the list of extra interface objects if the object is // not already on the list. Otherwise, merge the access types of // both entries. list::iterator old_entry = extra_interface_objects.begin(); for (; old_entry != extra_interface_objects.end(); old_entry++) if ((*old_entry).declaration != NULL && (*old_entry).declaration == (*obj).declaration) break; // If a corresponding entry is already on the extra interface list // then merge access types. Otherwise, create a new entry. Note // that only the declaration pointer and the access type are stored // in the extra interface list. if (old_entry != extra_interface_objects.end()) (*old_entry).access_type |= (*obj).access_type; else extra_interface_objects.push_back(AccessDescriptor(pIIR_ObjectDeclaration((*obj).declaration), NULL, (*obj).access_type)); } // Check whether this is a procedure and a timeout clause // has been used directly or indirectly within the subprogram. If // yes, then add a signal driver as well as a reference to the // timeout variable as an extra parameter to the function, if (sp->is(IR_PROCEDURE_DECLARATION) && has_wait_for(pIIR_ProcedureDeclaration(sp))) { pIIR_ProcedureDeclaration proc = pIIR_ProcedureDeclaration(sp); // First, create an pV2CC_ImplicitSignalDeclaration_WaitFor implicit_signal = new V2CC_ImplicitSignalDeclaration_WaitFor (sp->pos, to_TextLiteral("_implicit_wait_for"), sp, NULL, -1, NULL /* subtype */, NULL, NULL, IR_NO_SIGNAL_KIND); // Add this to the list of extra interface objects. The signal // value is read, write, an signal function attribute is used and // the procedure is sensitive on it. This will cause the sig_info // pointer, a driver as well as the reader pointer passed over to // the subprogram. extra_interface_objects.push_back(AccessDescriptor(implicit_signal, NULL, READ | WRITE | SIGNAL_FUNCTION_ATTRIBUTE | SENSITIVE)); // Also, add it to the extended_declarations list. //extended_declarations(sp) = // new IIR_DeclarationList (sp->pos, implicit_signal, // extended_declarations (sp)); } // Finally, check whether the current procedure is an implicity // declared "deallocate" procedure. As the subprogram is decalared // implicitly there is no subprogram body. Further, the subprogram // is named "deallocate". string subprog_name = convert_string(sp->declarator->text.to_chars(), tolower); if (sp->is(IR_PREDEFINED_PROCEDURE_DECLARATION)) { // Remove any extra subprogram parameters extra_interface_objects.clear(); if (subprog_name == "deallocate") { // Get the access type (= type of the parameter). Add type // declaration to extra interface list of procedure so that the // corresponding type info pointer is passed over to the // subprogram. pIIR_TypeDeclaration access_type_decl = get_declaration(sp->interface_declarations->first->subtype->base); extra_interface_objects.push_back(AccessDescriptor(access_type_decl, TYPE_USED)); } } if (sp->is(IR_PREDEFINED_FUNCTION_DECLARATION)) // Remove any extra subprogram parameters extra_interface_objects.clear(); rstack.pop(); return error_count; } int m_explore_and_check (pIIR_EntityDeclaration e, RegionStack &rstack, bool collect_access_info) { if (done(e) & EXPLORED) return 0; else done(e) |= EXPLORED; rstack.push(e); int error_count = 0; // Explore initial values of generics if (e->generic_clause != NULL) { extended_generic_clause(e) = build_extended_declaration_list(e->generic_clause, rstack); error_count += explore_and_check(extended_generic_clause(e), rstack, collect_access_info); } // Explore initial values of port signals if (e->port_clause != NULL) { extended_port_clause(e) = build_extended_declaration_list(e->port_clause, rstack); error_count += explore_and_check(extended_port_clause(e), rstack, collect_access_info); } // Explore entity declarations (not ports and generics; those are // handled above) if (e->declarations) { extended_declarations(e) = build_extended_declaration_list(e->declarations, rstack); explore_and_check(extended_declarations(e), rstack, collect_access_info); } // Explore concurrent statements of entity if (e->entity_statement_part) explore_and_check(e->entity_statement_part, rstack, collect_access_info); // Collect all external delcarations into if (collect_access_info) merge (external_decls_list, e->external_decls, rstack); // Also, explore and check all referenced external declarations if (e->external_decls != NULL) { explore_and_check (e->external_decls, rstack, true); cleanup_external_declaration_list (external_decls_list); } rstack.pop(); return error_count; } // Note that this is NOT a generic function! int explore_and_check_alias (pIIR_ObjectDeclaration od, RegionStack &rstack, bool collect_access_info) { int error_count = 0; ContextInfo &ctxt = *ActiveContext(rstack); if(collect_access_info) get_context(od->alias_base->subtype, ctxt, rstack, false, 0); error_count += explore_and_check(od->alias_base->subtype, rstack, collect_access_info); error_count += constant_fold(od->alias_base, rstack); error_count += check_expression(od->alias_base, rstack); // Determine final declarative region static_declarative_region(od) = get_combined_static_region(static_declarative_region(od->alias_base->subtype), static_declarative_region(od->alias_base), rstack); // The aliased object must denote a globally static name int sn_error_count = check_for_static_names(od->alias_base, IR_GLOBALLY_STATIC, rstack); if (sn_error_count > 0) { codegen_error.error("%:error: aliased object name is not globally static.", od); error_count += sn_error_count; return error_count; } if (is_scalar_type(od->subtype)) { // ******************************************************************** // The alias object is scalar! // ******************************************************************** // If alias declaration is scalar then the subtype range and the // range of the aliased object must match lint alias_left, alias_right; IR_Direction alias_dir; vector range_alias = get_discrete_range(od->subtype, rstack, IR_NOT_STATIC); error_count += range_alias[0].constant_fold_rangedes(rstack); StaticRangeDescriptor alias_static_range = range_alias[0].rangedes_to_lint(rstack); vector range_aliased = get_discrete_range(od->alias_base->subtype, rstack, IR_NOT_STATIC); error_count += range_aliased[0].constant_fold_rangedes(rstack); StaticRangeDescriptor aliased_static_range = range_aliased[0].rangedes_to_lint(rstack); // Check whether the bounds and directions of the alias type and // the aliased type match. If the bounds are not static then // appropriate runtime code must be added to perform the check // operation. alias_check_bounds(od) = false; // Check left bound if (alias_static_range.valid[0] && aliased_static_range.valid[0]) { if (alias_static_range.left != aliased_static_range.left) { codegen_error.error("%:error: left bounds of alias (sub)type (=%i) and aliased (sub)type (=%i) do not match.", od, (int)alias_static_range.left, (int)aliased_static_range.left); error_count++; } } else alias_check_bounds(od) = true; // The bounds must be checked at runtime! // Check direction if (alias_static_range.valid[1] && aliased_static_range.valid[1]) { if (alias_static_range.dir != aliased_static_range.dir) { codegen_error.error("%:error: range directions of alias (sub)type (=%s) and aliased (sub)type (=%s) do not match.", od, (alias_static_range.dir == IR_DIRECTION_UP? "to" : "downto"), (aliased_static_range.dir == IR_DIRECTION_UP? "to" : "downto")); error_count++; } } else alias_check_bounds(od) = true; // The bounds must be checked at runtime! // Check right bound if (alias_static_range.valid[2] && aliased_static_range.valid[2]) { if (alias_static_range.right != aliased_static_range.right) { codegen_error.error("%:error: right bounds of alias (sub)type (=%i) and aliased (sub)type (=%i) do not match.", od, (int)alias_static_range.right, (int)aliased_static_range.right); error_count++; } } else alias_check_bounds(od) = true; // The bounds must be checked at runtime! } else if (is_array_type(od->subtype)) { // ******************************************************************** // The alias object is an array! // ******************************************************************** // First, assume that the bounds must be checked at runtime alias_check_bounds(od) = true; vector range_aliased; if (od->alias_base->is(IR_SLICE_REFERENCE)) // If the aliased array is a slice then determine slice range range_aliased = get_discrete_range(od->alias_base, rstack, IR_NOT_STATIC); else // Otherwise determine range of array subtype range_aliased = get_discrete_range(od->alias_base->subtype, rstack, IR_NOT_STATIC); error_count += range_aliased[0].constant_fold_rangedes(rstack); // get_static_range should return only a single range // descriptor! assert(range_aliased.size() == 1); // Determine value of bounds if range is static StaticRangeDescriptor aliased_static_range = range_aliased[0].rangedes_to_lint(rstack); lint aliased_length = -1; // First, set length to unknown // If bound and direction are static then determine length if ((od->alias_base->is(IR_SLICE_REFERENCE) || is_constrained_array_type (get_basic_type (od->alias_base->subtype))) && and_reduce(aliased_static_range.valid)) aliased_length = range_to_length(aliased_static_range.left, aliased_static_range.dir, aliased_static_range.right); // Next, determine alias range lint alias_length = -1; // First, set length to unknown // Is alias type a constrained array? if (is_constrained_array_type(od->subtype)) { // Ok, alias array is constrained. For this case try to // determine the length of the array and test whether it matches // the length of the aliased array. vector range_alias = get_discrete_range(od->subtype, rstack, IR_NOT_STATIC); error_count += range_alias[0].constant_fold_rangedes(rstack); // get_static_range should return only a single range // descriptor! assert(range_alias.size() == 1); // Determine value of bounds if range is static StaticRangeDescriptor alias_static_range = range_alias[0].rangedes_to_lint(rstack); // If bound and direction are static then determine length if (and_reduce(alias_static_range.valid)) alias_length = range_to_length(alias_static_range.left, alias_static_range.dir, alias_static_range.right); if (aliased_length != -1 && alias_length != -1) { // If the length of the alias array and the aliased array // could be determined then check whether they are equal. if (aliased_length != alias_length) { codegen_error.error("%:error: length of alias array (=%s) does not match length of aliased array (=%s).", od->subtype, to_string(alias_length).c_str(), to_string(aliased_length).c_str()); error_count++; } else // If they are equal then no runtime checks must be done! alias_check_bounds(od) = false; } } else { // If alias type is unconstrained then alias length and aliased // length are equal and no bounds checking must be done at // runtime. alias_length = aliased_length; alias_check_bounds(od) = false; } } else { // ******************************************************************** // The alias object is a record! // ******************************************************************** codegen_error.error("%:error: type %n is currently not supportd in alias declarations.", od->subtype); error_count++; } return error_count; } /* XXX - what if dlist is NULL, which is very legal for a list. The type dispatching mechanism does not work for NULL. */ int m_explore_and_check (pIIR_DeclarationList dlist, RegionStack &rstack, bool collect_access_info) { if (done(dlist) & EXPLORED) return 0; else done(dlist) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; for (pIIR_DeclarationList dl = dlist; dl; dl = dl->rest) { pIIR_Declaration d = dl->first; if (d->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { continue; } else if (d->is(IR_OBJECT_DECLARATION)) { // Object declaration pIIR_ObjectDeclaration od = pIIR_ObjectDeclaration(d); if (collect_access_info) get_context(od->subtype, ctxt, rstack, false, 0); error_count += explore_and_check(od->subtype, rstack, collect_access_info); // Explore initial value of declarations if (od->initial_value && od->initial_value->is(IR_EXPRESSION)) { if (collect_access_info) get_context(od->initial_value, ctxt, rstack, false, 0); error_count += constant_fold(od->initial_value, rstack); error_count += check_expression(od->initial_value, rstack); RuntimeCheckFlags runtime_checks; // Hack: currently no // runtime checks are performed for this case! error_count += check_for_target_type(d, od->subtype, od->initial_value, rstack, runtime_checks, true, " illegal initial value:"); // If the object is defined in a concurrent declaration // region, then the initial value is not allowed to contain // any signals! pIIR_DeclarativeRegion base_region = BaseDeclarativeRegion(rstack); if (base_region->is (IR_PACKAGE_DECLARATION) || base_region->is(IR_PACKAGE_BODY_DECLARATION) || base_region->is(IR_ARCHITECTURE_DECLARATION) || base_region->is(IR_ENTITY_DECLARATION)) { // Ok, next collect all objects that are used within the // intial value expression. From these objects extract the // signals! ContextInfo tmp_ctxt; get_context(od->initial_value, tmp_ctxt, rstack, false, 0); list sig_list = filter_unique(tmp_ctxt.accessed_objects, ACCESS, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (list::iterator iter = sig_list.begin (); iter != sig_list.end (); iter++) codegen_error.error("%:error: inital value of %n must not contain signals (%n).", od, od, iter->declaration); } } // Check whether the current object has been created by an alias // declaration and check alias declaration. if (od->alias_base != NULL) error_count += explore_and_check_alias(od, rstack, collect_access_info); // Determine static declarative region if (od->is(IR_CONSTANT_DECLARATION) && pIIR_ConstantDeclaration(od)->initial_value != NULL) { pIIR_DeclarativeRegion r1; if (valid_folded_value(od->initial_value)) r1 = RootDeclarativeRegion(rstack); else if (static_declarative_region(od->initial_value) != NULL) r1 = static_declarative_region(od->initial_value); else r1 = od->declarative_region; static_declarative_region (od) = max_inner (r1, static_declarative_region (od->subtype), rstack); // if (od->declarator != NULL) // { // cout << "testing: " << od->declarator->text.to_chars() << endl; // cout << "valid_folded_value: " << valid_folded_value(od->initial_value) << endl; // cout << "r1: " << (int)r1 << endl; // } // if (static_declarative_region (od) != NULL && // static_declarative_region (od)->declarator != NULL) // cout << "static_declarative_region: " << static_declarative_region (od)->declarator->text.to_chars() << endl; } else if (od->is(IR_CONSTANT_INTERFACE_DECLARATION)) { static_declarative_region (od) = ActiveDeclarativeRegion(rstack); } else static_declarative_region(od) = NULL; if (d->is(IR_FILE_DECLARATION)) { // If d is a file declaration then check file mode and file name pIIR_FileDeclaration file_decl = pIIR_FileDeclaration(d); if (file_decl->file_open_expression != NULL) { error_count += explore_and_check(file_decl->file_open_expression->subtype, rstack, collect_access_info); error_count += constant_fold(file_decl->file_open_expression, rstack); error_count += check_expression(file_decl->file_open_expression, rstack); } if (file_decl->file_logical_name != NULL) { error_count += explore_and_check(file_decl->file_logical_name->subtype, rstack, collect_access_info); error_count += constant_fold(file_decl->file_logical_name, rstack); error_count += check_expression(file_decl->file_logical_name, rstack); } } } else if (d->is(IR_TYPE_DECLARATION)) { // ************************************************************************** // A new type has been declared // ************************************************************************** pIIR_TypeDeclaration tdecl = pIIR_TypeDeclaration(d); pIIR_Type type = tdecl->type; error_count += explore_and_check(tdecl->type, rstack, collect_access_info); // Determine combined declarative region static_declarative_region(tdecl) = static_declarative_region(tdecl->type); } else if (d->is(IR_SUBPROGRAM_DECLARATION)) { // ************************************************************************** // Explore subprogram // ************************************************************************** error_count += explore_and_check(d, rstack, collect_access_info); } else if (d->is(IR_COMPONENT_DECLARATION)) { // ************************************************************************** // Explore component declaration // ************************************************************************** pIIR_ComponentDeclaration comp = pIIR_ComponentDeclaration(d); for (pIIR_InterfaceList il = comp->local_generic_clause; il; il = il->rest) error_count += explore_and_check(il->first, rstack, collect_access_info); for (pIIR_InterfaceList il = comp->local_port_clause; il; il = il->rest) error_count += explore_and_check(il->first, rstack, collect_access_info); } } return error_count; } int m_explore_and_check (pIIR_Type st, RegionStack &rstack, bool collect_access_info) { if (done(st) & EXPLORED) return 0; else done(st) |= EXPLORED; int error_count = constant_fold(st, rstack); // Determine combined declarative region static_declarative_region(st) = RootDeclarativeRegion(rstack); return error_count; } int m_explore_and_check (pIIR_RecordType rt, RegionStack &rstack, bool collect_access_info) { if (done(rt) & EXPLORED) return 0; else done(rt) |= EXPLORED; int error_count = 0; static_declarative_region(rt) = RootDeclarativeRegion(rstack); // Explore and check types of record elements. If any element type // is not static in the RootDeclarativeRegion, put the record type // into the TopDeclarativeRegion. // XXX - the above is not done yet since type declarations except in // the RootDeclarativeRegion do not work. for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) { error_count += explore_and_check (edl->first->subtype, rstack, collect_access_info); #if 0 // XXX - see above if (static_declarative_region (edl->first->subtype) != RootDeclarativeRegion (rstack)) static_declarative_region (rt) = TopDeclarativeRegion (rstack); #endif } error_count += constant_fold(rt, rstack); // Determine combined declarative region return error_count; } int m_explore_and_check (pIIR_ArrayType at, RegionStack &rstack, bool collect_access_info) { if (done(at) & EXPLORED) return 0; else done(at) |= EXPLORED; int error_count = explore_and_check(at->element_type, rstack, collect_access_info); for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) error_count += explore_and_check(tl->first, rstack, collect_access_info); error_count += constant_fold(at, rstack); // Determine combined declarative region static_declarative_region(at) = RootDeclarativeRegion(rstack); return error_count; } int m_explore_and_check (pIIR_ArraySubtype sst, RegionStack &rstack, bool collect_access_info) { if (done(sst) & EXPLORED) return 0; else done(sst) |= EXPLORED; int error_count = explore_and_check(get_base_type(sst), rstack, collect_access_info); if (sst->resolution_function != NULL) error_count += explore_and_check (sst->resolution_function, rstack, collect_access_info); error_count += constant_fold(sst, rstack); // Determine combined declarative region static_declarative_region(sst) = RootDeclarativeRegion(rstack); // Explore and check immediate base type. If the element type is // locally defined then the subtype will be declared locally as well error_count += explore_and_check(sst->immediate_base, rstack, collect_access_info); if (static_declarative_region(sst->immediate_base) != RootDeclarativeRegion(rstack)) static_declarative_region(sst) = BaseDeclarativeRegion(rstack); // Check contraints. If at least one of the contraints includes // bounds which cannot be determined a compile time then the array // subtype must be declared locally. pIIR_Type base_type = get_basic_type(sst->immediate_base); pIIR_TypeList target_tl = base_type->is(IR_ARRAY_SUBTYPE)? pIIR_ArraySubtype(base_type)->constraint : pIIR_ArrayType(base_type)->index_types; pIIR_TypeList tl = sst->constraint; for (; tl; tl = tl->rest, target_tl = target_tl->rest) { error_count += explore_and_check(tl->first, rstack, collect_access_info); if (static_declarative_region(tl->first) != RootDeclarativeRegion(rstack)) static_declarative_region(sst) = BaseDeclarativeRegion(rstack); // Check bounds vector range_desc = get_discrete_range(tl->first, rstack, IR_NOT_STATIC); StaticRangeDescriptor static_range = range_desc[0].rangedes_to_lint(rstack); // Check left bound if (static_range.valid[0]) { // rt_checks stores information on what checks must be done at runtime RuntimeCheckFlags rt_checks; error_count += check_scalar_against_bounds(sst, static_range.left, target_tl->first, rstack, rt_checks, true, " array index range out of bounds:"); // If the left index could not be verified against the array // bounds of the base type then the checks must be done at // compile time if (rt_checks) runtime_checks(tl->first) |= RT_CHECK_LEFT_ARRAY_BOUND; } else runtime_checks(tl->first) |= RT_CHECK_LEFT_ARRAY_BOUND; // Check right bound if (static_range.valid[2]) { // rt_checks stores information on what checks must be done at runtime RuntimeCheckFlags rt_checks; error_count += check_scalar_against_bounds(sst, static_range.right, target_tl->first, rstack, rt_checks, true, " array index range out of bounds:"); // If the left index could not be verified against the array // bounds of the base type then the checks must be done at // compile time if (rt_checks) runtime_checks(tl->first) |= RT_CHECK_RIGHT_ARRAY_BOUND; } else runtime_checks(tl->first) |= RT_CHECK_RIGHT_ARRAY_BOUND; } return error_count; } int m_explore_and_check (pIIR_Subtype st, RegionStack &rstack, bool collect_access_info) { if (done(st) & EXPLORED) return 0; else done(st) |= EXPLORED; int error_count = 0; if (st->immediate_base != NULL) error_count += explore_and_check (st->immediate_base, rstack, collect_access_info); if (st->resolution_function != NULL) error_count += explore_and_check (st->resolution_function, rstack, collect_access_info); return error_count; } int m_explore_and_check (pIIR_ScalarSubtype sst, RegionStack &rstack, bool collect_access_info) { if (done(sst) & EXPLORED) return 0; else done(sst) |= EXPLORED; int error_count = 0; // First, explore the type the current subtype has been derived // from if (sst->immediate_base != NULL) error_count += explore_and_check (sst->immediate_base, rstack, collect_access_info); if (sst->resolution_function != NULL) error_count += explore_and_check (sst->resolution_function, rstack, collect_access_info); error_count += constant_fold(sst, rstack); pIIR_Type basic_type = get_basic_type(sst->immediate_base); vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Determine combined declarative region static_declarative_region(sst) = RootDeclarativeRegion(rstack); // Test whether the scalar subtype is constrained if (sst->range == NULL) { } else if (sst->base->is(IR_ENUMERATION_TYPE) || sst->base->is(IR_INTEGER_TYPE) || sst->base->is(IR_PHYSICAL_TYPE)) { // **************************************************************************** // Enumeration, integer or physical subtype // **************************************************************************** StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); // Check left bound if (range.valid[0]) error_count += check_scalar_against_bounds(sst, range.left, basic_type, rstack, runtime_checks(sst), true); else runtime_checks(sst) |= RT_CHECK_LEFT_BOUND; // Check right bound if (range.valid[2]) error_count += check_scalar_against_bounds(sst, range.right, basic_type, rstack, runtime_checks(sst), true); else runtime_checks(sst) |= RT_CHECK_RIGHT_BOUND; // If bounds are not static then the type info object must be // declared locally if (!and_reduce(range.valid)) static_declarative_region(sst) = BaseDeclarativeRegion(rstack); } else if (sst->base->is(IR_FLOATING_TYPE)) { // **************************************************************************** // Floatingpoint subtype // **************************************************************************** StaticRangeDescriptor range = range_desc[0].rangedes_to_double(rstack); // Check left bound if (range.valid[0]) error_count += check_scalar_against_bounds(sst, range.left, basic_type, rstack, runtime_checks(sst), true); else runtime_checks(sst) |= RT_CHECK_LEFT_BOUND; // Check right bound if (range.valid[2]) error_count += check_scalar_against_bounds(sst, range.right, basic_type, rstack, runtime_checks(sst), true); else runtime_checks(sst) |= RT_CHECK_RIGHT_BOUND; // If bounds are not static then the type info object must be // declared locally if (!and_reduce(range.valid)) static_declarative_region(sst) = BaseDeclarativeRegion(rstack); } else { codegen_error.error("%:error: sorry, this subtype declaration is currently not supported", sst); error_count++; } return error_count; } int m_explore_and_check (pIIR_EnumerationType et, RegionStack &rstack, bool collect_access_info) { if (done(et) & EXPLORED) return 0; else done(et) |= EXPLORED; int enum_count = 0, error_count = 0; // Count number of elements for (pIIR_EnumerationLiteralList ell = et->enumeration_literals; ell; ell = ell->rest) { error_count += constant_fold(ell->first, rstack); enum_count++; } // And store result into node structure enum_item_number(et) = enum_count; // Determine combined declarative region static_declarative_region(et) = RootDeclarativeRegion(rstack); return error_count; } int m_explore_and_check (pIIR_FileType ft, RegionStack &rstack, bool collect_access_info) { if (done(ft) & EXPLORED) return 0; else done(ft) |= EXPLORED; int error_count = explore_and_check(ft->type_mark, rstack, collect_access_info); // Determine combined declarative region static_declarative_region(ft) = static_declarative_region(ft->type_mark); return error_count; } int m_explore_and_check (pIIR_AccessType at, RegionStack &rstack, bool collect_access_info) { if (done(at) & EXPLORED) return 0; else done(at) |= EXPLORED; int error_count = explore_and_check(at->designated_type, rstack, collect_access_info); // Determine combined declarative region static_declarative_region(at) = static_declarative_region(at->designated_type); return error_count; } int m_explore_and_check (pIIR_ArchitectureDeclaration a, RegionStack &rstack, bool collect_access_info) { if (done(a) & EXPLORED) return 0; else done(a) |= EXPLORED; rstack.push(a->entity); rstack.push(a); ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // Explore architecture declarations if (a->declarations != NULL) { extended_declarations(a) = build_extended_declaration_list(a->declarations, rstack); error_count = explore_and_check(extended_declarations(a), rstack, collect_access_info); } // Explore concurrent statements of entity error_count += explore_and_check(a->architecture_statement_part, rstack, collect_access_info); // Collect all external declarations into merge (external_decls_list, a->external_decls, rstack); // Also, explore and check all referenced external declarations if (a->external_decls != NULL) { explore_and_check (a->external_decls, rstack, true); cleanup_external_declaration_list (external_decls_list); } rstack.pop(); rstack.pop(); return error_count; // Return number of errors } int m_explore_and_check (pIIR_ConcurrentStatementList csl, RegionStack &rstack, bool collect_access_info) { if (done(csl) & EXPLORED) return 0; else done(csl) |= EXPLORED; int error_count = 0; while (csl) { error_count += explore_and_check (csl->first, rstack, collect_access_info); csl = csl->rest; } return error_count; } int m_explore_and_check (pIIR_ProcessStatement p, RegionStack &rstack, bool collect_access_info) { if (done(p) & EXPLORED) return 0; else done(p) |= EXPLORED; int error_count = 0; // Check whether a name has been associated with the process if (p->declarator == NULL) { // If the process has no name then create a default name string process_name = "_" + to_string(p->seqno) + process_default_postfix; p->declarator = new IIR_TextLiteral(0, process_name.c_str()); } rstack.push(p); ContextInfo &ctxt = *ActiveContext(rstack); // if the process has a sensitivity list then a virtual wait // statement is created in order to setup a corresponding wait_info // instance. Further, some info about the sensitvity list must be // collected. pIIR_WaitStatement implicit_ws = NULL; if (p->is(IR_SENSITIZED_PROCESS_STATEMENT)) { // Add a virtual wait statement pIIR_SensitizedProcessStatement sp = (pIIR_SensitizedProcessStatement)p; // Constant-Fold on sensitivity list error_count += constant_fold(sp->sensitivity_list, rstack); implicit_ws = new IIR_WaitStatement(p->pos, NULL, NULL, NULL, sp->sensitivity_list); error_count += explore_and_check(implicit_ws, rstack, collect_access_info); // get_context(ws, ctxt, rstack, false, 0); } // Explore local declarations of process if (p->declarations != NULL) { extended_declarations(p) = build_extended_declaration_list(p->declarations, rstack); error_count += explore_and_check(extended_declarations(p), rstack, collect_access_info); } // explore and check sequential statements if (p->process_statement_part != NULL) error_count += explore_and_check(p->process_statement_part, rstack, collect_access_info); // If process has a sensitivity list then check whether no wait // statements are directly and indrectly included in the process // statement part. if (p->is(IR_SENSITIZED_PROCESS_STATEMENT)) { bool start_message_printed = false; // If there is more than a single wait statement, then bail out! if (ctxt.wait_statements.size() > 1) { // List all offending waits. However, do not list the implicit // wait statement created by the code generator. Further, // check out whether the process calls procedures that contain // at least one wait statement. First, get get all procedure // that are called from this process. codegen_error.error("%:error: process has a sensitivity list and also contains wait statements (directly or via a procedure call). The offending wait statements (procedure calls) are:", p); for (list::iterator i = ctxt.wait_statements.begin(); i != ctxt.wait_statements.end(); i++) if ((*i) != implicit_ws) if ((*i)->is (IR_WAIT_STATEMENT)) { codegen_error.error("%:error: offending wait statement in process with sensitivity list.", (*i)); error_count++; } else if ((*i)->is (IR_PROCEDURE_CALL_STATEMENT)) { pIIR_ProcedureCallStatement subprog_call = pIIR_ProcedureCallStatement (*i); codegen_error.error("%:error: offending procedure %n contains (directly or indirectly) a wait statement.", *i, subprog_call->procedure); error_count++; } } } // ****************************************************************** // Add implicit "wait for" signal if necessary // ****************************************************************** if (has_wait_for(p)) { // If at least one wait statement inlcudes an timeout clause add // in implicit signal to the delcaration list. This signal is // required in order to implement the timeout clause. pV2CC_ImplicitSignalDeclaration_WaitFor implicit_signal = new V2CC_ImplicitSignalDeclaration_WaitFor (p->pos, to_TextLiteral("_implicit_wait_for"), p, NULL, -1, NULL /* subtype */, NULL, NULL, IR_NO_SIGNAL_KIND); extended_declarations(p) = new IIR_DeclarationList(p->pos, implicit_signal, extended_declarations(p)); // Assume that the signal is also written so that a driver is // created for this signal! ctxt.accessed_objects.push_back(AccessDescriptor(implicit_signal, NULL, READ | WRITE | SENSITIVE)); } rstack.pop(); return error_count; } int m_explore_and_check (pIIR_PackageDeclaration p, RegionStack &rstack, bool collect_access_info) { if (done(p) & EXPLORED) return 0; else done(p) |= EXPLORED; rstack.push(p); if (p->declarations) { extended_declarations(p) = build_extended_declaration_list(p->declarations, rstack); explore_and_check(extended_declarations(p), rstack, collect_access_info); } // Collect all external delcarations into if (collect_access_info) merge (external_decls_list, p->external_decls, rstack); // Also, explore and check all referenced external declarations if (p->external_decls != NULL) { explore_and_check (p->external_decls, rstack, true); cleanup_external_declaration_list (external_decls_list); } rstack.pop(); return 0; // Flag no errors found } int m_explore_and_check (pIIR_PackageBodyDeclaration pb, RegionStack &rstack, bool collect_access_info) { if (done(pb) & EXPLORED) return 0; else done(pb) |= EXPLORED; rstack.push(pb); if (pb->declarations) { extended_declarations(pb) = build_extended_declaration_list(pb->declarations, rstack); explore_and_check(extended_declarations(pb), rstack, collect_access_info); } // Collect all external delcarations into if (collect_access_info) merge (external_decls_list, pb->external_decls, rstack); // Also, explore and check all referenced external declarations if (pb->external_decls != NULL) { explore_and_check (pb->external_decls, rstack, true); cleanup_external_declaration_list (external_decls_list); } rstack.pop(); return 0; // Flag no errors found } int m_explore_and_check (pIIR_ConfigurationDeclaration c, RegionStack &rstack, bool collect_access_info) { if (done(c) & EXPLORED) return 0; else done(c) |= EXPLORED; rstack.push(c); // Collect all external delcarations into if (collect_access_info) merge (external_decls_list, c->external_decls, rstack); // Also, explore and check all referenced external declarations if (c->external_decls != NULL) { explore_and_check (c->external_decls, rstack, true); cleanup_external_declaration_list (external_decls_list); } rstack.pop(); return 0; // Flag no errors found } int m_explore_and_check (pIIR_ComponentDeclaration c, RegionStack &rstack, bool collect_access_info) { if (done(c) & EXPLORED) return 0; else done(c) |= EXPLORED; return 0; // Flag no errors found } int m_explore_and_check(pIIR_SequentialStatementList sl, RegionStack &rstack, bool collect_access_info) { if (done(sl) & EXPLORED) return 0; else done(sl) |= EXPLORED; int error_count = 0; while (sl) { error_count += explore_and_check(sl->first, rstack, collect_access_info); sl = sl->rest; } return error_count; // Flag no errors found } // Function to check a statement where the selection expression is scalar int explore_and_check_scalar_case_statement(pIIR_CaseStatement cs, RegionStack &rstack, bool collect_access_info) { int error_count = 0, choice_error_count = 0; // Get basic type of choice expression. I.e., any subtypes which // only add a resolution function to a type are ignored. pIIR_Type basic_type = get_basic_type(cs->expression->subtype); // First, determine bounds of type vector range_desc = get_discrete_range(cs->expression->subtype, rstack, IR_LOCALLY_STATIC); // Determine not static range and check whether both ranges are // the same vector not_static_range_desc = get_discrete_range(cs->expression->subtype, rstack, IR_NOT_STATIC); if (!range_desc[0].is_equal_to(not_static_range_desc[0])) { // If both ranges are NOT the same then print a notification if // desired. Further, the range is determined from the base type. range_desc = get_discrete_range(basic_type, rstack, IR_LOCALLY_STATIC); // Note the following message is NOT an error. It's just a hint // for the user that the actual range which must be covered by // the case statement might be "unexpected". StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, DEFAULT); codegen_error.error("%:note: range of (sub)type %n is not locally static.", cs, cs->expression->subtype); codegen_error.error("%:note: determining locally static range from base type...", cs); codegen_error.error("%:note: ...static range is %s %s %s.", cs, range.left.c_str(), range.dir.c_str(), range.right.c_str()); } // Convert range to ints error_count += range_desc[0].constant_fold_rangedes(rstack); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); lint lower_type_bound = min (range.left, range.right); // Lower bound of expression type lint upper_type_bound = max (range.left, range.right); // Upper bound of expression type bool to_type_range = range.left < range.right; // Number of discrete items lint item_type_count = upper_type_bound - lower_type_bound + 1; lint item_count = 0; // Now analyze each alternative vector lower_vec; // Stores lower bounds of choices vector upper_vec; // Stores upper bounds of choices vector choice_vec; // Points to associated choice expression // with lower_vec and upper_vec for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest) { pIIR_CaseStatementAlternative a = al->first; // Analyze choices for (pIIR_ChoiceList cl = a->choices; cl; cl = cl->rest) { if (cl->first->is(IR_CHOICE_BY_RANGE)) { //*************************************** // Choice by range //*************************************** pIIR_ChoiceByRange cbr = pIIR_ChoiceByRange(cl->first); // Constant fold choice expression error_count += constant_fold(cbr->range, rstack); // Get choice range. Note that choice must be locally static StaticRangeDescriptor range; IR_Direction dir = IR_DIRECTION_UP; // Get range. Note that range_desc is empty if range is not // locally static! vector range_desc = get_discrete_range(cbr->range, rstack, IR_LOCALLY_STATIC); if (range_desc.size() == 0) { codegen_error.error("%:error: choice %n is not locally static.", cbr->range, cbr->range); choice_error_count++; } else { // convert string values to long long ints range = range_desc[0].rangedes_to_lint(rstack); } lint lower, upper; if (range.left == range.right) { lower = range.left; upper = range.right; } else if (range.left < range.right && range.dir == IR_DIRECTION_UP) { lower = range.left; upper = range.right; } else if (range.left > range.right && range.dir != IR_DIRECTION_UP) { lower = range.right; upper = range.left; } // Check whether choice is unique for (int i = 0; i < lower_vec.size(); i++) { if ((lower <= lower_vec[i] && upper >= lower_vec[i]) || (lower <= upper_vec[i] && upper >= upper_vec[i])) { if (choice_vec[i]->is(IR_CHOICE_BY_RANGE)) codegen_error.error("%:error: choice %n (line %i) conflicts with %n (line %i).", cbr, cbr->range, get_line_number(cbr->range), pIIR_ChoiceByRange(choice_vec[i])->range, get_line_number(choice_vec[i])); else codegen_error.error("%:error: choice %n (line %i) conflicts with %n (line %i).", cbr, cbr->range, get_line_number(cbr->range), pIIR_ChoiceByExpression(choice_vec[i])->value, get_line_number(choice_vec[i])); choice_error_count++; } } // Add bounds to vectors lower_vec.push_back(lower); upper_vec.push_back(upper); choice_vec.push_back(cbr); // Update item counter item_count += upper - lower + 1; } else if (cl->first->is(IR_CHOICE_BY_EXPRESSION)) { //*************************************** // Choice by expression //*************************************** lint value; pIIR_ChoiceByExpression cbe = pIIR_ChoiceByExpression(cl->first); // Constant fold choice expression error_count += constant_fold(cbe->value, rstack); // Choice must be locally static if (cbe->value->static_level != IR_LOCALLY_STATIC) { codegen_error.error("%:choice %n (%p) is not locally static.", cl->first, cbe->value, cbe->value); choice_error_count++; value = lower_type_bound; } else value = folded_value(cbe->value).long_value(); // Check whether the value is within the type bounds if (value < lower_type_bound || value > upper_type_bound) { codegen_error.error("%:choice %n is not within bounds of type %n.", cbe->value, cbe->value, cs->expression->subtype); choice_error_count++; } // Check whether choice is unique for (int i = 0; i < lower_vec.size(); i++) { if (value >= lower_vec[i] && value <= upper_vec[i]) { codegen_error.error("%:choice %n (line %i) conflicts with %n (line %i).", cbe->value, cbe->value, get_line_number(cbe->value), choice_vec[i], get_line_number(choice_vec[i])); choice_error_count++; } } // Add bounds to vectors lower_vec.push_back(value); upper_vec.push_back(value); choice_vec.push_back(cbe); // A single element was specified. Hence, increment item counter. item_count++; } else if (cl->first->is(IR_CHOICE_BY_OTHERS)) { //*************************************** // Choice by others //*************************************** // Check whether the others choice is last alternative in // choice list if (cl->rest != NULL || al->rest != NULL || al->first->choices != cl) { codegen_error.error("%:others choice must be a single last alternative in choice list.", cl->first); choice_error_count++; } // Ok, due to the others statement all discrete items of the // type are covered. Hence, set item_count to the number of // elements the expression type consists of item_count = item_type_count; } } if (a->sequence_of_statements != NULL) // Analyze sequential statements associated with alternative error_count += explore_and_check(a->sequence_of_statements, rstack, collect_access_info); } // Update error counter error_count += choice_error_count; // Check whether all items are covered by the choices if (choice_error_count != 0) { // If the choices contained errors then no choice coverage // checking is done but we warn the user. codegen_error.info("%:warning: no choice coverage checking is done due to previous errors.", cs); } else if (item_count != item_type_count) { // Not all items are covered! // Determine missing choices and output some useful error // messages sort(lower_vec.begin(), lower_vec.end()); sort(upper_vec.begin(), upper_vec.end()); vector missing_lower, missing_upper; lint search_bound = lower_type_bound; // Determine missing ranges for (int i = 0; i < lower_vec.size(); i++) { if (search_bound < lower_vec[i]) { missing_lower.push_back(search_bound); missing_upper.push_back(lower_vec[i] - 1); } search_bound = upper_vec[i] + 1; } if (search_bound <= upper_type_bound) { missing_lower.push_back(search_bound); missing_upper.push_back(upper_type_bound); } // Generate error message string reporting the missing ranges string error_str; bool first = true; pIIR_Type base_type = get_base_type(cs->expression->subtype); for (int i = 0; i < missing_lower.size(); i++, first = false) { string low_value; string high_value; if (base_type->is(IR_ENUMERATION_TYPE)) { // If expression is an enumeration type then convert // position numbers into appropriate strings low_value = pos_to_literal(pIIR_EnumerationType(base_type)->enumeration_literals, (int)missing_lower[i]) ->declarator->text.to_chars(); high_value = pos_to_literal(pIIR_EnumerationType(base_type)->enumeration_literals, (int)missing_upper[i]) ->declarator->text.to_chars(); } else { // If expression is an integer type then convert integer // values to strings low_value = to_string((int)missing_lower[i]); high_value = to_string((int)missing_upper[i]); } if (missing_lower[i] == missing_upper[i]) error_str += (first?"":", ") + low_value; else error_str += (first?"":", ") + (to_type_range? low_value + " to " + high_value : high_value + " downto " + low_value); } codegen_error.error("%:error: not all possible values of type %n are covered by the case statement.", cs, cs->expression->subtype); codegen_error.error("%:error: missing element(s): %s.", cs, error_str.c_str()); error_count++; } return error_count; // We are done. Return number of errors found } // Converts an array literal string passed over as a vector of // enumeration pos values into a corresponding string string array_literal_to_string(pIIR_EnumerationType etype, vector &vec) { string pattern_str = "\""; for (int i = 0; i < vec.size(); i++) pattern_str += pos_to_literal(etype->enumeration_literals, vec[i])->declarator->text.to_chars()[1]; pattern_str += "\""; return pattern_str; } // This list will store the different choice pattern struct choice_descriptor { pIIR_Choice choice_node; vector choice_value; choice_descriptor(pIIR_Choice c, vector &cv) { choice_node = c; choice_value = cv; } choice_descriptor &operator=(const choice_descriptor &src) { choice_node = src.choice_node; choice_value = src.choice_value; } }; // Function to check a statement where the selection expression is an // one-dimensional array and its element type is an character type int explore_and_check_array_case_statement(pIIR_CaseStatement cs, RegionStack &rstack, bool collect_access_info) { int error_count = 0, choice_error_count = 0; // Get basic type of choice expression. I.e., any subtypes which // only add a resolution function to a type are ignored. pIIR_Type basic_type = get_basic_type(cs->expression->subtype); // First, determine bounds of array type vector range_desc = get_discrete_range(cs->expression->subtype, rstack, IR_LOCALLY_STATIC); // Bail out if array bounds are not locally static error_count = range_desc[0].constant_fold_rangedes(rstack); StaticRangeDescriptor locally_static_range = range_desc[0].rangedes_to_lint(rstack); if (error_count != 0 || !and_reduce(locally_static_range.valid)) { codegen_error.error("%:error: array bounds of selection expression must be locally static.", cs); return error_count + 1; } // Determine length of array lint length = range_to_length(locally_static_range.left, locally_static_range.dir, locally_static_range.right); // Test whether the array is one-dimensional if (range_desc.size() > 1) { codegen_error.error("%:error: selection array expression must be one-dimensional.", cs); return error_count + 1; } // Array element type must be a character type pIIR_Type element_base_type = get_base_type(pIIR_ArrayType(get_base_type(cs->expression->subtype))->element_type); if (!element_base_type->is(IR_ENUMERATION_TYPE)) { codegen_error.error("%:error: element base type of the array must be a character type.", cs); return error_count + 1; } else { pIIR_EnumerationType enum_type = pIIR_EnumerationType(element_base_type); for (pIIR_EnumerationLiteralList ell = enum_type->enumeration_literals; ell; ell = ell->rest) if (ell->first->declarator->text.to_chars()[0] != '\'') { codegen_error.error("%:error: element base type (%n) of the array is not character a type.", cs, enum_type); return error_count + 1; } } // Next, determine how many different patterns must be covered. Note // that if the number of patterns is greater than INTEGER_MAX then // INTEGER_MAX is assumed (there will be never a real design with // INTEGER_MAX explicitly defined choices). pIIR_Type element_basic_type = get_basic_type(pIIR_ArrayType(get_base_type(cs->expression->subtype))->element_type); vector elem_range_desc = get_discrete_range (element_basic_type, rstack, IR_NOT_STATIC); StaticRangeDescriptor erange = elem_range_desc[0].rangedes_to_lint(rstack); // Check whether the element type of the array is locally static, // i.e., wehther we could determine its bounds at compile time. if (!and_reduce(erange.valid)) { codegen_error.error("%:error: element type (%n) of the array is not locally static.", cs, element_basic_type); return error_count + 1; } int enum_item_number = range_to_length(erange.left, erange.dir, erange.right); lint item_type_count = calculate_pow((lint)enum_item_number, length); lint item_count = 0; // This list stores all the choice patterns list choices_list; // Next, analyze case statements alternatives for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest) { pIIR_CaseStatementAlternative a = al->first; // Analyze choices for (pIIR_ChoiceList cl = a->choices; cl; cl = cl->rest) { if (cl->first->is(IR_CHOICE_BY_EXPRESSION)) { //*************************************** // Choice by expression //*************************************** pIIR_Expression choice_value = pIIR_ChoiceByExpression(cl->first)->value; // Choice must be locally static, i.e. the compiler should be able to // determine the value during constant folding. Hence, check wehther a // valid folded value could be determined for the choice. choice_error_count += constant_fold(choice_value, rstack); if (!valid_folded_value(choice_value)) { codegen_error.error("%:choice %n (%p) is not locally static.", cl->first, choice_value, choice_value); choice_error_count++; continue; } // Make sure that the length of choice array and the length // of the selection expression match. lint clength = folded_value(choice_value).array_literal_value().size(); // Length of choice array if (length != clength) { codegen_error.error("%:error: length of selection array (=%i) does not match length of choice (=%i).", cl, (int)length, (int)clength); choice_error_count++; continue; } else { // Check whether the choice is unique for (list::iterator iter = choices_list.begin(); iter != choices_list.end(); iter++) if ((*iter).choice_value == get_folded_value(choice_value).array_literal_value()) { string pattern_str = array_literal_to_string(pIIR_EnumerationType(element_base_type), (*iter).choice_value); codegen_error.error("%:error: choice %s in line %i conflicts with same choice in line %i.", choice_value, pattern_str.c_str(), get_line_number(choice_value), get_line_number((*iter).choice_node)); choice_error_count++; } // If the choice length is ok then just store the choice // pattern future choice coverage checking choices_list.push_back(choice_descriptor(cl->first, get_folded_value(choice_value).array_literal_value())); item_count++; } } else if (cl->first->is(IR_CHOICE_BY_OTHERS)) { //*************************************** // Choice by others //*************************************** // Store that all possible patterns are covered by case statement item_count = item_type_count; // Check whether the others choice is last alternative in // choice list if (cl->rest != NULL || al->rest != NULL || al->first->choices != cl) { codegen_error.error("%:error: others choice must be a single last alternative in choice list.", cl->first); choice_error_count++; } } else if (cl->first->is(IR_CHOICE_BY_RANGE)) { //*************************************** // Choice by range //*************************************** codegen_error.error("%:error: choice by range is not allowed for arrays.", cl); choice_error_count++; continue; } else assert(false); } // Analyze sequential statements associated with alternative if (a->sequence_of_statements != NULL) error_count += explore_and_check(a->sequence_of_statements, rstack, collect_access_info); } // Check whether all items are covered by the choices if (choice_error_count != 0) { // If the choices contained errors then no choice coverage // checking is done but we warn the user. codegen_error.info("%:warning: no choice coverage checking is done due to previous errors.", cs); } else if (item_type_count != item_count) { // Obviously not all patterns are covered by the choices. Hence, // output an error message! Try to find a pattern which is not // covered by the choices in order to porduce some more useful // error message. string uncovered_pattern_str; vector test_pattern(length); fill(test_pattern.begin(), test_pattern.end(), erange.left); // Preload missing_pattern with the number of missing pattern to // be printed in the error message. However, we will print at most // three pattern. const lint max_pattern_to_print = 3; lint missing_pattern = min(max_pattern_to_print, item_type_count - item_count); while (true) { // Check whether the test pattern is not included in the choices bool pattern_found = true; for (list::iterator iter = choices_list.begin(); iter != choices_list.end() && pattern_found; iter++) if ((*iter).choice_value == test_pattern) pattern_found = false; // Print pattern into string if it is not covered by the choices if (pattern_found) { // Print pattern into string if (uncovered_pattern_str != "") uncovered_pattern_str += ", "; uncovered_pattern_str += array_literal_to_string(pIIR_EnumerationType(element_base_type), test_pattern); // Exit loop if at most 3 unconvered pattern were detected if (--missing_pattern == 0) break; } // Determine the next valid pattern for (int i = 0; i < length; i++) { test_pattern[i]++; if (test_pattern[i] > erange.right) test_pattern[i] = erange.left; else break; } } // Append ", ..." to string if more than t3 pattern are missing if (item_type_count - item_count > max_pattern_to_print) uncovered_pattern_str += ", ..."; // Output error message string item_type_count_str = item_type_count == INTEGER_MAX? (">" + to_string(INTEGER_MAX - 1)) : ("=" + to_string(item_type_count)); codegen_error.error("%:error: only %i out of %i**%i (%s) possible choices are covered by the case statement. E.g., pattern %s is/are missing.", cs, (int)item_count, (int)enum_item_number, (int)length, item_type_count_str.c_str(), uncovered_pattern_str.c_str()); } error_count += choice_error_count; return error_count; // We are done. Return number of errors found } int m_explore_and_check(pIIR_CaseStatement cs, RegionStack &rstack, bool collect_access_info) { if (done(cs) & EXPLORED) return 0; else done(cs) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0, choice_error_count = 0; // Explore case expression error_count += explore_and_check(cs->expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(cs->expression, ctxt, rstack, false, 0); error_count += constant_fold(cs->expression, rstack); error_count += check_expression(cs->expression, rstack); // Get basic type of choice expression. I.e., any subtypes which // only add a resolution function to a type are ignored. pIIR_Type basic_type = get_basic_type(cs->expression->subtype); if (is_scalar_type(basic_type)) //**************************************************** //**************************************************** // Expression is scalar. //**************************************************** //**************************************************** return error_count + explore_and_check_scalar_case_statement(cs, rstack, collect_access_info); else //**************************************************** //**************************************************** // The expression is an array where the elements are characters //**************************************************** //**************************************************** return error_count + explore_and_check_array_case_statement(cs, rstack, collect_access_info); } int m_explore_and_check(pIIR_IfStatement ifs, RegionStack &rstack, bool collect_access_info) { if (done(ifs) & EXPLORED) return 0; else done(ifs) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // Explore condition expression error_count += explore_and_check(ifs->condition->subtype, rstack, collect_access_info); if (collect_access_info) get_context(ifs->condition, ctxt, rstack, false, 0); error_count += constant_fold(ifs->condition, rstack); error_count += check_expression(ifs->condition, rstack); // Explore then branch if (ifs->then_sequence != NULL) error_count += explore_and_check(ifs->then_sequence, rstack, collect_access_info); // Explore else branch (if present) if (ifs->else_sequence != NULL) error_count += explore_and_check(ifs->else_sequence, rstack, collect_access_info); return error_count; } int m_explore_and_check(pIIR_NullStatement n, RegionStack &rstack, bool collect_access_info) { if (done(n) & EXPLORED) return 0; else done(n) |= EXPLORED; return 0; } int m_explore_and_check(pIIR_ForLoopStatement fs, RegionStack &rstack, bool collect_access_info) { if (done(fs) & EXPLORED) return 0; else done(fs) |= EXPLORED; // Set unique integer id for current loop loop_id(fs) = get_unique_int_id(); ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // Explore iteration range if (collect_access_info) get_context(pIIR_ScalarSubtype(fs->iterator->subtype)->range, ctxt, rstack, false, 0); error_count = constant_fold(pIIR_ScalarSubtype(fs->iterator->subtype)->range, rstack); error_count += check_expression(pIIR_ScalarSubtype(fs->iterator->subtype)->range, rstack); static_declarative_region (fs->iterator) = ActiveDeclarativeRegion (rstack); // Explore loop body if (fs->sequence_of_statements != NULL) error_count += explore_and_check(fs->sequence_of_statements, rstack, collect_access_info); return error_count; // Flag no errors found } int m_explore_and_check(pIIR_LoopStatement ls, RegionStack &rstack, bool collect_access_info) { if (done(ls) & EXPLORED) return 0; else done(ls) |= EXPLORED; // Set unique integer id for current loop loop_id(ls) = get_unique_int_id(); int error_count = 0; // Explore loop body if (ls->sequence_of_statements != NULL) error_count += explore_and_check(ls->sequence_of_statements, rstack, collect_access_info); return error_count; } int m_explore_and_check(pIIR_NextStatement ns, RegionStack &rstack, bool collect_access_info) { if (done(ns) & EXPLORED) return 0; else done(ns) |= EXPLORED; // Store that a next statement was used for the corresponding loop next_statement_used(ns->loop) = true; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (ns->condition != NULL) { error_count = explore_and_check(ns->condition->subtype, rstack, collect_access_info); if (collect_access_info) get_context(ns->condition, ctxt, rstack, false, 0); error_count += constant_fold(ns->condition, rstack); error_count += check_expression(ns->condition, rstack); } return error_count; } int m_explore_and_check(pIIR_ExitStatement es, RegionStack &rstack, bool collect_access_info) { if (done(es) & EXPLORED) return 0; else done(es) |= EXPLORED; // Store that a next statement was used for the corresponding loop exit_statement_used(es->loop) = true; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (es->condition != NULL) { error_count = explore_and_check(es->condition->subtype, rstack, collect_access_info); if (collect_access_info) get_context(es->condition, ctxt, rstack, false, 0); error_count += constant_fold(es->condition, rstack); error_count += check_expression(es->condition, rstack); } return error_count; } int m_explore_and_check(pIIR_WhileLoopStatement wls, RegionStack &rstack, bool collect_access_info) { if (done(wls) & EXPLORED) return 0; else done(wls) |= EXPLORED; // Set unique integer id for current loop loop_id(wls) = get_unique_int_id(); ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; error_count = explore_and_check(wls->condition->subtype, rstack, collect_access_info); if (collect_access_info) get_context(wls->condition, ctxt, rstack, false, 0); error_count += constant_fold(wls->condition, rstack); error_count += check_expression(wls->condition, rstack); // Explore loop body if (wls->sequence_of_statements != NULL) error_count += explore_and_check(wls->sequence_of_statements, rstack, collect_access_info); return error_count; } int m_explore_and_check(pIIR_WaitStatement ws, RegionStack &rstack, bool collect_access_info) { if (done(ws) & EXPLORED) return 0; else done(ws) |= EXPLORED; // Determine base declarative region (process, subprogram, // concurrent assignment) pIIR_DeclarativeRegion base_region = BaseDeclarativeRegion(rstack); if (ws->condition_clause == NULL && ws->timeout_clause == NULL && ws->sensitivity_list == NULL) { // If there is no condition clause and no timeout clause and no // sensitivity_list then this wait statements shall stop the // process for the rest of the simulation time. Hence, nothing has // to be done now. return 0; } ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // Add ws to the list of wait statements of the current context ctxt.wait_statements.push_back(ws); if (ws->sensitivity_list) { // Wait statemen has an explicit sensitivity list. if (base_region->is (IR_IMPLICIT_PROCESS_STATEMENT)) { // If this wait statement belongs to an implicit process // (e.g., derived from a concurrent signal assignement), then // the sensitivity list may contain signal names that are not // globally static. Hence, form the sensitivity list, the // static signal names must be extracted. First, collect // accessed objects... ContextInfo tmp_ctxt; for (pIIR_ExpressionList el = ws->sensitivity_list; el; el = el->rest) { error_count += explore_and_check(el->first->subtype, rstack, collect_access_info); get_context(el->first, tmp_ctxt, rstack, false, 0); error_count += constant_fold(el->first, rstack); error_count += check_expression(el->first, rstack); (*tmp_ctxt.accessed_objects.begin()).access_type = SENSITIVE; ctxt.accessed_objects.push_back(*tmp_ctxt.accessed_objects.begin()); } assert (ws->condition_clause == NULL); // Now analyze accessed objects for (access_list::iterator i = tmp_ctxt.accessed_objects.begin(); i != tmp_ctxt.accessed_objects.end(); i++) if ((*i).declaration->is(IR_OBJECT_DECLARATION)) { // If the object is a signal then set access_type to // SENSITIVE and READ as the process is sensitive on this // signal. Otherwise set the access_type to READ as a process // can be sensitive on signals only. AccessFlags access_type = ((*i).declaration->is(IR_SIGNAL_DECLARATION) || (*i).declaration->is(IR_SIGNAL_INTERFACE_DECLARATION))? (SENSITIVE | SIGNAL_FUNCTION_ATTRIBUTE | READ) : READ; ctxt.accessed_objects.push_back(AccessDescriptor(pIIR_ObjectDeclaration((*i).declaration), (*i).access_expr, access_type)); } else // Add remaining access descriptors to access list. ctxt.accessed_objects.push_back((*i)); } else { // Set access type flag for sensitivity signals. If this wait // statment is included within a procedure, then the access_type // flags will also include flag SIGNAL_FUNCTION_ATTRIBUTE. AccessFlags sensitive_signal_access_type = base_region->is (IR_PROCEDURE_DECLARATION) ? (SENSITIVE | SIGNAL_FUNCTION_ATTRIBUTE) : SENSITIVE; for (pIIR_ExpressionList el = ws->sensitivity_list; el; el = el->rest) { ContextInfo tmp_ctxt; error_count += explore_and_check(el->first->subtype, rstack, collect_access_info); get_context(el->first, tmp_ctxt, rstack, false, 0); error_count += constant_fold(el->first, rstack); error_count += check_expression(el->first, rstack); int static_sl_count = check_for_static_names(el->first, IR_GLOBALLY_STATIC, rstack); error_count += static_sl_count; if (static_sl_count > 0) codegen_error.error("%:error: signals on an explicit sensitivity list must denote globally static signal names.", ws); else { (*tmp_ctxt.accessed_objects.begin()).access_type = sensitive_signal_access_type; ctxt.accessed_objects.push_back(*tmp_ctxt.accessed_objects.begin()); } } if (ws->condition_clause) { error_count += explore_and_check(ws->condition_clause->subtype, rstack, collect_access_info); if (collect_access_info) get_context(ws->condition_clause, ctxt, rstack, false, 0); error_count += constant_fold(ws->condition_clause, rstack); error_count += check_expression(ws->condition_clause, rstack); } } } else { // Wait statement does not have an explicit sensitivity // list. Hence, extract one from the wait condition. ContextInfo tmp_ctxt; if (ws->condition_clause != NULL) { error_count += explore_and_check(ws->condition_clause->subtype, rstack, collect_access_info); get_context(ws->condition_clause, tmp_ctxt, rstack, false, 0); if (collect_access_info) get_context(ws->condition_clause, ctxt, rstack, false, 0); error_count += constant_fold(ws->condition_clause, rstack); error_count += check_expression(ws->condition_clause, rstack); } for (access_list::iterator i = tmp_ctxt.accessed_objects.begin(); i != tmp_ctxt.accessed_objects.end(); i++) if ((*i).declaration->is(IR_OBJECT_DECLARATION)) { // If the object is a signal then set access_type to // SENSITIVE and READ as the process is sensitive on this // signal. Otherwise set the access_type to READ as a process // can be sensitive on signals only. AccessFlags access_type = ((*i).declaration->is(IR_SIGNAL_DECLARATION) || (*i).declaration->is(IR_SIGNAL_INTERFACE_DECLARATION))? (SENSITIVE | SIGNAL_FUNCTION_ATTRIBUTE | READ) : READ; ctxt.accessed_objects.push_back(AccessDescriptor(pIIR_ObjectDeclaration((*i).declaration), (*i).access_expr, access_type)); } else // Add remaining access descriptors to access list. ctxt.accessed_objects.push_back((*i)); // Ouptput a warning if the implicit sensitivity list is empty! if (tmp_ctxt.accessed_objects.size() == 0 && ws->timeout_clause == NULL) codegen_error.info("%:warning: the implictly defined sensitivity list is empty, i.e. the process will wait forever.", ws); } // Explore timeout expression if (ws->timeout_clause) { error_count += explore_and_check(ws->timeout_clause->subtype, rstack, collect_access_info); if (collect_access_info) get_context(ws->timeout_clause, ctxt, rstack, false, 0); error_count += constant_fold(ws->timeout_clause, rstack); error_count += check_expression(ws->timeout_clause, rstack); // Store that in the corresponding procedure or process that a // wait statement uses an timeout clause. pIIR_DeclarativeRegion base_region = BaseDeclarativeRegion(rstack); if (base_region->is(IR_PROCEDURE_DECLARATION)) has_wait_for(pIIR_ProcedureDeclaration(base_region)) = true; else if (base_region->is(IR_PROCESS_STATEMENT)) has_wait_for(pIIR_ProcessStatement(base_region)) = true; else assert(false); } // Store that in the corresponding procedure or process that a // wait statement. if (base_region->is(IR_PROCEDURE_DECLARATION)) has_wait (pIIR_ProcedureDeclaration(base_region)) = true; else if (base_region->is(IR_PROCESS_STATEMENT)) has_wait (pIIR_ProcessStatement(base_region)) = true; else assert(false); return error_count; } int m_explore_and_check(pIIR_SignalAssignmentStatement sas, RegionStack &rstack, bool collect_access_info) { if (done(sas) & EXPLORED) return 0; else done(sas) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // Add sas to list of signal assignment statements ctxt.signal_assignment_statements.push_back(sas); error_count += explore_and_check(sas->target->subtype, rstack, collect_access_info); // Collect objects in target expression if (collect_access_info) get_context(sas->target, ctxt, rstack, true /* = true, because the signal is a target */, 0); // Check and fold target expression error_count += constant_fold(sas->target, rstack); error_count += check_expression(sas->target, rstack); // Collect signals in reject expression if (sas->reject_time_expression) { error_count += explore_and_check(sas->reject_time_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(sas->reject_time_expression, ctxt, rstack, true, 0); error_count += constant_fold(sas->reject_time_expression, rstack); error_count += check_expression(sas->reject_time_expression, rstack); } // Collect signals in waveforms for (pIIR_WaveformList wl = sas->waveform; wl; wl = wl->rest) { error_count += explore_and_check(wl->first->value->subtype, rstack, collect_access_info); if (collect_access_info) get_context(wl->first->value, ctxt, rstack, false, 0); error_count += constant_fold(wl->first->value, rstack); error_count += check_expression(wl->first->value, rstack); if (wl->first->time != NULL) { error_count += constant_fold(wl->first->time, rstack); error_count += check_expression(wl->first->time, rstack); } // Check assignment value. error_count += check_for_target_type(wl->first, sas->target->subtype, wl->first->value, rstack, runtime_checks(wl->first->value), true, " illegal signal assignment:"); } return error_count; } int m_explore_and_check(pIIR_VariableAssignmentStatement vas, RegionStack &rstack, bool collect_access_info) { if (done(vas) & EXPLORED) return 0; else done(vas) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; error_count += explore_and_check(vas->target->subtype, rstack, collect_access_info); // Collect objects in target expression if (collect_access_info) get_context(vas->target, ctxt, rstack, true /* = true, because the variable is a target */, 0); error_count += constant_fold(vas->target, rstack); error_count += check_expression(vas->target, rstack); // Collect objects in assignment expression error_count += explore_and_check(vas->expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(vas->expression, ctxt, rstack, false, 0); error_count += constant_fold(vas->expression, rstack); error_count += check_expression(vas->expression, rstack); // Check assignment value. error_count += check_for_target_type(vas, vas->target->subtype, vas->expression, rstack, runtime_checks(vas->expression), true, " illegal variable assignment:"); return error_count; } // Check association. Note that the parser converts complex // associations of the form (a(0) => ..., a(1) => ...) into an // "aritficial" array (or record) aggregate. actual points to an // actual expression (perhaps and artificial aggregate). range_vec // stores the ranges determined by the aggregate. I.e., in case of an // multi-dimensional aggregate each vector entry covers one // dimension. parameter level is used to keep track of these // levels. The purpose of range_vec is to enable range checking. int check_association(pIIR_Expression actual, pIIR_Type formal_type, vector > &range_vec, int level, RegionStack &rstack) { int error_count = 0; if (actual == NULL) { // Association with `open'. If the formal element is left open // then the corresonding range vector must be empty. if (range_vec[level].size() != 0) error_count++; return error_count; } else if (actual->is(IR_OBJECT_REFERENCE)) { // Association with a single signal object. The corresponding // range vector includes only a single element if (range_vec[level].size() == 0) { range_vec[level] = vector(1); range_vec[level][0] = 0; } else if (range_vec[level].size() != 1) error_count++; RuntimeCheckFlags runtime_checks; if (check_for_target_type(actual, formal_type, actual, rstack, runtime_checks, false) != 0) { codegen_error.error("%:error: illegal association.", actual); error_count++; } return error_count; } else if (actual->is(IR_ARTIFICIAL_ARRAY_AGGREGATE)) { // If actual is actually an artificial array aggregate then the // formal has been associated individually. Hence, decent into // the aggregate expression and find all signal associations. pIIR_Type basic_dest_type = get_basic_type(formal_type); pIIR_TypeList tl = basic_dest_type->is(IR_ARRAY_TYPE) ? pIIR_ArrayType(basic_dest_type)->index_types : pIIR_ArraySubtype(basic_dest_type)->constraint; // Next, determine number of dimensions. int dim_counter = 0; for (pIIR_TypeList tli = tl; tli; tli = tli->rest) dim_counter++; int dim_number = 1; pIIR_Type actual_type = actual->subtype; if (actual_type->is(VAUL_SUBARRAY_TYPE)) { // If the aggreate is a multi-dimensional array then a node // VAUL_SubarrayType is used to describe the (sub)type of // the sub-aggregate. Determine the index associated with // the array aggregate. Note that we can only count how many // dimensions are left from where the aggregate starts. int current_dim_counter = 0; for (pIIR_TypeList tl = pVAUL_SubarrayType(actual_type)->index_types; tl; tl = tl->rest) current_dim_counter++; // Now, determine the index number of the aggregate dim_number = dim_counter - current_dim_counter + 1; } // Next, get index type that belongs to the current dimension. for (int i = 1; i < dim_number; i++) tl = tl->rest; pIIR_Type formal_index_type = tl->first; // Determine bounds from this index type (if they are locally // static) vector formal_range_desc = get_discrete_range(formal_index_type, rstack, IR_NOT_STATIC); StaticRangeDescriptor formal_range = formal_range_desc[0].rangedes_to_lint(rstack); // Get element type of array pIIR_Type element_type = basic_dest_type; if (dim_counter == dim_number) // If the elements of the formal array are associated // individually, then set element_type to the element type of // the formal array. element_type = pIIR_ArrayType(get_base_type(basic_dest_type))->element_type; // Analyze associations. low_index and high_index store the // range values that are connected with the formal. vector low_index, high_index; bool locally_static_range = true; for (pIIR_IndexedAssociationList al = pIIR_ArrayAggregate(actual)->indexed_association_list; al != NULL; al = al->rest) { pIIR_IndexedAssociation a = al->first; if (a->is(IR_SINGLE_INDEXED_ASSOCIATION)) { // A single index of the formal array has been // associated with a value. pIIR_SingleIndexedAssociation ia = pIIR_SingleIndexedAssociation(a); if (valid_folded_value(ia->index)) { const lint index = folded_value(ia->index).long_value(); low_index.push_back(index); high_index.push_back(index); RuntimeCheckFlags rt_checks; error_count += check_scalar_against_bounds(actual, index, formal_index_type, rstack, rt_checks, true, " formal index out of bounds:"); } else locally_static_range = false; if (range_vec.size() < level + 2) range_vec.resize(level + 2); // Decent into the next aggregate level (note that the // aggregate might be multidimensional!) error_count += check_association(a->value, element_type, range_vec, level + 1, rstack); } else if (a->is(IR_RANGE_INDEXED_ASSOCIATION)) { // An entire range of the formal is asscociated with an // actual. The association is of the form "formal(0 to // 3) => value(1 to 4)". The range associated with the // formal will be denoted as "formal association range" // while the range association with the value is named // "actual range". Note that the formal itself might be // also bounded ("formal range"). pIIR_RangeIndexedAssociation ra = pIIR_RangeIndexedAssociation(a); // First, check whether the value of the association is // either an array or slice of an array. bool valid_value_object = is_array_type(a->value->subtype) && a->value->is(IR_OBJECT_REFERENCE); if (!valid_value_object) { codegen_error.error("%:error: actual must be an array object or slice thereof.", a->value); error_count++; } // Determine association range. vector range_desc = get_discrete_range (ra->index_range, rstack, IR_NOT_STATIC); // Try to determine formal association range bounds at // compile time. StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (range.valid[0]) { RuntimeCheckFlags rt_checks; error_count += check_scalar_against_bounds(actual, range.left, formal_index_type, rstack, rt_checks, true, " formal index range out of bounds:"); } if (range.valid[2]) { RuntimeCheckFlags rt_checks; error_count += check_scalar_against_bounds(actual, range.right, formal_index_type, rstack, rt_checks, true, " formal index range out of bounds:"); } // If bounds as well as range direction are locally // static (can be determined at compiler time) then put // them on the low_index and high_index lists. if (and_reduce(range.valid)) { low_index.push_back(range.dir == IR_DIRECTION_UP? range.left : range.right); high_index.push_back(range.dir == IR_DIRECTION_UP? range.right : range.left); // Check whether formal association range matches // actual range. if (valid_value_object) { // Determine length from formal association // range. const lint index_range_length = range_to_length(range.left, range.dir, range.right); // Get length of actual range. vector range_desc_value_object = get_discrete_range(a->value->subtype, rstack, IR_NOT_STATIC); StaticRangeDescriptor value_range = range_desc_value_object[0].rangedes_to_lint(rstack); const lint value_range_length = range_to_length(value_range.left, value_range.dir, value_range.right); // If the actual range length is static then // check whether it matches the length of the // formal association range length. if (value_range_length != index_range_length) { codegen_error.error("%:error: formal association range length (=%i) does not match array object length (=%i).", actual, (int)index_range_length, (int)value_range_length); error_count++; } } } else locally_static_range = false; // If the formal type is not unconstrained then check // whether the range direction given in the formal // association matches the direction of the formal // range. if (range.valid[1] && formal_range.valid[1] && !basic_dest_type->is(IR_ARRAY_TYPE) && range.dir != formal_range.dir) { codegen_error.error("%:error: range direction '%s' in association does not match formal range.", actual, (range.dir == IR_DIRECTION_UP? "to" : "downto")); error_count++; } } else assert(false); } // Finally, after associations at the current level has been // processed, analyze index ranges. First, check whether the // ranges overlap. for (unsigned int i = 0; i < low_index.size() - 1; i++) for (unsigned int j = i + 1; j < low_index.size(); j++) if (!(high_index[i] < low_index[j] || low_index[i] > high_index[j])) { codegen_error.error("%:error: formal ranges '%i %s %i' and '%i %s %i' overlap.", actual, (formal_range.dir == IR_DIRECTION_UP? low_index[i] : high_index[i]), (formal_range.dir == IR_DIRECTION_UP? "to" : "downto"), (formal_range.dir == IR_DIRECTION_UP? high_index[i] : low_index[i]), (formal_range.dir == IR_DIRECTION_UP? low_index[j] : high_index[j]), (formal_range.dir == IR_DIRECTION_UP? "to" : "downto"), (formal_range.dir == IR_DIRECTION_UP? high_index[j] : low_index[j]) ); error_count++; } // Next, if all ranges are locally static then check out whether // there are any holes in the association ranges. Otherwise, // this must be done at runtime. if (locally_static_range) { sort(low_index.begin(), low_index.end()); sort(high_index.begin(), high_index.end()); for (unsigned int i = 0; i < low_index.size() - 1; i++) if (high_index[i] + 1 < low_index[i + 1]) { codegen_error.error("%:error: formal association index range is incomplete. E.g., index %i is missing.", actual, high_index[i] + 1); error_count++; } } // Check whether we were able to determine bounds from previous // processing of the same level. if (range_vec[level].size() == 0) { if (locally_static_range) { // Store range to range_vec in order to be able to check // other associations at the same level. Note that the // first element always stores the low value! range_vec[level].push_back(low_index.front()); range_vec[level].push_back(formal_range.dir == IR_DIRECTION_UP? 0 : 1); range_vec[level].push_back(high_index.back()); } } else { // Ok, we already found bounds during previous processing of // the same level. Hence, try to match the new bounds // against the old bounds. if (locally_static_range) { // If the current range is locally static, then previous // and current bounds must match exactly. if (low_index.front() != range_vec[level][0]) { codegen_error.error("%:error: range bound mismatch (new low bound %i is not equal to previously determined low bound %i).", actual, low_index.front(), range_vec[level][0]); error_count++; } if (high_index.back() != range_vec[level][2]) { codegen_error.error("%:error: range bound mismatch (new high bound %i is not equal to previously determined high bound %i).", actual, high_index.back(), range_vec[level][2]); error_count++; } } else { // If the current bounds are not static then we can only // check wether the values we found are within the // previously found bounds. if (low_index.front() < range_vec[level][0]) { codegen_error.error("%:error: range bound mismatch (new low bound %i is less than previously determined low bound %i).", actual, low_index.front(), range_vec[level][0]); error_count++; } if (high_index.back() > range_vec[level][2]) { codegen_error.error("%:error: range bound mismatch (new high bound %i is larger than previously determined high bound %i).", actual, high_index.back(), range_vec[level][2]); error_count++; } } } } else if (actual->is(IR_ARTIFICIAL_RECORD_AGGREGATE)) { // If map is actually a record aggregate then the formal has // been associated individually. Hence, decent into the // aggregate expression and find all signal associations. for (pIIR_ElementAssociationList el = pIIR_RecordAggregate(actual)->element_association_list; el != NULL; el = el->rest) { pIIR_ElementAssociation e = el->first; // Each association is handled separately, Hence, create an // emty range_vec to be used for checking of the actuals. vector > new_range_vec(1); error_count += check_association(e->value, e->element->subtype, new_range_vec, 0, rstack); } } else { // The formal is associated with an expression RuntimeCheckFlags runtime_checks; if (check_for_target_type(actual, formal_type, actual, rstack, runtime_checks, false) != 0) { codegen_error.error("%:error: illegal association.", actual); error_count++; } } return error_count; } int m_explore_and_check(pIIR_AssociationElement ae, RegionStack &rstack, bool collect_access_info) { if (done(ae) & EXPLORED) return 0; else done(ae) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (!ae->is(IR_ASSOCIATION_ELEMENT_OPEN)) error_count += explore_and_check(ae->actual->subtype, rstack, collect_access_info); if (collect_access_info) { get_context(ae->actual, ctxt, rstack, false, 0); get_context(ae->formal, ctxt, rstack, false, 0); } error_count += constant_fold(ae->actual, rstack); error_count += constant_fold(ae->formal, rstack); vector > actual_range_vec(1); error_count += check_association(ae->actual, ae->formal->subtype, actual_range_vec, 0, rstack); vector > formal_range_vec(1); error_count += check_association(ae->formal, ae->formal->subtype, formal_range_vec, 0, rstack); return error_count; } // Converts an acl_list into a vector of range descriptors. vector > get_static_ranges(list > &acl_list, RegionStack &rstack) { vector > result; for (list >::iterator iter = acl_list.begin (); iter != acl_list.end (); iter++) { const bool emit_directly = iter->first == NULL; pIIR_Root ex = iter->second; if (!emit_directly && ex->is(IR_RECORD_REFERENCE)) { // if the prefix is static then determine the declaration number // of the record element (the first element is associated with // number 0, the next element is associated with 1, ...) int record_elem_num = pIIR_RecordReference(ex)->element->declaration_pos; result.push_back (StaticRangeDescriptor ((lint)record_elem_num, IR_DIRECTION_UP, (lint)record_elem_num)); } else if (!emit_directly && ex->is(IR_EXPLICIT_RANGE)) { // Determine range vector range_desc = get_discrete_range (pIIR_ExplicitRange(ex), rstack, IR_NOT_STATIC); // Convert to integer lints StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); result.push_back (range); } else { pIIR_Expression expr = pIIR_Expression (ex); if (valid_folded_value (expr)) result.push_back (StaticRangeDescriptor (folded_value (expr).long_value (), IR_DIRECTION_UP, folded_value (expr).long_value ())); else result.push_back (StaticRangeDescriptor (0, IR_DIRECTION_UP, -1)); } } return result; } int check_association(pIIR_AssociationList assoc_list, list &assoc, pIIR_InterfaceDeclaration decl, RegionStack &rstack) { int error_count = 0; // association_range_vector holds for each association in assoc_list // the corresponding ranges extracted from the formal // designator. I.e., it stores the acl values (after converting to // static values -- if possible). vector > > association_range_vectors; // association_type_vectors [i] stores the appropriate type vectors // that corespond with addociation_range_vectors. E.g., in case of // a formal designator "f(3,2)(1 to 4)" (type = array(0 to 3, 0 to // 5) of bit_vector (0 to 7))the association range vector is "(3 to // 3), (2 to 2), (1 to 4)". The corresponding // association_type_vectors also contains 3 elements, where the // first pair (element) references the first index of the // 2-dimensional array type, the second pair references the second // index of the 2-dimensional array type, and the last pair is the // index type of the element array (bit_vector (0 to 7)). vector > > association_type_vectors; for (list::iterator iter = assoc.begin(); iter != assoc.end(); iter++) { pIIR_AssociationElement assoc_element = *iter; // First, test whether formal designator and actual designator // type match. E.g., "f(3) => a(2)" associates the third element // of formal f with second element of actual a. Hence, type of // f(3) and a(2) must match. RuntimeCheckFlags runtime_checks; // Hack if (!assoc_element->actual->is (IR_OPEN_EXPRESSION)) error_count += check_for_target_type(assoc_element, assoc_element->formal->subtype, assoc_element->actual, rstack, runtime_checks, true, " illegal association of formal '" + convert_string(decl->declarator->text.to_chars(), tolower) + "':"); // Next, collect range information to analyze association for a // specific formal. Note that this is an somehow complex // process, as all association for a specific formal must be // collected (e.g., "f(3) => a(2), f(4) => x, ..."). list > formal_acl_list; get_acl(assoc_element->formal, formal_acl_list, rstack, IR_NOT_STATIC, true); if (formal_acl_list.size () == 0 && assoc.size () > 1) { codegen_error.error("%:error: formal '%n' may not be associated individually and also associated as a whole.", assoc_list, decl); error_count++; } association_range_vectors.push_back (get_static_ranges (formal_acl_list, rstack)); association_type_vectors.push_back (get_types (formal_acl_list, decl->subtype)); vector > &rvec = association_range_vectors.back (); //for (vector >::iterator it = rvec.begin (); // it != rvec.end (); // it++) //cout << "(" << (int)it->left << (it->dir == IR_DIRECTION_UP? " to " : " downto ") << (int)it->right << ") "; //cout << endl; } // Next, analyze the formal designator ranges. Build a map from the // ranges. For each designator add a set of entries starting by // using the first n elements of the range as key (n=0,1,2,...) and // storing element n + 1 as value. I.e., an formal designator that // consists of 3 range elements will add 3 entries to the map: // (key = nil, value = element [0]), // (key = element [0], value = element [1]), // (key = element [0] & element [1], value = element [2]), // (key = element [0] & element [1] & element [2], value = element [3]). typedef map >, list > > association_map_t; association_map_t association_map; // association_type_map associates each entry in association_map // with a corresponding type vector. This map is used to obtain the // appropriate type definitions. map > >::iterator > association_type_map; // Map used to store only key that define a complete acl. This map // is used to check for double individual assoication. vector complete_associations; for (unsigned int i = 0; i < association_range_vectors.size (); i++) { vector > &range_vector = association_range_vectors [i]; if (range_vector.size () == 0) continue; // Create a key from each sequence starting from the first // vector element and ending at some element. The following // element is added to the list which is associated with the // key. association_map_t::key_type key; for (unsigned int j = 0; j < range_vector.size (); j++) { // Add entries association_map [key].push_back (range_vector [j]); // XXX - why is the cast needed? association_type_map [key] = (vector > >::iterator) &association_type_vectors [i]; // Generate a new key key.push_back (range_vector [j]); } // Add entry to list of complete acl vectors. complete_associations.push_back (key); } // The value of the association_map is rebuild so that it only // contains no or a single list entry. The various list elements are // compacted to form a single entry representing an appropriate // range. for (association_map_t::iterator map_iter = association_map.begin (); map_iter != association_map.end (); map_iter++) { // Next, sort ranges in increasing order of start index list > &range_list = map_iter->second; if (range_list.size () == 0) continue; // Get appropriate type vector vector > &type_vector = *association_type_map [map_iter->first]; // Check whether all ranges are locally static (i.e., whether // ranges could be determined at compile time) bool globally_static_ranges = true; for (list >::iterator iter = range_list.begin (); iter != range_list.end () && globally_static_ranges; iter++) globally_static_ranges = globally_static_ranges && and_reduce(iter->valid); // Sort ranges range_list.sort (StaticRangeDescriptor_lint_Less ()); bool unassociated_elements_reported = false; // Check for missing elements (gaps) as well as overlapping // ranges if (globally_static_ranges) { int index = max (range_list.front ().left, range_list.front ().right) + 1; for (list >::iterator prev_range_iter = range_list.begin (), range_iter = ++ range_list.begin (); range_iter != range_list.end (); prev_range_iter = range_iter, range_iter++) { // Iterate through ranges in increasing range order // (i.e., the range that includes the smallest index is // analyzed first). if (! and_reduce (range_iter->valid)) continue; int next_index = min (range_iter->left, range_iter->right); if (index != next_index) if (index > next_index) { // Finally, check out whether at least one of // these range vectors is a complete individual // association. association_map_t::key_type prev_complete_range_vec = map_iter->first; association_map_t::key_type complete_range_vec = map_iter->first; prev_complete_range_vec.push_back (*prev_range_iter); complete_range_vec.push_back (*range_iter); if (find (complete_associations.begin (), complete_associations.end (), prev_complete_range_vec) != complete_associations.end () || find (complete_associations.begin (), complete_associations.end (), complete_range_vec) != complete_associations.end ()) { // Ranges overlap. Generate error message. vector > error_acl = map_iter->first; error_acl.push_back (StaticRangeDescriptor (next_index, IR_DIRECTION_UP, next_index)); codegen_error.error("%:error: element(s) of composite formal '%n' is (are) associated more than once. " "E.g., element %s is covered multiple times.", assoc_list, decl, sprint_object_reference (decl, error_acl, rstack).c_str ()); error_count ++; } } else { // There is a gap in the ranges. Note that gaps // are only searched if all ranges are globally // static (i.e., could be determined at compile // time). However, report only one gap (to prevent // flooding the screen with error messages). if (! unassociated_elements_reported) { vector > error_acl = map_iter->first; error_acl.push_back (StaticRangeDescriptor (index, IR_DIRECTION_UP, index)); codegen_error.error("%:error: not all elements of composite formal '%n' are associated. " "E.g., element %s is un-associated.", assoc_list, decl, sprint_object_reference (decl, error_acl, rstack).c_str ()); unassociated_elements_reported = true; } error_count ++; } index = max (range_iter->left, range_iter->right) + 1; } } // Replace list with a single entry that represents the entire // range. If the list does not contain an element, then the // entire formal (or part thereof) is associated. StaticRangeDescriptor composed_range (range_list.front ().left, range_list.front ().dir, range_list.back ().right); range_list.clear (); range_list.push_back (composed_range); // Skip range checks if ranges are not locally static if (!globally_static_ranges) continue; // Finally, check out whether index ranges are within bounds if // ranges could be determined at compile time. vector > &type_pair_vector = *association_type_map [map_iter->first]; pair &type_pair = type_pair_vector [map_iter->first.size ()]; if (type_pair.first->is (IR_ARRAY_SUBTYPE)) { // Target type is a constrained array. Hence, formal index // range must match exactly! First, get target range. vector target_range_desc = get_discrete_range(type_pair.second, rstack, IR_NOT_STATIC); StaticRangeDescriptor target_range = target_range_desc [0].rangedes_to_lint(rstack); // If target range can be determined at compile time, then // compare number of elements of actual and formal. If // length is not equal then output error message. if (and_reduce (target_range.valid) && lint_abs (composed_range.left - composed_range.right) != lint_abs (target_range.left - target_range.right) && !unassociated_elements_reported) { const lint offending_index = min (target_range.left, target_range.right) != min (composed_range.left, composed_range.right) ? target_range.left : target_range.right; vector > error_acl = map_iter->first; error_acl.push_back (StaticRangeDescriptor (offending_index, IR_DIRECTION_UP, offending_index)); codegen_error.error("%:error: not all elements of composite formal '%n' are associated. " "E.g., element %s is un-associated.", assoc_list, decl, sprint_object_reference (decl, error_acl, rstack).c_str ()); unassociated_elements_reported = true; error_count ++; } } else if (type_pair.first->is (IR_RECORD_TYPE)) { // Formal is a record. Make sure that all record elements // are associated. pIIR_RecordType record_type = pIIR_RecordType (type_pair.first); const int record_element_count = list_size (record_type->element_declarations); if (range_to_length (composed_range.left, composed_range.dir, composed_range.right ) != record_element_count) { // Generate error message. To print the error message, // the name for the mising element is generated. const int missing_index = composed_range.left != 0? 0 : record_element_count - 1; vector > error_acl = map_iter->first; error_acl.push_back (StaticRangeDescriptor (missing_index, IR_DIRECTION_UP, missing_index)); codegen_error.error("%:error: not all elements of composite formal '%n' are associated. " "E.g., element %s is un-associated.", assoc_list, decl, sprint_object_reference (decl, error_acl, rstack).c_str ()); error_count ++; } } } return error_count; } int check_associations(pIIR_AssociationList assoc_list, pIIR_InterfaceList interface_list, RegionStack &rstack) { int error_count = 0; // Analyze the interface declaration of the corresponding entity, // subprogram, ... for (pIIR_InterfaceList il = interface_list; il; il = il->rest) { // Build a list of association elements that belong to the same // formal interface object pIIR_InterfaceDeclaration decl = il->first; list formal_assoc; for (pIIR_AssociationList al = assoc_list; al; al = al->rest) if (al->first->formal_declaration == decl) formal_assoc.push_back(al->first); // Finally, check associations assocaited with a formal error_count += check_association(assoc_list, formal_assoc, decl, rstack); } return error_count; } int m_explore_and_check(pIIR_ComponentInstantiationStatement cs, RegionStack &rstack, bool collect_access_info) { if (done(cs) & EXPLORED) return 0; else done(cs) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; // ************************************************************ // Process generic parameter // ************************************************************ for (pIIR_AssociationList al = cs->binding->generic_map_list; al; al = al->rest) { pIIR_AssociationElement ae = al->first; if (!ae->is(IR_ASSOCIATION_ELEMENT_OPEN)) error_count += explore_and_check(ae->actual->subtype, rstack, collect_access_info); if (collect_access_info) { get_context(ae->actual, ctxt, rstack, false, 0); get_context(ae->formal, ctxt, rstack, false, 0); } error_count += constant_fold(ae->actual, rstack); error_count += check_expression(ae->actual, rstack); error_count += constant_fold(ae->formal, rstack); error_count += check_expression(ae->formal, rstack); } // Check whether all generic parameters without default value are // associated and check default value if it is used. pIIR_InterfaceList generic_clause = NULL; pIIR_InterfaceList port_clause = NULL; if (cs->binding->unit->is(IR_ARCHITECTURE_REF)) { // An architecture is directly instantiated. Hence, get the port // and generic clause of the corresponding entity declaration. pIIR_EntityDeclaration entity_decl = pIIR_ArchitectureRef(cs->binding->unit)->entity; generic_clause = entity_decl->generic_clause; port_clause = entity_decl->port_clause; } else if (cs->binding->unit->is(IR_COMPONENT_DECLARATION)) { // A *component* is instantiated. Hence, get port and generic // clause of the component declaration. generic_clause = pIIR_ComponentDeclaration(cs->binding->unit)->local_generic_clause; port_clause = pIIR_ComponentDeclaration(cs->binding->unit)->local_port_clause; } for (pIIR_InterfaceList il = generic_clause; il; il = il->rest) { pIIR_InterfaceDeclaration formal = il->first; // Find actual associated with a formal list ae_list = find_matching_actuals(cs->binding->generic_map_list, il->first); if (ae_list.size() == 0 && formal->initial_value == NULL) codegen_error.error("%:error: generic parameter '%n' is left open but has no default value.", cs, formal); } error_count += check_associations (cs->binding->generic_map_list, generic_clause, rstack); // ************************************************************ // Process port maps // ************************************************************ for (pIIR_AssociationList al = cs->binding->port_map_list; al; al = al->rest) { pIIR_AssociationElement ae = al->first; if (!ae->is(IR_ASSOCIATION_ELEMENT_OPEN)) error_count += explore_and_check(ae->actual->subtype, rstack, collect_access_info); if (collect_access_info) { get_context(ae->actual, ctxt, rstack, false, 0); get_context(ae->formal, ctxt, rstack, false, 0); } error_count += constant_fold(ae->actual, rstack); error_count += check_expression(ae->actual, rstack); error_count += constant_fold(ae->formal, rstack); error_count += check_expression(ae->formal, rstack); } //for (pIIR_AssociationList al = cs->binding->port_map_list; // al; al = al->rest) //error_count += explore_and_check(al->first, rstack, collect_access_info); error_count += check_associations (cs->binding->port_map_list, port_clause, rstack); #if 0 if (cs->binding->unit->is(IR_COMPONENT_DECLARATION)) { //**************************************************************************** // Component shall be instantiated //**************************************************************************** pIIR_BindingIndication config = cs->configuration; if (config == NULL || !config->unit->is(IR_ENTITY_DECLARATION)) { codegen_error.error("%:error: only component instantiation via default component binding are supported yet." " However, there is no appropriate entity declaration visible at this point in the file!", cs); error_count++; } } #endif return error_count; } int m_explore_and_check(pIIR_ReturnStatement r, RegionStack &rstack, bool collect_access_info) { if (done(r) & EXPLORED) return 0; else done(r) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (r->return_expression != NULL) { error_count += explore_and_check(r->return_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(r->return_expression, ctxt, rstack, false, 0); error_count += constant_fold(r->return_expression, rstack); error_count += check_expression(r->return_expression, rstack); // Check return value. If the value could be determined at compile // time then try to check the value against the return type. if (valid_folded_value(r->return_expression) && is_scalar_type(r->return_expression->subtype)) error_count += check_scalar_against_bounds(r, get_folded_value(r->return_expression), pIIR_FunctionDeclaration(r->enclosing_subprogram)->return_type, rstack, runtime_checks(r->return_expression), true, " illegal return value:"); } return error_count; } int m_explore_and_check(pIIR_AssertionStatement as, RegionStack &rstack, bool collect_access_info) { if (done(as) & EXPLORED) return 0; else done(as) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (as->assertion_condition != NULL) { error_count += explore_and_check(as->assertion_condition->subtype, rstack, collect_access_info); if (collect_access_info) get_context(as->assertion_condition, ctxt, rstack, false, 0); error_count += constant_fold(as->assertion_condition, rstack); error_count += check_expression(as->assertion_condition, rstack); } if (as->report_expression != NULL) { error_count += explore_and_check(as->report_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(as->report_expression, ctxt, rstack, false, 0); error_count += constant_fold(as->report_expression, rstack); error_count += check_expression(as->report_expression, rstack); } if (as->severity_expression != NULL) { error_count += explore_and_check(as->severity_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(as->severity_expression, ctxt, rstack, false, 0); error_count += constant_fold(as->severity_expression, rstack); error_count += check_expression(as->severity_expression, rstack); } return error_count; } int m_explore_and_check(pIIR_ReportStatement rs, RegionStack &rstack, bool collect_access_info) { if (done(rs) & EXPLORED) return 0; else done(rs) |= EXPLORED; ContextInfo &ctxt = *ActiveContext(rstack); int error_count = 0; if (rs->report_expression != NULL) { error_count += explore_and_check(rs->report_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(rs->report_expression, ctxt, rstack, false, 0); error_count += constant_fold(rs->report_expression, rstack); error_count += check_expression(rs->report_expression, rstack); } if (rs->severity_expression != NULL) { error_count += explore_and_check(rs->severity_expression->subtype, rstack, collect_access_info); if (collect_access_info) get_context(rs->severity_expression, ctxt, rstack, false, 0); error_count += constant_fold(rs->severity_expression, rstack); error_count += check_expression(rs->severity_expression, rstack); } return error_count; } int m_explore_and_check(pIIR_ProcedureCallStatement pc, RegionStack &rstack, bool collect_access_info) { if (done(pc) & EXPLORED) return 0; else done(pc) |= EXPLORED; int error_count = 0; ContextInfo &ctxt = *ActiveContext(rstack); // Analyze procedure declaration error_count += explore_and_check(pc->procedure, rstack, false); for (pIIR_InterfaceList il = pc->procedure->interface_declarations; il; il = il->rest) { pIIR_InterfaceDeclaration idecl = il->first; // Find actual that corresponds to formal list a_list = find_matching_actuals(pc->actual_parameter_part, il->first); if (a_list.size() > 1) { codegen_error.error("%:error: sorry, individual associations are currently not supported for subprograms", pc); error_count++; } pIIR_AssociationElement a = a_list.size() == 0? NULL : a_list.front(); // check whether the corresponding actual is left open if (a != NULL && a->actual != NULL && !a->actual->is(IR_OPEN_EXPRESSION)) { // The parameter was NOT left open... // if the mode is INOUT, OUT or BUFFER then the actual is written if (collect_access_info && (idecl->mode == IR_INOUT_MODE || idecl->mode == IR_OUT_MODE || idecl->mode == IR_BUFFER_MODE)) get_context(a->actual, ctxt, rstack, true /* = true, because the actual is a target */, 0); // if the mode is IN or BUFFER then the actual is read if (collect_access_info && (idecl->mode == IR_INOUT_MODE || idecl->mode == IR_BUFFER_MODE)) get_context(a->actual, ctxt, rstack, false, 0); // We assume that attributes are used for signal parameters if (collect_access_info && a->formal_declaration->is(IR_SIGNAL_INTERFACE_DECLARATION) && (idecl->mode == IR_IN_MODE || idecl->mode == IR_INOUT_MODE || idecl->mode == IR_BUFFER_MODE)) { // Collect signals included in the atual expression ContextInfo tmp_ctxt; get_context(a->actual, tmp_ctxt, rstack, false, 0); // Filter signal declarations list sig_list = filter_unique(tmp_ctxt.accessed_objects, ACCESS, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); // Copy access descriptors into current context for (list::iterator it = sig_list.begin(); it != sig_list.end(); it++) { // Only signal primaries are considered if ((*it).level != 0) continue; (*it).access_type |= SIGNAL_FUNCTION_ATTRIBUTE; ctxt.accessed_objects.push_back(*it); } } // fold and check actual expression error_count += explore_and_check(a->actual->subtype, rstack, collect_access_info); if (collect_access_info) get_context(a->actual, ctxt, rstack, false, 0); error_count += constant_fold(a->actual, rstack); error_count += check_expression(a->actual, rstack); } else // the parameter is left open. Hence, the default value will be used instead. // Explore and check default value if present. if (idecl->initial_value != NULL) { error_count += explore_and_check(idecl->initial_value->subtype, rstack, collect_access_info); if (collect_access_info) get_context(idecl->initial_value, ctxt, rstack, false, 0); error_count += constant_fold(idecl->initial_value, rstack); error_count += check_expression(idecl->initial_value, rstack); } } // Merge accessed object list of the current procedure into the // accessed object list of the base region (e.g. procedure, function // or proccess) if (&ctxt != &context (pc->procedure)) merge_accessed_objects_lists(ctxt.accessed_objects, ActiveDeclarativeRegion(rstack), context(pc->procedure).accessed_objects); // If the procedure contains wait statements then add the procedure // call to the list of waits within the current context. if (has_wait (pc->procedure) || has_wait_for (pc->procedure)) ctxt.wait_statements.push_back (pc); // If the base region this procedure was called from is a procedure // or a process then merge has_wait_for and has_wait flags pIIR_DeclarativeRegion base_region = BaseDeclarativeRegion(rstack); if (base_region->is(IR_PROCEDURE_DECLARATION)) { has_wait_for (pIIR_ProcedureDeclaration(base_region)) |= has_wait_for (pc->procedure); has_wait (pIIR_ProcedureDeclaration(base_region)) |= has_wait (pc->procedure); } else if (base_region->is(IR_PROCESS_STATEMENT)) { has_wait_for (pIIR_ProcessStatement(base_region)) |= has_wait_for (pc->procedure); has_wait (pIIR_ProcessStatement(base_region)) |= has_wait (pc->procedure); } // Store information about the procedure call into the access // descriptor list if (collect_access_info) ctxt.accessed_objects.push_back(AccessDescriptor(pc->procedure, PROCEDURE_CALL, 0)); return error_count; } int m_explore_and_check(pIIR_ConcurrentGenerateIfStatement gs, RegionStack &rstack, bool collect_access_info) { if (done(gs) & EXPLORED) return 0; else done(gs) |= EXPLORED; rstack.push(gs); int error_count = 0; ContextInfo &ctxt = *ActiveContext(rstack); if (gs->declarations != NULL) { extended_declarations(gs) = build_extended_declaration_list(gs->declarations, rstack); error_count += explore_and_check(extended_declarations(gs), rstack, collect_access_info); } error_count += constant_fold(gs->condition, rstack); error_count += check_expression(gs->condition, rstack); if (gs->concurrent_statement_part != NULL) error_count += explore_and_check(gs->concurrent_statement_part, rstack, collect_access_info); rstack.pop(); return error_count; } int m_explore_and_check(pIIR_ConcurrentGenerateForStatement gs, RegionStack &rstack, bool collect_access_info) { if (done(gs) & EXPLORED) return 0; else done(gs) |= EXPLORED; rstack.push(gs); int error_count = 0; ContextInfo &ctxt = *ActiveContext(rstack); if (gs->declarations != NULL) { extended_declarations(gs) = build_extended_declaration_list(gs->declarations, rstack); error_count += explore_and_check(extended_declarations(gs), rstack, collect_access_info); } error_count += explore_and_check(gs->generate_parameter_specification->subtype, rstack, collect_access_info); static_declarative_region (gs->generate_parameter_specification) = ActiveDeclarativeRegion (rstack); if (gs->concurrent_statement_part != NULL) error_count += explore_and_check(gs->concurrent_statement_part, rstack, collect_access_info); rstack.pop(); return error_count; } // ****************************************************************************************** // Name: m_get_context, generic function // // Description: Analyzes statements and collects all abjects which are // accessed. The information about the accessed objects are stored in // a ContextInfo instance. A ContextInfo instance stores four // different kinds of information sets: // // 1. accessed_objects = all objects // which are accessed (read, written, sensitive). // // 2. wait_statements = pointer to the wait statements included in the // current context // // 3. signal_assignment_statements = list of pointers to all signal // assignment statements included in the current context // // 4. internal_vars = internal objects required by the generated code // // Parameter: ctxt = context info instance // target = is true if the expression is target of an assignment // level = level the object is located at. The entire statement // is assigned level 0. The level is increased each time an object is // included in an argument to a subroutine or an index value of an // array reference. // // Return value: returns a pointer to the corresponding access // descriptor if an expression is analyzed. Otherwise, NULL is // returned. // // ****************************************************************************************** pAccessDescriptor m_get_context(pIIR_AttrTypeFunc a, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(a->prefix, ctxt, rstack, false, level); if (a->argument != NULL) get_context(a->argument, ctxt, rstack, false, level + 1); return p; } pAccessDescriptor m_get_context(pIIR_AttrTypeValue a, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(a->prefix, ctxt, rstack, false, level); if (a->argument != NULL) get_context(a->argument, ctxt, rstack, false, level + 1); return p; } pAccessDescriptor m_get_context(pIIR_AttrArrayFunc a, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = NULL; if (a->array != NULL) p = get_context(a->array, ctxt, rstack, false, level); else if (a->array_type != NULL) p = get_context(a->array_type, ctxt, rstack, false, level); return p; } pAccessDescriptor m_get_context(pIIR_AttrSigFunc aev, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(aev->signal, ctxt, rstack, false, level + 1); // Store that an attribute of the signal has been used p->access_type |= SIGNAL_FUNCTION_ATTRIBUTE; return p; } pAccessDescriptor m_get_context (pIIR_Type t, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { ctxt.accessed_objects.push_back(AccessDescriptor(get_declaration(t), TYPE_USED)); return NULL; } pAccessDescriptor m_get_context(pIIR_QualifiedExpression e, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(e->expression, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_FunctionCall fc, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { // Store information about the function call into the access // descriptor list ctxt.accessed_objects.push_back(AccessDescriptor(fc->function, fc, FUNCTION_CALL, level)); pAccessDescriptor p = &ctxt.accessed_objects.back (); // Get context of function parameters for (pIIR_InterfaceList il = fc->function->interface_declarations; il; il = il->rest) { // Find actual that corresponds to formal list a_list = find_matching_actuals(fc->parameter_association_list, il->first); for (list::iterator iter = a_list.begin(); iter != a_list.end(); iter++) { pIIR_AssociationElement a = *iter; // Continue if the parameter was NOT left open... if (a == NULL || a->actual->is(IR_OPEN_EXPRESSION)) continue; get_context(a->actual, ctxt, rstack, false, level + 1); pIIR_InterfaceDeclaration idecl = il->first; // We assume that attributes are used for signal parameters if (a->formal_declaration->is(IR_SIGNAL_INTERFACE_DECLARATION) && (idecl->mode == IR_IN_MODE || idecl->mode == IR_INOUT_MODE || idecl->mode == IR_BUFFER_MODE)) { // Collect signals included in the atual expression ContextInfo tmp_ctxt; get_context(a->actual, tmp_ctxt, rstack, false, 0); // Filter signal declarations list sig_list = filter_unique(tmp_ctxt.accessed_objects, ACCESS, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); // Copy access descriptors into current context for (list::iterator it = sig_list.begin(); it != sig_list.end(); it++) { // Only signal primaries are considered if ((*it).level != 0) continue; (*it).access_type |= SIGNAL_FUNCTION_ATTRIBUTE; ctxt.accessed_objects.push_back(*it); } } } } // Merge accessed object list of the current function into the // accessed object list of the base region (e.g. procedure, function // or proccess) if (&ctxt != &context (fc->function)) merge_accessed_objects_lists(ctxt.accessed_objects, ActiveDeclarativeRegion(rstack), context(fc->function).accessed_objects); return p; } pAccessDescriptor m_get_context(pIIR_SimpleReference sr, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { if (sr->object->is(IR_SIGNAL_DECLARATION) || sr->object->is(IR_SIGNAL_INTERFACE_DECLARATION) || sr->object->is(IR_VARIABLE_DECLARATION) || sr->object->is(IR_VARIABLE_INTERFACE_DECLARATION) || sr->object->is(IR_CONSTANT_DECLARATION) || sr->object->is(IR_CONSTANT_INTERFACE_DECLARATION) || sr->object->is(IR_FILE_DECLARATION) || sr->object->is(IR_FILE_INTERFACE_DECLARATION) || sr->object->is(IR_ACCESS_REFERENCE)) { ctxt.accessed_objects.push_back(AccessDescriptor(sr->object, sr, target? WRITE : READ, level)); return &ctxt.accessed_objects.back(); } else return NULL; } pAccessDescriptor m_get_context(pIIR_AccessReference ar, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { if (ar != NULL) return get_context (ar->access, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_ArrayReference ar, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(ar->array, ctxt, rstack, target, level); p->access_expr = ar; for (pIIR_ExpressionList el = ar->indices; el; el = el->rest) get_context(el->first, ctxt, rstack, false, level + 1); return p; } pAccessDescriptor m_get_context(pIIR_ArrayRange ar, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = NULL; if (ar->array != NULL) p = get_context(ar->array, ctxt, rstack, false, level); if (ar->index != NULL) get_context(ar->index, ctxt, rstack, false, level + 1); return p; } pAccessDescriptor m_get_context(pIIR_ExplicitRange er, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(er->left, ctxt, rstack, false, level); get_context(er->right, ctxt, rstack, false, level); return NULL; } pAccessDescriptor m_get_context(pIIR_OthersIndexedAssociation ia, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(ia->value, ctxt, rstack, false, level); return NULL; } pAccessDescriptor m_get_context(pIIR_RangeIndexedAssociation ia, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(ia->index_range, ctxt, rstack, false, level); get_context(ia->value, ctxt, rstack, false, level); return NULL; } pAccessDescriptor m_get_context(pIIR_SingleIndexedAssociation ia, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { if (ia->index != NULL) get_context(ia->index, ctxt, rstack, false, level); get_context(ia->value, ctxt, rstack, false, level); return NULL; } pAccessDescriptor m_get_context(pIIR_SliceReference sr, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(sr->array, ctxt, rstack, target, level); p->access_expr = sr; get_context(sr->range, ctxt, rstack, false, level + 1); return p; } pAccessDescriptor m_get_context(pIIR_RecordReference rr, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { pAccessDescriptor p = get_context(rr->record, ctxt, rstack, target, level); p->access_expr = rr; return p; } pAccessDescriptor m_get_context(pIIR_Expression e, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { return NULL; } pAccessDescriptor m_get_context(pIIR_Allocator a, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(a->subtype, ctxt, rstack, false, level); get_context(pIIR_AccessType(a->type_mark)->designated_type, ctxt, rstack, false, level + 1); if (a->value) get_context(a->value, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_ExpressionList el, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { for ( ; el; el = el->rest) get_context(el->first, ctxt, rstack, target, level); return NULL; } pAccessDescriptor m_get_context(pIIR_WaitStatement ws, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { if (ws->condition_clause == NULL && ws->timeout_clause == NULL && ws->sensitivity_list == NULL) { // If there is no condition clause and no timeout clause and no // sensitivity_list then this wait statements shall stop the // process for the rest of the simulation time. Hence, nothing has // to be done now. return NULL; } // Add ws to the list of wait statements of the current context ctxt.wait_statements.push_back(ws); if (ws->sensitivity_list) { // Wait statemen has an explicit sensitivity list for (pIIR_ExpressionList el = ws->sensitivity_list; el; el = el->rest) { ContextInfo tmp_ctxt; get_context(el->first, tmp_ctxt, rstack, false, 0); (*tmp_ctxt.accessed_objects.begin()).access_type = SENSITIVE; ctxt.accessed_objects.push_back(*tmp_ctxt.accessed_objects.begin()); } if (ws->condition_clause) { get_context(ws->condition_clause, ctxt, rstack, false, 0); } } else { // Wait statement does not have an explicit sensitivity // list. Hence, extract one from the wait condition. ContextInfo tmp_ctxt; if (ws->condition_clause != NULL) get_context(ws->condition_clause, tmp_ctxt, rstack, false, 0); for (access_list::iterator i = tmp_ctxt.accessed_objects.begin(); i != tmp_ctxt.accessed_objects.end(); i++) if ((*i).declaration->is(IR_OBJECT_DECLARATION)) { // If the object is a signal then set access_type to // SENSITIVE and READ as the process is sensitive on this // signal. Otherwise set the access_type to READ as a process // can be sensitive on signals only. AccessFlags access_type = ((*i).declaration->is(IR_SIGNAL_DECLARATION) || (*i).declaration->is(IR_SIGNAL_INTERFACE_DECLARATION))? (SENSITIVE | READ) : READ; ctxt.accessed_objects.push_back(AccessDescriptor(pIIR_ObjectDeclaration((*i).declaration), (*i).access_expr, access_type)); } else // Add remaining access descriptors to access list. ctxt.accessed_objects.push_back((*i)); } // Explore timeout expression if (ws->timeout_clause) { get_context(ws->timeout_clause, ctxt, rstack, false, 0); } return NULL; } pAccessDescriptor m_get_context(pIIR_ArrayAggregate aa, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { // First, determine context of asscociations for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) get_context(al->first, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_ElementAssociation ea, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(ea->value, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_RecordAggregate ra, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { // First, determine context of asscociations for (pIIR_ElementAssociationList al = ra->element_association_list; al; al = al->rest) get_context(al->first, ctxt, rstack, false, level + 1); return NULL; } pAccessDescriptor m_get_context(pIIR_TypeConversion tc, ContextInfo &ctxt, RegionStack &rstack, bool target, int level) { get_context(tc->expression, ctxt, rstack, false, level + 1); return NULL; } // ****************************************************************************************** // Name: m_check_expression , generic function // // Description: checks whether expression is valid and contains no // errors. Any errors found are reportet. Parameter rstack is a // reference to the current regions stack // // Return value: returns number of errors which were found in the expression // // ****************************************************************************************** int m_check_expression(pIIR_AttrSigFunc ase, RegionStack &rstack) { int error_count = check_expression(ase->signal, rstack); static_declarative_region(ase) = NULL; return error_count; } int m_check_expression(pIIR_FunctionCall fc, RegionStack &rstack) { int error_count = 0; // Analyze function declaration error_count += explore_and_check(fc->function, rstack, false); list rlist; for (pIIR_AssociationList al = fc->parameter_association_list; al; al = al->rest) { error_count += check_expression(al->first->actual, rstack); // Store static declarative region of actuals rlist.push_back(static_declarative_region(al->first->actual)); } // Check function type switch (get_operator_type(fc->function)) { case NO_OP: // We set the function result to be not static in case of a normal // function rlist.push_back(ActiveDeclarativeRegion(rstack)); break; default: // In case of a operator set the static declarative region to the // global region rlist.push_back(RootDeclarativeRegion(rstack)); break; } // Determine combined declarative region static_declarative_region(fc) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression(pIIR_SimpleReference sr, RegionStack &rstack) { pIIR_ObjectDeclaration decl = sr->object; // Determine static declarative region is simple reference if (decl->is(IR_CONSTANT_DECLARATION)) { if (valid_folded_value(sr)) static_declarative_region(sr) = RootDeclarativeRegion(rstack); else if (pIIR_ConstantDeclaration(decl)->initial_value != NULL) static_declarative_region(sr) = static_declarative_region(pIIR_ConstantDeclaration(decl)->initial_value); else static_declarative_region(sr) = RootDeclarativeRegion(rstack); } else if (decl->is(IR_CONSTANT_INTERFACE_DECLARATION)) { static_declarative_region(sr) = static_declarative_region(decl); } else static_declarative_region(sr) = NULL; return 0; } int m_check_expression(pIIR_AccessReference ar, RegionStack &rstack) { int error_count = check_expression(ar->access, rstack); return error_count; } int m_check_expression(pIIR_ArrayReference ar, RegionStack &rstack) { int error_count = check_expression(ar->array, rstack); list rlist; rlist.push_back(static_declarative_region(ar->array)); pIIR_Type basic_type = get_basic_type(ar->array->subtype); pIIR_TypeList tl = basic_type->is(IR_ARRAY_TYPE) ? pIIR_ArrayType(basic_type)->index_types : pIIR_ArraySubtype(basic_type)->constraint; for (pIIR_ExpressionList el = ar->indices; el; el = el->rest, tl = tl->rest) { error_count += check_expression(el->first, rstack); rlist.push_back(static_declarative_region(el->first)); // If the index value could be determined then check value against // array bounds if (valid_folded_value(el->first)) error_count += check_scalar_against_bounds(el->first, folded_value(el->first).long_value(), tl->first, rstack, runtime_checks(ar), true); } // Determine combined declarative region static_declarative_region(ar) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression(pIIR_ArrayRange ar, RegionStack &rstack) { int error_count = 0; list rlist; if (ar->array != NULL) { error_count += check_expression(ar->array, rstack); rlist.push_back(static_declarative_region(ar->array)); } if (ar->index != NULL) { error_count += check_expression(ar->index, rstack); rlist.push_back(static_declarative_region(ar->index)); // If the node represents an RANGE or REVERSE_RANGE attribute then // check whether the index value is locally static! if ((ar->is(IR_ATTR_ARRAY_RANGE) || ar->is(IR_ATTR_ARRAY_REVERSE_RANGE)) && ar->index->static_level != IR_LOCALLY_STATIC) { codegen_error.error("%:error: index parameter of attributes RANGE/REVERSE_RANGE must be locally static", ar); error_count++; } } // Determine combined declarative region static_declarative_region(ar) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression(pIIR_ExplicitRange er, RegionStack &rstack) { int error_count = check_expression(er->left, rstack); error_count += check_expression(er->right, rstack); static_declarative_region(er) = get_combined_static_region(static_declarative_region(er->left), static_declarative_region(er->right), rstack); return error_count; } int m_check_expression(pIIR_OthersIndexedAssociation ia, RegionStack &rstack) { int error_count = check_expression(ia->value, rstack); static_declarative_region(ia) = static_declarative_region(ia->value); return error_count; } int m_check_expression(pIIR_RangeIndexedAssociation ia, RegionStack &rstack) { int error_count = check_expression(ia->index_range, rstack); error_count += check_expression(ia->value, rstack); static_declarative_region(ia) = get_combined_static_region(static_declarative_region(ia->index_range), static_declarative_region(ia->value), rstack); return error_count; } int m_check_expression(pIIR_SingleIndexedAssociation ia, RegionStack &rstack) { int error_count = 0; list rlist; if (ia->index != NULL) { error_count = check_expression(ia->index, rstack); rlist.push_back(static_declarative_region(ia->index)); } error_count += check_expression(ia->value, rstack); rlist.push_back(static_declarative_region(ia->value)); static_declarative_region(ia) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression(pIIR_SliceReference sr, RegionStack &rstack) { int error_count = check_expression(sr->array, rstack); error_count += check_expression(sr->range, rstack); static_declarative_region(sr) = get_combined_static_region(static_declarative_region(sr->array), static_declarative_region(sr->range), rstack); return error_count; } int m_check_expression(pIIR_RecordReference rr, RegionStack &rstack) { int error_count = check_expression(rr->record, rstack); static_declarative_region(rr) = static_declarative_region (rr->record); return error_count; } int m_check_expression(pIIR_Expression e, RegionStack &rstack) { static_declarative_region (e) = valid_folded_value (e)? RootDeclarativeRegion (rstack) : NULL; return 0; } int m_check_expression(pIIR_QualifiedExpression e, RegionStack &rstack) { return check_expression(e->expression, rstack); } int m_check_expression(pIIR_ExpressionList el, RegionStack &rstack) { int error_count = 0; list rlist; for (pIIR_ExpressionList elp = el; elp; elp = elp->rest) { error_count += check_expression(elp->first, rstack); rlist.push_back(static_declarative_region(elp->first)); } // Determine combined declarative region static_declarative_region(el) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression (pIIR_RecordAggregate ra, RegionStack &rstack) { int error_count = 0; list rlist; // First, determine context of asscociations for (pIIR_ElementAssociationList al = ra->element_association_list; al; al = al->rest) { error_count += check_expression(al->first->value, rstack); error_count += check_for_target_type(al->first->value, al->first->element->subtype, al->first->value, rstack, runtime_checks(ra), true, " illegal record aggregate:"); rlist.push_back(static_declarative_region(al->first)); } // Determine combined declarative region static_declarative_region(ra) = get_combined_static_region(rlist, rstack); return error_count; } int m_check_expression (pIIR_ArrayAggregate aa, RegionStack &rstack) { int error_count = 0; list rlist; // First, determine context of asscociations for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { error_count += check_expression(al->first, rstack); rlist.push_back(static_declarative_region(al->first)); } // Determine combined declarative region static_declarative_region(aa) = get_combined_static_region(rlist, rstack); // Subtype of aggregate expression. At least the range direction will // be used... int dim_number = 1; pIIR_Type dest_type = aa->subtype; if (dest_type->is(VAUL_SUBARRAY_TYPE)) { // If the aggreate is an multi-dimensional then a node // VAUL_SubarrayType is used to describe the (sub)type of the // sub-aggregate. First, determine dimension of the main array the // aggregate belongs to dest_type = pVAUL_SubarrayType(aa->subtype)->complete_type->declaration->type; int dim_counter = 0; for (pIIR_TypeList tl = pVAUL_SubarrayType(aa->subtype)->complete_type->index_types; tl; tl = tl->rest) dim_counter++; // Next, determine the index associated with the array // aggregate. Note that we can only count how many dimensions are // left from where the aggregate starts. int current_dim_counter = 0; for (pIIR_TypeList tl = pVAUL_SubarrayType(aa->subtype)->index_types; tl; tl = tl->rest) current_dim_counter++; // Now, determine the index number of the aggregate dim_number = dim_counter - current_dim_counter + 1; } else if (dest_type->is(IR_ARRAY_TYPE)) dest_type = aa->subtype->declaration->type; // Get range type of aggregate and determine left bound, right // bound, direction and length of aggregat. Note that if the // aggregate subtype cannot be determined from the context then // dest_range will point to the corresponding index range of the // unconstrained array associated with the aggregate. dest_length(aa) = -1; known_subtype(aa) = true; // Get left and right bound as well as direction of the aggregate. If // the bounds are locally static then calculate length of aggregate. vector range_desc = get_discrete_range (dest_type, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[dim_number-1].rangedes_to_lint(rstack); dest_direction(aa) = range.dir; if (and_reduce(range.valid)) { dest_left(aa) = range.left; dest_right(aa) = range.right; dest_length(aa) = abs(dest_left(aa) - dest_right(aa)) + 1; } // If type of aggregate is an unconstrained array then set length of // aggregate to -1 (unknown) and known_subtype to false. if (!is_constrained_array_type(aa->subtype)) { dest_length(aa) = -1; known_subtype(aa) = false; } has_others(aa) = false; // Is set to true if aggregate includes others choice min_index(aa) = INT_MAX; // Min index value max_index(aa) = INT_MIN; // Max index value locally_static_ranges(aa) = true; // We assume that all choice ranges are locally static total_length(aa) = -1; // Total length int choice_counter = 0; /* First, take a look at all choices to determine the number of * choices, whether an others choice is present and determine low * and high index range values. */ int named_association_count = 0; int positional_association_count = 0; for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { if (al->first->is(IR_SINGLE_INDEXED_ASSOCIATION)) { // Single indexed association pIIR_SingleIndexedAssociation saa = pIIR_SingleIndexedAssociation(al->first); int value; total_length(aa) = max(total_length(aa), 0) + 1; // Increment length (min length is 1) if (saa->index != NULL) { // Named association named_association_count++; if (expr_to_int(saa->index, value, rstack)) { // Determine min/max values min_index(aa) = min(value, min_index(aa)); max_index(aa) = max(value, max_index(aa)); // Set values of choice min_index(saa) = value; max_index(saa) = value; locally_static_range(saa) = true; length(saa) = 1; } else { locally_static_ranges(aa) = false; locally_static_range(saa) = false; } } else { // Positional association positional_association_count++; locally_static_range(saa) = true; length(saa) = 1; // Store number of choice into min_index and // max_index. Further, max_index of the aggregate expression // is set to the current choice counter and min_index of the // aggregate expression is set to 0. min_index(saa) = choice_counter; max_index(saa) = choice_counter; max_index(aa) = choice_counter; min_index(aa) = 0; } } else if (al->first->is(IR_RANGE_INDEXED_ASSOCIATION)) { // Range association named_association_count++; // Range indexed association is // always named association pIIR_RangeIndexedAssociation raa = pIIR_RangeIndexedAssociation(al->first); vector range_desc = get_discrete_range(raa->index_range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (and_reduce(range.valid)) { // Test whether range bound matches the direction if (range.left == range.right || (range.left < range.right && range.dir == IR_DIRECTION_UP) || (range.left > range.right && range.dir == IR_DIRECTION_DOWN)) { // Determine min/max values min_index(aa) = min(int(range.left), min_index(aa)); max_index(aa) = max(int(range.left), max_index(aa)); min_index(aa) = min(int(range.right), min_index(aa)); max_index(aa) = max(int(range.right), max_index(aa)); // Update length (min length is 1) total_length(aa) = max((lint)max(total_length(aa), 0) + lint_abs(range.left - range.right) + 1, (lint)1); // Set values of choice min_index(raa) = int(min(range.left, range.right)); max_index(raa) = int(max(range.left, range.right)); locally_static_range(raa) = true; length(raa) = lint_abs(range.left - range.right) + 1; } } else { locally_static_ranges(aa) = false; locally_static_range(raa) = false; } } else if (al->first->is(IR_OTHERS_INDEXED_ASSOCIATION)) // Others clause has_others(aa) = true; choice_counter++; // Increment counter } // Set named_association flag to false if at least one positional // association was found. if (positional_association_count != 0) named_association(aa) = false; else named_association(aa) = true; // Check whether only named or only positional association has been used if (named_association_count != 0 && positional_association_count != 0) codegen_error.error("%:error: array aggregates cannot contain positional and named associations", aa); // Check whether all ranges are locally static if more than a single // choice was given if (!locally_static_ranges(aa)) { assert(choice_counter == 1); return error_count; } // Next, make some checks to test the range of the choices. First, // check whether ranges do not overlap. vector from_vec, to_vec; for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { if (al->first->is(IR_OTHERS_INDEXED_ASSOCIATION)) continue; // Check new range against previous ranges for (unsigned int i = 0; i < from_vec.size(); i++) { if ((min_index(al->first) <= from_vec[i] && max_index(al->first) >= from_vec[i]) || (min_index(al->first) <= to_vec[i] && max_index(al->first) >= to_vec[i])) codegen_error.error("%:error: choice ranges do overlap (%i to %i conflicts with %i to %i)", aa, min_index(al->first), max_index(al->first), from_vec[i], to_vec[i]); } // Add new index range to vectors from_vec.push_back(min_index(al->first)); to_vec.push_back(max_index(al->first)); } // If aggregate has others choice then we are done if (has_others(aa)) return error_count; // Otherwise, check whether there are no "holes" between the // ranges. We already checked that the ranges do not overlap. Hence, // we simply sort both arrays from_vec and to_vec which will move // associated entries in both vectors to the SAME position. sort(from_vec.begin(), from_vec.end()); sort(to_vec.begin(), to_vec.end()); for (unsigned int i = 1; i < from_vec.size(); i++) if (to_vec[i - 1] + 1 != from_vec[i]) { codegen_error.error("%:error: index %i of aggregate is undefined", aa, from_vec[i] - 1); return error_count + 1; } // Test whether the length as determined from the choices matches // the length of the aggregate subtype (if this length is known from // the context). if (dest_length(aa) != -1 && dest_length(aa) != total_length(aa)) { codegen_error.error("%:error: length of array aggregate (=%i) does not match length of target (=%i)", aa, total_length(aa), dest_length(aa)); error_count++; } return error_count; } int m_check_expression (pIIR_ArrayLiteralExpression ale, RegionStack &rstack) { int error_count = 0; // Bail out if the array element is not an enumeration type if (!get_base_type(ale->subtype)->is(IR_ARRAY_TYPE) || !get_base_type(pIIR_ArrayType(get_base_type(ale->subtype))->element_type)->is(IR_ENUMERATION_TYPE)) { codegen_error.error("%:error: array element type is not an enumeration type", ale); error_count++; return error_count; } pIIR_EnumerationType etype = pIIR_EnumerationType(get_base_type(pIIR_ArrayType(get_base_type(ale->subtype))->element_type)); pIIR_EnumerationLiteralList enum_items = etype->enumeration_literals; // Get list of enumeration items assert(ale->value->is(IR_TEXT_LITERAL)); // Determine max and minimal valid position number of the // enumeration items int min_pos, max_pos; pIIR_Type basic_etype = get_basic_type(pIIR_ArrayType(get_base_type(ale->subtype))->element_type); if (basic_etype->is(IR_SCALAR_SUBTYPE)) { // If the basic type is an scalar subtype then min and max pos // values are given by the corresponding position numbers of the // range. vector rdesc = get_discrete_range(basic_etype, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = rdesc[0].rangedes_to_lint(rstack); min_pos = range.valid[0]? range.left : 0; max_pos = range.valid[2]? range.right : INTEGER_MAX; } else { // If the basic type is an scalar enumeration type then min pos // value is 0 and max pos value is determined from the number of // enumeration items pIIR_EnumerationType et = pIIR_EnumerationType(etype); min_pos = 0; max_pos = enum_item_number(et) - 1; } // Determine length of literal array char *literal = pIIR_TextLiteral(ale->value)->text.to_chars(); int length = strlen(literal) - 2; // don't count leading and trailing \" // Now, convert each element of the literal into an corresponding // number for (int i = 1; i < length + 1; i++) { string literal_str = string("'") + literal[i] + string("'"); int enum_pos = literal_to_pos(enum_items, literal_str); // Get pos number of literal item if (enum_pos < min_pos || enum_pos > max_pos) { // Bail out if number is not valid codegen_error.error("%:error: character %s does not belong to enumertion type %n", ale, literal_str.c_str(), basic_etype); error_count++; } } return error_count; } /* Returns whether two types are closley related */ bool is_closely_related(pIIR_Type type1, pIIR_Type type2) { pIIR_Type base_type1 = get_base_type(type1); pIIR_Type base_type2 = get_base_type(type2); // Two array types are closley related only if they have the same // dimensionality, their index types are closley related and the // element types are the same. if (is_array_type(base_type1)) { if (!is_array_type(base_type2)) return false; pIIR_ArrayType atype1 = pIIR_ArrayType(base_type1); pIIR_ArrayType atype2 = pIIR_ArrayType(base_type2); // check element types if (get_base_type(atype1->element_type) != get_base_type(atype2->element_type)) return false; // Check index types pIIR_TypeList tl1 = atype1->index_types, tl2 = atype2->index_types; for ( ; tl1 != NULL && tl2 != NULL; tl1 = tl1->rest, tl2 = tl2->rest) if (!is_closely_related(tl1->first, tl2->first)) return false; // Finally, check whether the arrays have the same dimensionality return tl1 == tl2; } // Floating point types are closely related to integer types if ((base_type1->is(IR_FLOATING_TYPE) || base_type1->is(IR_INTEGER_TYPE)) && (base_type2->is(IR_FLOATING_TYPE) || base_type2->is(IR_INTEGER_TYPE))) return true; // All other types are closely related to themself return base_type1 == base_type2; } int m_check_expression (pIIR_TypeConversion tc, RegionStack &rstack) { int error_count = 0; // Check expression that shal lbe converted error_count += check_expression(tc->expression, rstack); pIIR_Type target_base_type = get_base_type(tc->type_mark); pIIR_Type source_base_type = get_base_type(tc->expression->subtype); if (is_scalar_type(target_base_type)) { // ******************************************************************** // Target type is a scalar // ******************************************************************** if (!is_closely_related(tc->type_mark, tc->expression->subtype)) { codegen_error.error("%:error: illegal type conversion: " "target type %n is not closely related to operand type %n.", tc, target_base_type, source_base_type); error_count++; valid_folded_value(tc) = false; return error_count; } // If the converion expression could not be folded then the result // must be checked at runtime. if (!valid_folded_value(tc->expression)) runtime_checks(tc) |= RT_CHECK_LEFT_BOUND | RT_CHECK_RIGHT_BOUND; return error_count; } else if (is_array_type(target_base_type)) { // ******************************************************************** // Target type is an array // ******************************************************************** // Two array types are closley related only if they have the same // dimensionality, their index types are closley related and the // element types are the same. if (!is_closely_related(target_base_type, source_base_type)) { if (!is_array_type(source_base_type)) { codegen_error.error("%:error: non array type %n cannot be converted into array type %n.", tc, source_base_type, target_base_type); } else { pIIR_ArrayType atype1 = pIIR_ArrayType(target_base_type); pIIR_ArrayType atype2 = pIIR_ArrayType(source_base_type); // check element types if (get_base_type(atype1->element_type) != get_base_type(atype2->element_type)) codegen_error.error("%:error: illegal type conversion: " "the element type (=%n) of target array type %n differs from " "element type (=%n) of operand array type %n.", tc, get_base_type(atype1->element_type), target_base_type, get_base_type(atype2->element_type), source_base_type); // Check index types pIIR_TypeList tl1 = atype1->index_types, tl2 = atype2->index_types; int dim_counter1 = 0, dim_counter2 = 0; for ( ; tl1 != NULL && tl2 != NULL; tl1 = tl1->rest, tl2 = tl2->rest) { if (!is_closely_related(tl1->first, tl2->first)) codegen_error.error("%:error: illegal type conversion: " "index type %n of target array type %n is not closely related to " "the corresponding index type %n of operand array type %n.", tc, tl1->first, target_base_type, tl2->first, source_base_type); dim_counter1++; dim_counter2++; } // Finally, check whether the arrays have the same dimensionality if (dim_counter1 != dim_counter2) codegen_error.error("%:error: illegal type conversion: " "target and operand type do not have the same dimensionality. " "Dimension of target type %n is %i while dimension of operand type %n is %i.", tc, target_base_type, dim_counter1, source_base_type, dim_counter2); } error_count++; return error_count; } } return error_count; } // ****************************************************************************************** // Name: m_get_static_level , generic function // // Description: Determines static level of an type or expression // // Return value: returns static level // // ****************************************************************************************** IR_StaticLevel m_get_static_level (pIIR_Type t, RegionStack &rstack) { return t->static_level; } IR_StaticLevel m_get_static_level (pIIR_Expression e, RegionStack &rstack) { return e->static_level; } freehdl-0.0.7/v2cc/v2cc-util.h0000644000175000017500000005564310707452751012713 00000000000000 #ifndef V2CC_UTIL_H #define V2CC_UTIL_H using namespace std; #include #include #include #include "v2cc-chunk.h" // ****************************************************************************************** // Some global variables // ****************************************************************************************** // Counter to produce unique names for internal variables extern int internal_counter; extern string internal_prefix_start; // Prefix used to build a default name for a process extern const string process_default_postfix; // Prefix used to build a default name for loop statement extern const string loop_default_postfix; // Stores which type of checks shall be performed at runtime extern CodeGeneratorCheckFlags do_runtime_checks; // Holds list of unique pointers to externl declarations which are // used within the current design(s) extern decl_flag_list external_decls_list; // Points to the last PosInfo instance printed to the C++ code extern pIIR_PosInfo_TextFile last_pos_info; class v2cc_codegen_options { // Global variable to control register code generation. Register code // is used to collect information about VHDL objects (components, // processes, signals, variables, constants, ...) at simulation // startup. bool emit_register_code; // Flag to control whether debugging code/info shall be includes into // the generated code bool emit_debug_code; // Flag to control generation of CDFG (control data flow graph) // generation. Actually, no CDFG graph is created directly. Instead a // lisp module to generate the CDFG nodes is created from each // process. bool emit_cdfg_code; // If true, then code for procedure "main" is generated. "main" is // needed to build the simulator executable. It initializes // elaboration of the top level component. bool emit_main_cc_code; string main_cc_filename; bool verbose; int parser_flags; public: v2cc_codegen_options (); void set_emit_register_code (const bool v) { emit_register_code = v; } bool get_emit_register_code () const { return emit_register_code; } void set_emit_debug_code (const bool v) { emit_debug_code = v; } bool get_emit_debug_code () const { return emit_debug_code; } void set_emit_cdfg_code (const bool v) { emit_cdfg_code = v; } bool get_emit_cdfg_code () const { return emit_cdfg_code; } void set_verbose (const bool v) { verbose = v; } bool get_verbose () const { return verbose; } void set_emit_main_cc_code (const bool v) { emit_main_cc_code = v; } bool get_emit_main_cc_code () { return emit_main_cc_code; } void set_main_cc_filename (const string str) { main_cc_filename = str; } string get_main_cc_filename () const { return main_cc_filename; } void set_parser_flags (const bool v) { parser_flags = v; } int get_parser_flags () const { return parser_flags; } }; extern v2cc_codegen_options codegen_options; // used to generate error messages extern vaul_error_printer codegen_error; // ****************************************************************************************** // Calculate power for integer parameters. lint calculate_pow(lint a, lint b); // Calculate power for double/integer parameters. double calculate_pow(double a, lint b); // Calculate power for double/integer parameters. inline double calculate_pow(double a, double b) { return calculate_pow(a, (lint) b); } // Calculate absolute value of long long int parameter. Will be // replaced with library function llabs as soon as llabs funcion // compiles with gcc. inline lint lint_abs (const lint a) { return a < 0 ? (-a) : a; } /* Get line number associated with a node */ int get_line_number(pIIR_Root n); /* Return a number which is unique within the current file. */ int get_unique_int_id(); /* Get library and unit name */ vector get_library_and_unit_name(pIIR_Declaration decl); /* Get source file name associated with a node */ const char * get_source_file_name(pIIR_Root n); /* Get id_type from region stack. Note that dependent on the region * stack some objects are either accessed directly or accessed via * architecture pointers */ id_type get_default_id_type(RegionStack &rstack); // Converts a string item into an IR_TextLiteral pIIR_TextLiteral to_TextLiteral(const string &str); /* Return a string of L spaces, but at most 30. */ string spaces(int l); /* Emit a declaration name */ void emit_id (pIIR_Declaration d, string &str, RegionStack &rstack); /* Emit a type name */ void emit_id (pIIR_Type t, string &str, RegionStack &rstack); /* Emit an UglyIdentifier as a beautiful_identifier. */ void emit_id(pIIR_TextLiteral idnode, string &str, RegionStack &rstack); /* emit a plain identifier */ void emit_noqual_id (pIIR_Declaration d, string &str, RegionStack &rstack, id_type typ=id_type()); /* Emit folded value. Note that in case of an array literal value an * global internal variable will be created which stores the array * elements. */ void emit_folded_value(StaticDataType &data, string &str, RegionStack &rstack, pIIR_Type subtype); /* Emit folded value in CDFG style. */ void cdfg_emit_folded_value(StaticDataType &data, string &str, RegionStack &rstack, pIIR_Type subtype); //string //qid (pIIR_Declaration d, RegionStack &rstack, id_type typ=id_type()); // get an unqualified id string nid(pIIR_Declaration d, id_type obj_access=id_type()); /* return long name of declaration (similar to the path_name defined * in VHDL). E.g., returns ":std:standard:bit" when called for * standard type bit. */ string get_long_name(pIIR_Declaration d); /* prepend special characters like " with \ and return string. */ string get_escaped_string (const string str, const string escape_chars = "\"\\"); /* Select association element from an association list which * corresponds with given formal */ list find_matching_actuals(pIIR_AssociationList assocs, pIIR_InterfaceDeclaration formal); /* Test whether a type is a scalar */ bool is_scalar_type(pIIR_Type t); /* Test whether a type denotes an array type */ bool is_array_type(pIIR_Type t); /* Test whether an type is an constrained array type */ bool is_constrained_array_type(pIIR_Type t); /* Test whether an type is an implicit defined array * subtype. E.g. when a variable "varaible var : bit_vector(0 to 7)" * is declared then an implicit subtype "bit_vector(0 to 7)" is * defined. */ bool is_implicit_array_subtype(pIIR_Type t); /* Test whether an type is an implicit defined * subtype. */ bool is_implicit_subtype(pIIR_Type t); /* Calculate length from left bound, right bound and direction */ lint range_to_length(lint left, IR_Direction dir, lint right); /* Applies a function "int (*f)(int)" on a copy of the paramter string * and returns it. E.g., calling "convert_string(str, tolower)" will * convert all characters in str to lower case. */ inline string convert_string(const string &str, int (*f)(int)) { string result = str; for (unsigned int i = 0; i < result.length(); i++) result[i] = (*f)(result[i]); return result; } /* Convert an integer value into a string */ template inline string to_string(T i) { stringstream lstr; lstr << i; return lstr.str(); } inline string to_string(double i) { stringstream lstr; #if !defined __GNUC__ || __GNUC__ != 2 lstr << showpoint << setprecision(20) << i; return lstr.str(); #else lstr << setprecision(20) << i; string str = lstr.str (); if (str.find ('.') < str.size ()) return str; else return str + ".0"; #endif } /* Print scalar value into a string */ string to_string(pIIR_ScalarType type, const StaticDataType &value); /* Convert a string value into a string (dummy function) */ inline string to_string(string &str) { return str; } /* Template class used to build binary function objects that take two * function object classes as parameter: ArgF is a unary function * class that is used to process both arguments, which are then passed * over to binary function class CompF. E.g., * binary_function_compose, select1st > > () * creates a function object that takes two pair as * parameter, select the first element of the pairs and compares them * using less. */ template struct binary_function_compose : public binary_function { CompF CF; ArgF AF; binary_function_compose () {}; typename CompF::result_type operator ()(const typename ArgF::argument_type &arg1, const typename ArgF::argument_type &arg2) const { return CF (AF (arg1), AF(arg2)); } }; /* Convert an string value into a long integer. The number is returned as second element of the pair. The function returns false in first pair lement in case of an overflow. */ pair string_to_lint(const string &str); /* Convert an string value into a double. The number is returned in second element of the pair. The function returns false in first pair element in case of an overflow. */ pair string_to_double(const string &str); // Get folded value from IIR_Root node StaticDataType & get_folded_value(pIIR_Root n); // Returns whether a valid folded value has been calculated from node // n bool valid_folded_value(pIIR_Root n); /* Concatenate lists or items into a string */ template string concat_to_string(const Titer b, const Titer e, const string sep) { if (b == e) return ""; Titer iter = b; string result = to_string(*iter); while (++iter != e) result += sep + to_string(*iter); return result; } /* Return the prefix for the name of a new internal variable */ string get_new_internal_var_prefix(); /* Set prefix for internal variables */ void set_internal_prefix_start(pIIR_DeclarativeRegion r, RegionStack &rstack); // Return number of items on a list template int list_size(T *l) { int items = 0; while (l != NULL) { items++; l = l->rest; } return items; } // Return n-th element (first element is the 0-th element!) template T * get_nth_element(T *l, const int n) { for (int i = 0; i < n; i++) l = l->rest; return l; } // Return address of the last member from the last item on the // list. If the list is empty then return listp. Note that listp is // the ADDRESS of an pointer which points to the next item on the list // (or to NULL). template T *get_last_rest_address(T *listp) { while (*listp) listp = &(*listp)->rest; return listp; } // Creates a copy of a list and returns a pointer to the new // list. Note that the source list type and the destination type may // differ. source_T is the source list type while target_T is the // destination list type. template target_T* clone_list(source_T* list) { target_T *new_list = NULL; target_T **last_rest_address = &new_list; for (; list; list = list->rest) { *last_rest_address = new target_T(list->pos, list->first, NULL); last_rest_address = &(*last_rest_address)->rest; } return new_list; } // Creates a copy of a list and returns a pointer to the new // list. Note that the source list type and the destination type may // differ. source_T is the source list type while target_T is the // destination list type. However, only list items for which the unary // function class F returns true are copied! template target_T* filter_list(source_T* list) { target_T *new_list = NULL; target_T **last_rest_address = &new_list; for (; list; list = list->rest) { // If node kind of the list itme matches one of the kind stored in // the filter vector then skip this declaration! if (! bool(F(list->first))) continue; *last_rest_address = new target_T(list->pos, list->first, NULL); last_rest_address = &(*last_rest_address)->rest; } return new_list; } /* Print line number and source file name */ #define NO_SOURCE_LINE NULL inline pIIR_PosInfo_TextFile emit_posinfo(pIIR_PosInfo pi, string &str, pIIR_PosInfo_TextFile last_pos, int l = 0) { if (pi == NO_SOURCE_LINE) { // Print the source line of the generated code if the // corresponding C++ line is not associated with any real line // number of the VHDL source code! if (last_pos == NULL) return NULL; str += "#line 1000000 __FILE__\n"; return NULL; } if (!codegen_options.get_emit_debug_code () || !pi->is(IR_POS_INFO_TEXT_FILE)) return last_pos; pIIR_PosInfo_TextFile pit = pIIR_PosInfo_TextFile(pi); // Emit line number and file name str += "#line " + to_string(pit->line_number); if (last_pos == NO_SOURCE_LINE) str += " \"" + to_string(pit->file_name) + "\"\n"; else str += "\n"; return pit; } /* Returns a pointer to the current active context info instance */ ContextInfo * ActiveContext(RegionStack &rstack); pIIR_DeclarativeRegion ActiveDeclarativeRegion(RegionStack &rstack); /* Returns the next process, subprogram, concurrent assignment, package declaration, package body declaration, architecture or entity declarative region */ extern ContextInfo * BaseContext(RegionStack &rstack); pIIR_DeclarativeRegion BaseDeclarativeRegion(RegionStack &rstack); /* Returns the top level region which is either an architecture region, an entity region, a package body region or package declaration region */ ContextInfo * TopContext(RegionStack &rstack); pIIR_DeclarativeRegion TopDeclarativeRegion(RegionStack &rstack); pIIR_DeclarativeRegion TopDeclarativeRegion(pIIR_DeclarativeRegion region); /* Returns the upper most declarative region which has been added to store all the global code items */ pIIR_DeclarativeRegion RootDeclarativeRegion(RegionStack &rstack); ContextInfo * RootContext(RegionStack &rstack); inline bool is_PackageDeclarativeRegion(pIIR_DeclarativeRegion region) { if (region->is(IR_PACKAGE_BODY_DECLARATION) || region->is(IR_PACKAGE_DECLARATION)) { return true; } else return false; } /* for debugging */ extern int plot_rstack(RegionStack &rstack); /* for debugging */ extern void plot(string &str); // Create a list of declarative region pointers beginning from // end_region up to the root region list create_region_list(pIIR_DeclarativeRegion end_region); inline pIIR_DeclarativeRegion get_parent_declarative_region(pIIR_DeclarativeRegion region, RegionStack &rstack) { if (region->is (IR_ARCHITECTURE_DECLARATION)) return pIIR_ArchitectureDeclaration (region)->entity; else if (region->is (IR_PACKAGE_BODY_DECLARATION)) return pIIR_PackageBodyDeclaration (region)->package; else if (region->is (IR_ENTITY_DECLARATION) || region->is (IR_PACKAGE_DECLARATION) || region->is (IR_CONFIGURATION_DECLARATION) || region->is (VAUL_TOP_SCOPE)) return RootDeclarativeRegion (rstack); else if (region == RootDeclarativeRegion (rstack)) return NULL; else return region->declarative_region; } // Get the type declaration pIIR_TypeDeclaration get_declaration(pIIR_Type type); // Get the immediate_base type pIIR_Type get_immediate_base_type(pIIR_Type type); // Get base type of a type pIIR_Type get_base_type(pIIR_Type type); // Get base type or subtype the current type is derived from. I.e., // any subtype declarations which only add a resolution function are // skipped. pIIR_Type get_basic_type(pIIR_Type type); /* Emit code to create an new object of a specific type */ string create_default_instance(pIIR_Type type, RegionStack &rstack); /* Emit code to create an new object of a specific type using CDFG style */ string cdfg_create_default_instance(pIIR_Type type, RegionStack &rstack); /* Creates an array info object for an array subtype */ string create_array_info_obj(pIIR_Type base, pIIR_Range range, RegionStack &rstack, const bool static_object); // Convert locally static expression to int value. Returns false if // the expression is not locally static. bool expr_to_int(pIIR_Expression e, int &value, RegionStack &rstack); // Get enumeration pos of enumeration item int literal_to_pos(pIIR_EnumerationLiteralList enum_items, const string &literal_str); // Get enumeration literal associated with pos pIIR_EnumerationLiteral pos_to_literal(pIIR_EnumerationLiteralList enum_items, int literal_pos); // Create an internal acl object which is used to store acl values at // simulation time. Return the name of the internal acl // object. private_acl determines whether the object will be used // privately or may be shared by several expressions. string create_internal_acl (const int size, RegionStack &rstack, bool private_acl); // Lookup an internal object declaration with name "name" defined in // the declarative region "region" pV2CC_InternalObjectDeclaration lookup_internal_object_declaration(pIIR_DeclarativeRegion region, const string &name); // Return C++ type string of an internal object string get_internal_object_type_string(pV2CC_InternalObjectDeclaration decl, RegionStack &rstack); // Return inital value string of an internal object string get_internal_object_initial_string(pV2CC_InternalObjectDeclaration decl, RegionStack &rstack); // Test whether static level level matches the required static level // test. The function returns true if the static level "level" is // greater or equal compared to level test. inline bool level_match(IR_StaticLevel test, IR_StaticLevel level) { switch (level) { case IR_LOCALLY_STATIC: if (test == IR_GLOBALLY_STATIC) return false; case IR_GLOBALLY_STATIC: if (test == IR_NOT_STATIC) return false; case IR_NOT_STATIC: break; }; return true; } // Merge two static levels. The resulting level will be equal to the // smallest level of both. IR_StaticLevel merge_level(IR_StaticLevel sl1, IR_StaticLevel sl2); // Merge pointers of the declaration decls list into the pointer set // pm void merge (decl_flag_list &pm, pIIR_DeclarationList decls, RegionStack &rstack); pIIR_DeclarativeRegion get_combined_static_region(list &rlist, RegionStack &rstack); pIIR_DeclarativeRegion get_combined_static_region(pIIR_DeclarativeRegion r1, pIIR_DeclarativeRegion r2, RegionStack &rstack); /* Check whether a folded value value is within the bound sepcified by * the target type. print_error controls whether an error message is * printed whenever the bounds check fails or just the number of * errors are returnd. Node n is used to determine the line number and * source file name if an error message should be * printed. runtime_checks returns the checks that must be performed * at runtime. error_prefix_str will be prepended to the error message * in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, StaticDataType &value, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error = true, string error_prefix_str = ""); /* Check whether a scalar integer, enumeration or physical value e is * within the bound sepcified by the target type. print_error controls * whether an error message is printed whenever the bounds check fails * or just the number of errors are returnd. Node n is used to * determine the line number and source file name if an error message * should be printed. runtime_checks returns the checks that must be * performed at runtime. error_prefix_str will be prepended to the * error message in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, lint e, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error = true, string error_prefix_str = ""); /* Check whether a scalar floating point value e is within the bound * sepcified by the target type. print_error controls whether an error * message is printed whenever the bounds check fails or just the * number of errors are returnd. Node n is used to determine the line * number and source file name if an error message should be * printed. runtime_checks returns the checks that must be performed * at runtime. error_prefix_str will be prepended to the error message * in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, double e, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error = true, string error_prefix_str = ""); /* Check whether the source matches target type is ok */ int check_for_target_type(pIIR_Root n, pIIR_Type target_type, pIIR_Expression source, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error = true, string error_prefix_str = ""); // ****************************************************************************************** // Name: insert_internal_object_declaration, set of functions // // Description: Creates an internal object declaration and inserts it // into the corresponding declaration list. The new item is inserted // right before *listp. region points to the declarative region the // new item belongs to. type_str is the C++ type of the item while // initial_str stores its initial value. Alternatively, the type may // be specified by a pIIR_Type pointer and the intial value may be // defined by a pIIR_Expression. // // Return value: returns pointer to new internal object declaration // // ****************************************************************************************** pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, const string &type_str, const string &initial_str, int flags); pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, pIIR_Type type, const string &initial_str, int flags); pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, const string &type_str, pIIR_Expression initial, int flags); pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, pIIR_Type type, pIIR_Expression initial, int flags); // ****************************************************************************************** // Name: insert_internal_code, function // // Description: Creates an internal object which contains code to be // included into the generated C++ code. hdr contains header code to // be prepended to the C++ code while impl stores the actual // implementation code. Usually, this object is used to store the code // generated from VHDL subporogram declarations. In this case, hdr // contains the C++ interface definition of the subprogram while impl // stores its implementation code. // // Return value: returns pointer to new internal object declaration // // ****************************************************************************************** pV2CC_InternalCode insert_internal_code(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, const string &name, const string &hdr, const string &impl, int flags); #endif freehdl-0.0.7/v2cc/v2cc-util.cc0000644000175000017500000021757511172454572013055 00000000000000#if HAVE_ALLOCA_H #include #endif #if HAVE_MALLOC_H #include #endif #include #include #include "v2cc-util.h" // ****************************************************************************************** // Some global variables // ****************************************************************************************** // used to generate error messages extern vaul_error_printer codegen_error; int dbg=0; // Counter to produce unique names for internal variables int internal_counter = 0; string internal_prefix_base = "itn"; string internal_prefix_start = "???"; // Prefix used to build a default name for a process const string process_default_postfix = "pn"; // Prefix used to build a default name for loop statement const string loop_default_postfix = "ln"; // Integer IIR_Range instance pIIR_ExplicitRange iir_integer_range = NULL; // Stores which type of checks shall be performed at runtime CodeGeneratorCheckFlags do_runtime_checks = CG_CHECK_ALL; // Holds list of unique pointers to external declarations which are // used within the current design(s). The bool value stores whether an // corresponding declaration has been already emitted. decl_flag_list external_decls_list; // Points to the last PosInfo instance printed to the C++ code pIIR_PosInfo_TextFile last_pos_info = NULL; v2cc_codegen_options::v2cc_codegen_options () { // Global variable to control register code generation. Register code // is used to collect information about VHDL objects (components, // processes, signals, variables, constants, ...) at simulation // startup. emit_register_code = false; // Flag to control whether debugging code/info shall be includes into // the generated code emit_debug_code = false; // Flag to control generation of CDFG (control data flow graph) // generation. Actually, no CDFG graph is created directly. Instead a // lisp module to generate the CDFG nodes is created from each // process. emit_cdfg_code = false; // If true, then code for procedure "main" is generated. "main" is // needed to build the simulator executable. It initializes // elaboration of the top level component. emit_main_cc_code = false; verbose = false; parser_flags = 0; }; v2cc_codegen_options codegen_options; // used to generate error messages vaul_error_printer codegen_error; // ****************************************************************************************** // Calculate power for integer parameters. lint calculate_pow(lint a, lint b) { if (b < 0) return 0; if (b == 0) return 1; lint value = a; while (--b) { value *= a; // In case of an overflow or underflow bail out if (value > INTEGER_MAX) return lint(INTEGER_MAX) + 1; if (value < INTEGER_MIN) return lint(INTEGER_MIN) - 1; } return value; } // Calculate power for double/integer parameters. double calculate_pow(double a, lint b) { return pow(a,double(int(b))); } const char * ppp(pIIR_Root n) { return n->kind_name(); } /* Print scalar value into a string */ string to_string(pIIR_ScalarType type, const StaticDataType &value) { string str; StaticDataType v = value; pIIR_ScalarType base_type = pIIR_ScalarType (get_base_type (type)); if (base_type->is (IR_ENUMERATION_TYPE)) { pIIR_EnumerationLiteralList enum_list = pIIR_EnumerationType (base_type)->enumeration_literals; str = pos_to_literal (enum_list, v.long_value ())->declarator->text.to_chars (); } else if (base_type->is (IR_INTEGER_TYPE)) { str = to_string (v.long_value ()); } else if (base_type->is (IR_FLOATING_TYPE)) { str = to_string (v.double_value ()); } return str; } // Converts a string item into an IR_TextLiteral pIIR_TextLiteral to_TextLiteral(const string &str) { return new IIR_TextLiteral(NULL, IR_String(str.c_str())); } /* Get line number associated with a node */ int get_line_number(pIIR_Root n) { if (n->pos->is(IR_POS_INFO_TEXT_FILE)) return pIIR_PosInfo_TextFile(n->pos)->line_number; else if (n->pos->is(IR_POS_INFO_SHEET)) return pIIR_PosInfo_Sheet(n->pos)->x_coordinate; else assert(false); } /* Get library and unit name */ vector get_library_and_unit_name(pIIR_Declaration decl) { vector result; // Get long name of declaration. The long name is of the form // ":lib:unit:..." string lname = get_long_name(decl); // Extract library and unit name from path string str; unsigned int i = 1; while (i < lname.length() && lname[i] != ':') str += tolower(lname[i++]); result.push_back(str); i++; str = ""; while (i < lname.length() && lname[i] != ':') str += tolower(lname[i++]); result.push_back(str); return result; } /* Get source file name associated with a node */ const char * get_source_file_name(pIIR_Root n) { if (n->pos->is(IR_POS_INFO_TEXT_FILE)) return pIIR_PosInfo_TextFile(n->pos)->file_name; else if (n->pos->is(IR_POS_INFO_SHEET)) return pIIR_PosInfo_Sheet(n->pos)->sheet_name; else assert(false); } /* Select association elements from an association list which * corresponds with given formal */ list find_matching_actuals(pIIR_AssociationList assocs, pIIR_InterfaceDeclaration formal) { list result; for (pIIR_AssociationList al = assocs; al; al = al->rest) { pIIR_AssociationElement a = al->first; if (a->formal_declaration == formal) // add association element to list if it matches formal result.push_back(a); } return result; } /* Get id_type from region stack. Note that dependent on the region * stack some objects are either accessed directly or accessed via * architecture pointers */ id_type get_default_id_type(RegionStack &rstack) { pIIR_DeclarativeRegion dreg = rstack.back(); id_type id; if (dreg->is(IR_CONCURRENT_STATEMENT) || dreg->is(IR_SUBPROGRAM_DECLARATION)) id = id_type(READER, DEREF); else id = id_type(READER, DEREF | ARCHREF); return id; } /* Creates an array info object for an array subtype */ string create_array_info_obj(pIIR_Type base, pIIR_Range range, RegionStack &rstack, const bool static_object) { string result = "new array_info("; pIIR_TypeDeclaration type_declaration = base->declaration; string array_base_str = get_type_info_obj(base, rstack, static_object); result += array_base_str + "->element_type," + array_base_str + "->index_type,"; // Extract bounds and range direction from expression vector range_desc = get_discrete_range (range, rstack, IR_NOT_STATIC); StaticRangeDescriptor static_range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); result += static_range.left + "," + static_range.dir + "," + static_range.right; // If the array_info instance will be static, then set the last // argument to -1. Otherwise, append 0. Static array_info instances // are not removed even when no array instance is using it! if (static_object) result += ",-1)"; else result += ",0)"; return result; } /* Emit code to create an new object of a specific type */ string create_default_instance(pIIR_Type type, RegionStack &rstack) { string str; pIIR_Type im_base_type = get_immediate_base_type(type); pIIR_TypeDeclaration type_decl = get_declaration(type); // First, check whether the type is an array type if (im_base_type->is(IR_ARRAY_TYPE)) { // Bail out if the type is not constrained! assert(is_constrained_array_type(type)); str += qid(type_decl, rstack, TYPE) + "("; str += get_type_info_obj(type, rstack, false); str += "," + create_default_instance(pIIR_ArrayType(im_base_type)->element_type, rstack) + ")"; } else { // Emit simple constructor for the type str += qid(type_decl, rstack, TYPE) + "()"; } return str; } /* Emit code to create an new object of a specific type using CDFG style */ string cdfg_create_default_instance(pIIR_Type type, RegionStack &rstack) { string str; pIIR_Type im_base_type = get_immediate_base_type(type); pIIR_TypeDeclaration type_decl = get_declaration(type); // Emit simple constructor for the type str += "(create-object " + get_escaped_string(get_long_name(type_decl)) + ")"; return str; } /* Returns an unqualified identifier name */ string nid(pIIR_Declaration d, id_type obj_access) { string id; char *decl; if (obj_access.object() & BARE) { } else if (d->is(IR_PROCEDURE_DECLARATION)) id="X"; else if (d->is(IR_FUNCTION_DECLARATION)) id="Y"; else if (d->is(IR_ARCHITECTURE_DECLARATION)) id="A"; else if (d->is(IR_ENTITY_DECLARATION)) id="E"; else if (d->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(d)->alias_base != NULL) id="H"; else if (d->is(IR_SIGNAL_DECLARATION) || d->is(IR_SIGNAL_INTERFACE_DECLARATION)) { if (obj_access.object() & DRIVER) id = "D"; else if (obj_access.object() & READER) id = "R"; else if (obj_access.object() & SIGNAL) id = "S"; else if (obj_access.object() & DEFAULT) id = "S"; } else if (d->is(IR_TYPE_DECLARATION)) { if (obj_access.object() & INFO) id = "I"; else if (obj_access.object() & DEFAULT) id = "T"; else if (obj_access.object() & TYPE) id = "T"; } else if (d->is(IR_VARIABLE_DECLARATION)) id="V"; else if (d->is(IR_VARIABLE_INTERFACE_DECLARATION)) id="V"; else if (d->is(IR_FILE_DECLARATION)) id="V"; else if (d->is(IR_FILE_INTERFACE_DECLARATION)) id="V"; else if (d->is(IR_PACKAGE_DECLARATION)) id="Q"; else if (d->is(IR_PACKAGE_BODY_DECLARATION)) id="W"; else if (d->is(IR_CONSTANT_DECLARATION)) id="C"; else if (d->is(IR_CONSTANT_INTERFACE_DECLARATION)) id="C"; else if (d->is(IR_LIBRARY_DECLARATION)) id="L"; else if (d->is(IR_CONCURRENT_STATEMENT)) id="P"; else if (d->is(IR_COMPONENT_DECLARATION)) id="!"; else if (d->is(IR_LOOP_DECLARATIVE_REGION)) id="L"; else if (d->is(IR_ELEMENT_DECLARATION)) id="M"; else if (d->is(IR_ENUMERATION_LITERAL)) return "enumeration(" + to_string(pIIR_EnumerationLiteral(d)->enum_pos) + ")"; else { cout << endl << "Can't find: " << d->kind_name() << endl ; id="?"; } if (d->is(IR_FUNCTION_DECLARATION)) { pIIR_FunctionDeclaration fd = pIIR_FunctionDeclaration(d); // Check for operator function switch (get_operator_type(fd)) { case USER_OP: case BASIC_OP: { // C++ names of user defined operator functions VHDLOperators &operators = *VHDLOperators::get_instance (); bool unary = fd->interface_declarations->rest == NULL; // Binary or unary operator? string op_name = unary? operators.get_unary_user_operator_name (string(fd->declarator->text.to_chars())) : operators.get_binary_user_operator_name (string(fd->declarator->text.to_chars())); decl = (char*)op_name.c_str(); break; } default: decl = d->declarator->text.to_chars(); break; } } else if (obj_access.object() & LIBRARY) { id = "L"; decl = pIIR_LibraryUnit(d)->library_name->text.to_chars(); } else decl = d->declarator->text.to_chars(); // Convert all uppercase letters to lowercase string str; if (!(obj_access.object() & BARE)) str += id + to_string((int)strlen(decl)); // Convert decl string to lower case and add result to str str += convert_string(decl, tolower); // Append some kind of serial number in case of a subprogram. This // serial number is used to separate subprograms with the same // parameter profile but different return type (this is ok for VHDL // but illegal in C++). if (d->is(IR_SUBPROGRAM_DECLARATION)) { pIIR_SubprogramDeclaration sdecl = pIIR_SubprogramDeclaration(d); str += "_i" + to_string(sdecl->prototype != NULL? sdecl->prototype->seqno : sdecl->seqno); } return str; } // emit a plain identifier void emit_noqual_id (pIIR_Declaration d, string &str, RegionStack &rstack, id_type obj_access) { if (d->declarator) { if (d->is(IR_ENUMERATION_LITERAL) && codegen_options.get_verbose ()) { emit_noqual_id (pIIR_EnumerationLiteral(d)->subtype->declaration, str, rstack); str += "_"; if (d->declarator->is(IR_CHARACTER_LITERAL)) { IR_Character ch = d->declarator->text[1]; if (isalnum(ch)) str += ch; else str += unsigned(ch); } else str += nid(d, obj_access); } else { str += nid(d, obj_access); if (d->is(IR_SUBPROGRAM_DECLARATION) && codegen_options.get_verbose ()) { for(pIIR_InterfaceList il = pIIR_SubprogramDeclaration(d)->interface_declarations; il; il = il->rest) { str += "__"; str += qid (il->first->subtype->declaration, rstack, id_type()); } if(d->is(IR_FUNCTION_DECLARATION)) { str += "__"; str += qid (pIIR_FunctionDeclaration(d)->return_type->declaration, rstack, id_type()); } } } } else str += ""; } /* Emit array literal value. Note that this will create a global * variable which takes the literal values. */ void emit_folded_array_literal(StaticDataType &data, string &str, RegionStack &rstack, pIIR_Type subtype) { // First, get range of array expression. The range (bounds and // directions) is stored into an vector of strings where the first // strings is the left bound, the second string denotes the range // direction and the third string is the right bound. vector range_desc = get_discrete_range (subtype, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // Determine length of literal array int length = data.array_literal_value().size(); // Determine range of resulting array. If the array subtype is // constrained then take bounds and direction from // subtype. Otherwise, take left bound of unconstrained array and // determine right bound based on direction and literal length. string range_str; if (is_constrained_array_type(subtype)) // Concat all strings values separated by "," range_str = range.left + "," + range.dir + "," + range.right; else range_str = range.left + "," + range.dir + "," + range.left + (range.dir == "to"?"+":"-") + to_string(length - 1); // Get type declaration of the array literal pIIR_TypeDeclaration type = get_declaration(subtype); pIIR_EnumerationType etype = pIIR_EnumerationType(get_base_type(pIIR_ArrayType(get_base_type(subtype))->element_type)); pIIR_EnumerationLiteralList enum_items = etype->enumeration_literals; // Get list of enumeration items // Create name for an internal array constant to store the literal // values. This variable will be used to initialize the array instance string internal_var_name = get_new_internal_var_prefix() + "_lit"; // Create call to array constructor. The second constructor argument // is a pointer to an array which stores the literal values. The // first argument is an array_info instance. str += "array_alias<" + qid(type, rstack, TYPE) + " >(new array_info(" + get_type_info_obj(get_base_type(subtype), rstack, false) + "->element_type," + get_type_info_obj(get_base_type(subtype), rstack, false) + "->index_type," + range_str + ",0)," + internal_var_name + ")"; // Now, convert each element of the literal into an corresponding // number and declare an internal constant which takes the literal // values. Note, this variable is declared globally. vector &lit_values = data.array_literal_value(); string init_str = "[]={" + concat_to_string(lit_values.begin(), lit_values.end(), ",") + "}"; // Declare the internal variable as a global constant pIIR_DeclarativeRegion root_region = RootDeclarativeRegion(rstack); //if (lookup_internal_object_declaration(root_region, internal_var_name) == NULL) insert_internal_object_declaration(NULL, root_region, NULL, internal_var_name, "enumeration", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); } /* Emit folded value. Note that in case of an array literal value an * global internal variable will be created which stores the array * elements. */ void emit_folded_value(StaticDataType &data, string &str, RegionStack &rstack, pIIR_Type subtype) { pIIR_Type base_type = get_base_type(subtype); if (base_type->is(IR_ENUMERATION_TYPE)) str += "enumeration(" + to_string(data.long_value()) + ")"; else if (base_type->is(IR_FLOATING_TYPE)) str += to_string(data.double_value()); else if (base_type->is(IR_PHYSICAL_TYPE)) str += to_string(data.long_value()) + "LL"; else if (base_type->is(IR_ARRAY_TYPE)) emit_folded_array_literal(data, str, rstack, subtype); else { lint val = data.long_value(); str += to_string(val); // If value does not fit into an integer then add "LL" to define // an long long int constant (usually 64 bits). if (val > INTEGER_MAX || val < INTEGER_MIN) str += "LL"; } } /* Emit folded value in CDFG style. Note that in case of an array * literal value an global internal variable will be created which * stores the array elements. */ void cdfg_emit_folded_value(StaticDataType &data, string &str, RegionStack &rstack, pIIR_Type subtype) { pIIR_Type base_type = get_base_type(subtype); if (base_type->is(IR_ENUMERATION_TYPE)) str += to_string(data.long_value()); else if (base_type->is(IR_FLOATING_TYPE)) { // Replace 'e' ein the floating point number by 'l' in order to // match the definition of doubles in lisp. string result = to_string(data.double_value()); for (unsigned int i = 0; i < result.length(); i++) if (result[i] == 'e' || result[i] == 'E') result[i] = 'l'; str += result; } else if (base_type->is(IR_PHYSICAL_TYPE)) str += to_string(data.long_value()); else if (base_type->is(IR_ARRAY_TYPE)) { // Now, convert each element of the literal into an corresponding // number vector &lit_values = data.array_literal_value(); str += "(list array " + concat_to_string(lit_values.begin(), lit_values.end(), " ") + ")"; } else { lint val = data.long_value(); str += to_string(val); } } /* Test whether a type is a scalar */ bool is_scalar_type(pIIR_Type t) { return (t->is(IR_SCALAR_TYPE) || t->is(IR_SCALAR_SUBTYPE)); } /* Test whether an type is an constrained array type */ bool is_constrained_array_type(pIIR_Type t) { if (t->is(VAUL_SUBARRAY_TYPE)) return is_constrained_array_type(pVAUL_SubarrayType(t)->complete_type); else if (t->is(IR_ARRAY_SUBTYPE)) if (pIIR_ArraySubtype(t)->constraint != NULL) return true; else return is_constrained_array_type(pIIR_ArraySubtype(t)->immediate_base); else if (t->is(IR_ARRAY_TYPE)) return false; else return false; } /* Test whether a type denotes an array (sub)type */ bool is_array_type(pIIR_Type t) { t = get_base_type(t); return t->is(IR_ARRAY_TYPE) || t->is(IR_ARRAY_SUBTYPE); } /* Calculate length from left bound, right bound and direction */ lint range_to_length(lint left, IR_Direction dir, lint right) { if (left <= right && dir == IR_DIRECTION_UP) return right - left + 1; else if (left >= right && dir == IR_DIRECTION_DOWN) return left - right + 1; else return 0; } bool is_implicit_array_subtype(pIIR_Type t) { if (!t->is(VAUL_SUBARRAY_TYPE) && !t->is(IR_ARRAY_SUBTYPE) && !t->is(IR_ARRAY_TYPE)) return false; return t->declaration == NULL; } // Not sure whether this works for all cases!!! bool is_implicit_subtype(pIIR_Type t) { if (t->declaration != NULL) return false; if (t->is(IR_SUBTYPE)) { if (t->is(IR_ARRAY_SUBTYPE)) { pIIR_ArraySubtype subtype = pIIR_ArraySubtype(t); if (subtype->resolution_function != NULL || subtype->constraint != NULL) return true; else return is_implicit_subtype(subtype->immediate_base); } else if (t->is(IR_RECORD_SUBTYPE)) { pIIR_RecordSubtype subtype = pIIR_RecordSubtype(t); if (subtype->resolution_function != NULL) return true; else return is_implicit_subtype(subtype->immediate_base); } else if (t->is(IR_SCALAR_SUBTYPE)) { pIIR_ScalarSubtype subtype = pIIR_ScalarSubtype(t); if (subtype->resolution_function != NULL || subtype->range != NULL) return true; else return is_implicit_subtype(subtype->immediate_base); } else { pIIR_Subtype subtype = pIIR_Subtype(t); if (subtype->resolution_function != NULL) return true; else return is_implicit_subtype(subtype->immediate_base); } } return true; // if (t->declaration == NULL) // return true; // pIIR_Type type = t->declaration->type; // return get_basic_type(type) != t; } /* Convert character c into a decimal digit. Returns MAX_INTEGER if character is not within 0 to 9 or a to f! */ inline int convert_digit(char c) { c = tolower(c); if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'a' && c <= 'f') return 10 + c - 'a'; else return INTEGER_MAX; } /* Convertes string to unsigned int. Stops conversion as soon as a character not included in base is found. However any character '_' is ignored. Returns a pointer to the first invalid character or to the end of the string. The function returns NULL if an overflow occured. */ const char * string_to_ulint(lint &result, int base, const char *p) { result = 0; while (*p != '\0') { if (*p == '_') { p++; continue; } // Convert digit and check whether digit is a valid digit with // respect to base int value = convert_digit(*p); if (value >= base) return p; lint result2 = (result * base) + value; // Check whether an overflow occured. Set ok flag to false in case // of an overflow. if (result2 < result) return NULL; result = result2; p++; } return p; } /* Convertes string to unsigned int. Stops conversion as soon as a character not included in 0 to 9 is found. However any character '_' is ignored. Returns a pointer to the first invalid character or to the end of the string. The function returns NULL if an overflow occured. */ const char * string_to_ulint(lint &result, const char *p) { result = 0; while (*p != '\0') { if (*p == '_') { p++; continue; } // Convert digit and check whether digit is a valid digit with // respect to base 10 if (*p < '0' || *p > '9') return p; // equal to "result2 = result * 10 + ..." lint result2 = (result << 3) + (result << 1) + (*p - '0'); // Check whether an overflow occured. Set ok flag to false in case // of an overflow. if (result2 < result) return NULL; result = result2; p++; } return p; } /* Convert an string value into a long integer. The number is returned as second element of the pair. The function returns false in first pair lement in case of an overflow. */ pair string_to_lint(const string &str) { lint result = 0; const char *p = str.c_str(); bool negative = false, ok = true; // Read sign if present if (*p == '-') { p++; negative = true; } // Read first integer number p = string_to_ulint(result, p); if (p == NULL) return pair (false, StaticLint ()); int base = 10; // Check whether a base has been specified if (*p == '#') { base = result; result = 0; if (base > 16) return pair (false, StaticLint ()); p = string_to_ulint (result, base, ++p); if (p == NULL) return pair (false, StaticLint ()); if (*p != '#') return pair (false, StaticLint ()); p++; } // Skip underscores while (*p == '_') p++; // Check for exponent if (*p == 'e' || *p == 'E') { bool negative_exp = false; if (*(++p) == '-') { negative_exp = true; p++; } if (*p == '\0') return pair (false, StaticLint ()); lint exp; p = string_to_ulint(exp, ++p); if (p == NULL) return pair (false, StaticLint ()); // Calculate result if (negative_exp) while ((exp--) && (result != 0)) result /= base; else while ((exp--) && (result != 0)) { lint result2 = result * base; // Check for overflow if (result2 < result) return pair (false, StaticLint ()); result = result2; } } if (negative) result = -result; return pair (*p == '\0', StaticLint (result, str)); } /* Convert an string value into a double. The number is returned in second element of the pair. The function returns false in first pair element in case of an overflow. */ pair string_to_double(const string &str) { double result = 0.0; int number_of_digits = -1; char *cp = (char*)alloca(sizeof(char)*(str.length()+1)); const char *p = str.c_str(), *copy = cp; // First, remove underscores and check whether a base is specified int i = 0; bool base_specified = false; while (p[i] != '\0') { if (p[i] == '#') base_specified = true; if (p[i] != '_') *(cp++) = p[i]; i++; } *cp = '\0'; if (base_specified) { // A base has been specified. First, determine base. bool negative = false; if (*copy == '-') { negative = true; copy++; } if (*copy == '\0') return pair (false, StaticDouble ()); lint base = 0; copy = string_to_ulint(base, copy); if (*(copy++) != '#' || base > 16) return pair (false, StaticDouble ()); // Get integer part lint integer = 0; copy = string_to_ulint(integer, base, copy); // Check for error and decimal point if (copy == NULL || *copy != '.') return pair (false, StaticDouble ()); copy++; // Get fraction lint fraction = 0; const char *copy_new = string_to_ulint(fraction, base, copy); if (copy_new == NULL || *copy_new != '#') return pair (false, StaticDouble ()); int fraction_digits = copy_new - copy; copy_new++; copy = copy_new; // Get exponent lint exponent = 0; if (*copy == 'e' || *copy == 'E') { bool negative_exp = false; if (*(++copy) == '-') { negative_exp = true; copy++; } if (*copy == '\0') return pair (false, StaticDouble ()); copy = string_to_ulint (exponent, ++copy); if (copy == NULL) return pair (false, StaticDouble ()); // Calculate result if (negative_exp) exponent = -exponent; } // Finally, calculate result double fraction_value = (double)fraction; while (fraction_digits--) fraction_value /= (double)base; result = ((double)integer + fraction_value) * pow((double)base, (double)exponent); if (negative) result = -result; return pair (*copy == '\0', StaticDouble (result)); } else { // Base is 10. Hence, use library function strtod. char *endp; result = strtod(copy, &endp); string adopted_str = copy; adopted_str.erase (adopted_str.begin () + (endp - copy), adopted_str.end ()); return pair ((*endp == '\0') && (result > -HUGE_VAL) && (result < HUGE_VAL), StaticDouble (result, adopted_str)); } } /* Return a string of L spaces, but at most 30. */ string spaces(int l) { if(l > 30) l = 30; if(l < 0) l = 0; return string(" " + (30-l)); } // Create a list of declarative region pointers beginning from the // end_region up to the root region list create_region_list(pIIR_DeclarativeRegion end_region) { list RegionList; pIIR_DeclarativeRegion reg = end_region; while (reg != NULL) { RegionList.push_back(reg); if (reg->is (IR_ARCHITECTURE_DECLARATION)) reg = pIIR_ArchitectureDeclaration (reg)->entity; else reg = reg->declarative_region; } return RegionList; } /* Emit a declaration name */ void emit_id (pIIR_Declaration d, string &str, RegionStack &rstack) { emit_noqual_id (d, str, rstack); } /* Emit a type name */ void emit_id (pIIR_Type t, string &str, RegionStack &rstack) { if (t->declaration) emit_id (t->declaration, str, rstack); else str += "kind_name()) + ">"; } /* Emit an UglyIdentifier as a beautiful_identifier. */ void emit_id(pIIR_TextLiteral idnode, string &str, RegionStack &rstack) { char *id = idnode->text.to_chars(); if (*id == '\\' || *id == '\'') str += id; else { bool break_on_caps = false; while (*id) { if (isupper(*id) && break_on_caps) str += '_'; break_on_caps = islower(*id); str += tolower(*id++); } } } // return long name of declaration (similar to the path_name defined // in VHDL). E.g., returns ":std:standard:bit" when called for // standard type bit. string get_long_name (pIIR_Declaration d) { string id; // Convert declarator string to lower and add result to id id += convert_string(d->declarator->text.to_chars(), tolower); if (d->is(IR_ARCHITECTURE_DECLARATION)) id = get_long_name (pIIR_ArchitectureDeclaration(d)->entity) + "(" + id + ")"; else if (d->is (IR_LIBRARY_UNIT)) id = string(":") + pIIR_LibraryUnit(d)->library_name->text.to_chars() + ":" + id; else if (d->declarative_region) id = get_long_name (d->declarative_region) + ":" + id; return id; } // prepend special characters like " with \ and return string. string get_escaped_string (const string str, const string escape_chars) { string id, result; // Convert declarator string to lower and add result to id for (unsigned int i = 0; i < str.size(); i++) { for (unsigned int j = 0; j < escape_chars.length(); j++) if (escape_chars[j] == str[i]) { result += string("\\"); break; } result += str[i]; } return result; } /* Return the prefix for the name of a new internal variable */ string get_new_internal_var_prefix() { return internal_prefix_start + to_string(internal_counter++); } /* Return a number which is unique within the current file. */ int get_unique_int_id() { return internal_counter++; } /* Set prefix for internal variables */ void set_internal_prefix_start(pIIR_DeclarativeRegion r, RegionStack &rstack) { internal_prefix_start = qid(r, rstack, id_type()) + "_" + internal_prefix_base; } /* Returns a pointer to the current active context info instance */ ContextInfo * ActiveContext(RegionStack &rstack) { pIIR_DeclarativeRegion r = ActiveDeclarativeRegion(rstack); return r != NULL? &context(r) : NULL; } pIIR_DeclarativeRegion ActiveDeclarativeRegion(RegionStack &rstack) { return rstack.back(); } /* Returns the next process, subprogram, concurrent assignement, package declaration, package body declaration, architecture or entity declarative region */ ContextInfo * BaseContext(RegionStack &rstack) { pIIR_DeclarativeRegion r = BaseDeclarativeRegion(rstack); return r != NULL? &context(r) : NULL; } pIIR_DeclarativeRegion BaseDeclarativeRegion(RegionStack &rstack) { if (rstack.size() == 0) return NULL; RegionStack::reverse_iterator iter = rstack.rbegin(); while (true) { // Search in reverse order until either a concurrent statement // region is found or the very first item on the list has been // visited if ((*iter)->is(IR_CONCURRENT_STATEMENT) || (*iter)->is(IR_PACKAGE_DECLARATION) || (*iter)->is(IR_PACKAGE_BODY_DECLARATION) || (*iter)->is(IR_SUBPROGRAM_DECLARATION) || (*iter)->is(IR_ARCHITECTURE_DECLARATION) || (*iter)->is(IR_ENTITY_DECLARATION)) return *iter; if (iter == rstack.rend()) break; iter--; } return NULL; } /* Returns the top level region which is either an architecture region, an entity region, a package body region or package declaration region */ ContextInfo * TopContext(RegionStack &rstack) { pIIR_DeclarativeRegion r = TopDeclarativeRegion(rstack); return r != NULL? &context(r) : NULL; } pIIR_DeclarativeRegion TopDeclarativeRegion(RegionStack &rstack) { if (rstack.size() == 0) return NULL; pIIR_DeclarativeRegion found = NULL; for (RegionStack::iterator iter = rstack.begin(); iter != rstack.end(); iter++) if ((*iter)->is(IR_PACKAGE_BODY_DECLARATION) || (*iter)->is(IR_PACKAGE_DECLARATION) || (*iter)->is(IR_ARCHITECTURE_DECLARATION) || (*iter)->is(IR_ENTITY_DECLARATION)) found = *iter; return found; } pIIR_DeclarativeRegion TopDeclarativeRegion(pIIR_DeclarativeRegion region) { if (region->declarative_region != NULL) return TopDeclarativeRegion(region->declarative_region); else return region; } /* Returns the upper most declarative region which has been added to store all the global code items */ pIIR_DeclarativeRegion RootDeclarativeRegion(RegionStack &rstack) { return (*rstack.begin()); } ContextInfo * RootContext(RegionStack &rstack) { pIIR_DeclarativeRegion r = RootDeclarativeRegion(rstack); return r != NULL? &context(r) : NULL; } pIIR_DeclarativeRegion get_combined_static_region(list &rlist, RegionStack &rstack) { pIIR_DeclarativeRegion region = ActiveDeclarativeRegion (rstack); do { for (list::iterator i = rlist.begin(); i != rlist.end(); i++) { if ((*i) == NULL) return ActiveDeclarativeRegion (rstack); if ((*i) == region) return region; } region = get_parent_declarative_region (region, rstack); } while (region != NULL); return RootDeclarativeRegion(rstack); } pIIR_DeclarativeRegion get_combined_static_region(pIIR_DeclarativeRegion r1, pIIR_DeclarativeRegion r2, RegionStack &rstack) { RegionStack::iterator iter = rstack.end(); if (r1 == NULL || r2 == NULL) return NULL; do { iter--; if ((*iter) == r1 || (*iter == r2)) return (*iter); } while (iter != rstack.begin()); return RootDeclarativeRegion(rstack); } /* for debugging */ int plot_rstack(RegionStack &rstack) { for (RegionStack::iterator iter = rstack.begin(); iter != rstack.end(); iter++) { cout << hex << "0x" << (long)*iter << dec <<" = "; if ((*iter)->is(IR_PACKAGE_BODY_DECLARATION)) cout << "IR_PACKAGE_BODY_DECLARATION" << endl; else if ((*iter)->is(IR_PACKAGE_DECLARATION)) cout << "IR_PACKAGE_DECLARATION" << endl; else if ((*iter)->is(IR_ARCHITECTURE_DECLARATION)) cout << "IR_ARCHITECTURE_DECLARATION" << endl; else if ((*iter)->is(IR_ENTITY_DECLARATION)) cout << "IR_ENTITY_DECLARATION" << endl; else if ((*iter)->is(IR_CONCURRENT_STATEMENT)) cout << "IR_CONCURRENT_STATEMENT" << endl; else if ((*iter)->is(IR_SUBPROGRAM_DECLARATION)) cout << "IR_SUBPROGRAM_DECLARATION" << endl; else cout << "???" << endl; } return 0; } /* for debugging */ void plot(string &str) { cout << str; } // Get the type declaration pIIR_TypeDeclaration get_declaration(pIIR_Type type) { if ((type->declaration == NULL) && (type->is(IR_SUBTYPE) && (implicit_subtype_declaration(pIIR_Subtype(type)) == NULL))) { if (type->is(IR_ARRAY_SUBTYPE)) { pIIR_ArraySubtype ast = pIIR_ArraySubtype(type); if (ast->immediate_base->declaration != NULL) return ast->immediate_base->declaration; else if (ast->immediate_base == ast) return get_declaration(ast->base); else return get_declaration(ast->immediate_base); } else if (type->is(IR_SCALAR_SUBTYPE)) { pIIR_ScalarSubtype sst = pIIR_ScalarSubtype(type); return get_declaration(sst->immediate_base); } } return type->declaration != NULL? type->declaration : implicit_subtype_declaration(pIIR_Subtype(type)); } // Get the immediate_base type pIIR_Type get_immediate_base_type(pIIR_Type type) { if (type->declaration == NULL) { if (type->is(IR_ARRAY_SUBTYPE)) type = ((pIIR_ArraySubtype)(type))->immediate_base; else if (type->is(IR_SCALAR_SUBTYPE)) type = ((pIIR_ScalarSubtype)(type))->immediate_base; } return type; } // Get base type or subtype the current type is derived from. I.e., // any subtype declarations which only add a resolution function are // skipped. pIIR_Type get_basic_type(pIIR_Type type) { if (type->is(IR_SCALAR_SUBTYPE)) { pIIR_ScalarSubtype sst = pIIR_ScalarSubtype(type); if (sst->range != NULL) return type; else return get_basic_type(sst->immediate_base); } else if (type->is(IR_ARRAY_SUBTYPE)) { pIIR_ArraySubtype ast = pIIR_ArraySubtype(type); if (ast->constraint != NULL) return type; else return get_basic_type(ast->immediate_base); } else if (type->is(IR_RECORD_SUBTYPE)) { pIIR_RecordSubtype rst = pIIR_RecordSubtype (type); return get_basic_type (rst->immediate_base); } else return type; } // Get base type of a type pIIR_Type get_base_type(pIIR_Type type) { if (type != type->base) return get_base_type(type->base); else return type; } // Convert locally static expression to int value. Returns false if // the expression is not locally static. bool expr_to_int(pIIR_Expression e, int &value, RegionStack &rstack) { // Return false if expression is not locally static if (e->static_level != IR_LOCALLY_STATIC) return false; pIIR_Type base = get_base_type(e->subtype); pIIR_AbstractLiteralExpression ae = pIIR_AbstractLiteralExpression(e); if (base->is(IR_INTEGER_TYPE)) { string val_str; if (!emit_expr(e, val_str, rstack, DEFAULT)) return false; value = atoi(val_str.c_str()); } else if (base->is(IR_ENUMERATION_TYPE)) { string literal_str = pIIR_EnumerationLiteral(ae->value)->declarator->text.to_chars(); value = literal_to_pos(pIIR_EnumerationType(base)->enumeration_literals, literal_str); } else // Return false if type is not an enumeration type or integer type return false; return true; } // Get enumeration pos of enumeration item int literal_to_pos(pIIR_EnumerationLiteralList enum_items, const string &literal_str) { for (pIIR_EnumerationLiteralList lit_list = enum_items; lit_list; lit_list = lit_list->rest) { if (lit_list->first->declarator->is(IR_IDENTIFIER)) { // Identifier enumeration item if (!strcmp(literal_str.c_str(), lit_list->first->declarator->text.to_chars())) return lit_list->first->enum_pos; } else if (lit_list->first->declarator->text.to_chars()[1] == literal_str.c_str()[1]) // Character enumeration item return lit_list->first->enum_pos; } return -1; } // Get enumeration literal associated with pos pIIR_EnumerationLiteral pos_to_literal(pIIR_EnumerationLiteralList enum_items, int literal_pos) { for (pIIR_EnumerationLiteralList lit_list = enum_items; lit_list; lit_list = lit_list->rest) if (lit_list->first->enum_pos == literal_pos) return lit_list->first; return NULL; } // Create an internal acl object which is used to store acl values at // simulation time. Return the name of the internal acl // object. private_acl determines whether the object will be used // privately or may be shared by several expressions. string create_internal_acl (const int size, RegionStack &rstack, bool private_acl) { pIIR_DeclarativeRegion active_region = ActiveDeclarativeRegion(rstack); // generate a name for a new acl object. If the internal object is // private then the name is generated by adding a serial number to // the standard prefix name. Otherwise, an additional string "_acl" // is appended to the prefix and the number determines the max // length of the acl instance. string internal_var_name = internal_prefix_start + (private_acl? to_string(internal_counter++) : "_acl" + to_string(size)); if (lookup_internal_object_declaration(active_region, internal_var_name) == NULL) insert_internal_object_declaration(NULL, active_region, NULL, internal_var_name, "pacl", "=new(" + to_string(size) + ") acl", DECLARE_LOCALLY); return internal_var_name; } // Lookup an internal object declaration with name "name" defined in // the declarative region "region" pV2CC_InternalObjectDeclaration lookup_internal_object_declaration(pIIR_DeclarativeRegion region, const string &name) { for (pIIR_DeclarationList decls = extended_declarations(region); decls; decls = decls->rest) { pIIR_Declaration obj = decls->first; if (obj->is(V2CC_INTERNAL_OBJECT_DECLARATION) && !strcmp(name.c_str(), obj->declarator->text.to_chars())) return pV2CC_InternalObjectDeclaration(obj); } return NULL; } // Return C++ type string of an internal object string get_internal_object_type_string(pV2CC_InternalObjectDeclaration decl, RegionStack &rstack) { // Test whether cpp_type_string contains a valid string value if (decl->cpp_type_string != "") return decl->cpp_type_string; else return qid(decl, rstack, TYPE); } // Return inital value string of an internal object string get_internal_object_initial_string(pV2CC_InternalObjectDeclaration decl, RegionStack &rstack) { // Test whether cpp_inital_string contains an valid type string if (decl->cpp_initial_string != "") return decl->cpp_initial_string; else { string str = ""; if (decl->initial_value) emit_expr (decl->initial_value, str, rstack, DEFAULT); return str; } } // Merge two static levels. The resulting level will be equal to the // smallest level of both. IR_StaticLevel merge_level(IR_StaticLevel sl1, IR_StaticLevel sl2) { if (IR_LOCALLY_STATIC == sl1 && IR_LOCALLY_STATIC == sl2) return IR_LOCALLY_STATIC; if (level_match(sl1, IR_GLOBALLY_STATIC) && level_match(sl2, IR_GLOBALLY_STATIC)) return IR_GLOBALLY_STATIC; return IR_NOT_STATIC; } // Get folded value from IIR_Root node StaticDataType & get_folded_value(pIIR_Root n) { if (n->is(IR_EXPRESSION)) return folded_value(pIIR_Expression(n)); else if (n->is(IR_ENUMERATION_LITERAL)) return folded_value(pIIR_EnumerationLiteral(n)); else if (n->is(IR_LITERAL)) return folded_value(pIIR_Literal(n)); else assert(false); } // Returns whether a valid folded value has been calculated from node // n bool valid_folded_value(pIIR_Root n) { if (n->is(IR_EXPRESSION)) return valid_folded_value(pIIR_Expression(n)); else if (n->is(IR_ENUMERATION_LITERAL)) return valid_folded_value(pIIR_EnumerationLiteral(n)); else if (n->is(IR_LITERAL)) return valid_folded_value(pIIR_Literal(n)); else assert(false); } int get_scalar_count(pIIR_Type type, bool &success) { if (type->is(IR_ARRAY_TYPE)) { return get_scalar_count(pIIR_ArrayType(type)->element_type, success); } else if (type->is(IR_ARRAY_SUBTYPE)) { } else if (type->is(IR_RECORD_TYPE)) { // Sorry, but records are not supported yet assert(false); } else { success = true; return 1; } } static decl_flag_list::iterator find_decl_in_list (decl_flag_list &l, pIIR_Declaration d) { for (decl_flag_list::iterator i = l.begin(); i != l.end (); i++) if ((*i).first == d) return i; return l.end (); } void merge (decl_flag_list &pm, pIIR_Type type, RegionStack &rstack) { if (type->is(IR_SUBTYPE)) { // First, explore immediate base type. This is necessary in order // to gather all required info about the type. Note false is // passed over as last parameter here because we actually do not // need the list of accessed objects as determined by // explore_and_check. explore_and_check(pIIR_Subtype(type)->immediate_base, rstack, false); // Next, merge subtype into map merge(pm, pIIR_Subtype(type)->immediate_base, rstack); } if (type->declaration == NULL) return; pIIR_Declaration decl = type->declaration; // Try to find corresponding entry in list decl_flag_list::iterator iter = find_decl_in_list (pm, decl); // Insert new entry if pointer is not on the list. The boolean value // is set to false. If it is already on the list, simply return. // This avoids endless recursion in case access types form cycles. if (iter != pm.end()) return; // First recurse to merge referenced types that need to be defined // prior to this type. if (type->is(IR_ARRAY_TYPE)) { // For array types merge index types as well element type for (pIIR_TypeList tl = pIIR_ArrayType(type)->index_types; tl; tl = tl->rest) merge(pm, tl->first, rstack); merge(pm, pIIR_ArrayType(type)->element_type, rstack); } else if (type->is(IR_RECORD_TYPE)) { // For record types merge element types pIIR_RecordType rt = pIIR_RecordType (type); for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) merge (pm, edl->first->subtype, rstack); } else if (type->is(IR_ACCESS_TYPE)) { // For access types merge desiganted type. merge(pm, pIIR_AccessType(type)->designated_type, rstack); } // Now append this type. pm.push_back (decl_flag_list::value_type (decl,false)); } void merge (decl_flag_list &pm, pIIR_Declaration decl, RegionStack &rstack) { // Try to find corresponding entry in list and simply return when it // is found. decl_flag_list::iterator iter = find_decl_in_list (pm, decl); if (iter != pm.end()) return; // First merge all declarations referenced by this one if (decl->is(IR_TYPE_DECLARATION)) { // If decl is a type decalration then use the special merge // function. merge(pm, pIIR_TypeDeclaration(decl)->type, rstack); return; } else if (decl->is(IR_SUBPROGRAM_DECLARATION)) { // If decl is a subprogram then the type of the subprogram // parameters must be merged. pIIR_SubprogramDeclaration subprog = pIIR_SubprogramDeclaration(decl); for (pIIR_InterfaceList il = subprog->interface_declarations; il; il = il->rest) merge(pm, get_basic_type(il->first->subtype), rstack); // If decl is a function then merge the return type of the // function as well. if (decl->is(IR_FUNCTION_DECLARATION)) merge(pm, pIIR_FunctionDeclaration(decl)->return_type, rstack); } else if (decl->is(IR_OBJECT_DECLARATION)) { // If decl is a object declaration, its subtype must be merged. merge (pm, pIIR_ObjectDeclaration (decl)->subtype, rstack); } // XXX - there are probably more cases to consider here. The whole // external_decls business needs to be rethought, I'm afraid. We // should just `merge' while we `explore_and_check'. Also, // decl_pointer_bool_map needs to be an ordered collection. // Now append this declaration pm.push_back (decl_flag_list::value_type (decl,false)); } void merge (decl_flag_list &pm, pIIR_DeclarationList decls, RegionStack &rstack) { for (pIIR_DeclarationList dl = decls; dl; dl = dl->rest) merge (pm, dl->first, rstack); } /* Check whether a scalar integer, enumeration or physical value e is * within the bound sepcified by the target type. print_error controls * whether an error message is printed whenever the bounds check fails * or just the number of errors are returnd. Node n is used to * determine the line number and source file name if an error message * should be printed. runtime_checks returns the checks that must be * performed at runtime. error_prefix_str will be prepended to the * error message in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, lint e, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error, string error_prefix_str) { int error_count = 0; pIIR_Type target_base_type = get_base_type(target_type); // Determine range of target type vector range_des_vec = get_discrete_range(target_type, rstack, IR_NOT_STATIC); error_count += range_des_vec[0].constant_fold_rangedes(rstack); if (error_count != 0) return error_count; StaticRangeDescriptor range = range_des_vec[0].rangedes_to_lint(rstack); string left_str = to_string(range.left); string right_str = to_string(range.right); if (!range.valid[1]) { // If the range is not static then do not perform any furhter // checks. All checks will be done at runtime. runtime_checks |= RT_CHECK_DIRECTION | RT_CHECK_LEFT_BOUND | RT_CHECK_RIGHT_BOUND; return error_count; } if (!range.valid[0]) { // If bound is not static then store that the value must be // checked against this bound at runtime. range.left = range.dir == IR_DIRECTION_UP? PHYSICAL_MIN : PHYSICAL_MAX; left_str = "?"; runtime_checks |= RT_CHECK_LEFT_BOUND; } if (!range.valid[2]) { // If bound is not static then store that the value must be // checked against this bound at runtime. range.right = range.dir == IR_DIRECTION_UP? PHYSICAL_MAX : PHYSICAL_MIN; right_str = "?"; runtime_checks |= RT_CHECK_RIGHT_BOUND; } if (target_base_type->is(IR_ENUMERATION_TYPE)) { // ***************************************************** // Enumeration type // ***************************************************** if (range.left != PHYSICAL_MIN) left_str = pos_to_literal(pIIR_EnumerationType(target_base_type)->enumeration_literals, (int)range.left) ->declarator->text.to_chars(); if (range.right != PHYSICAL_MAX) right_str = pos_to_literal(pIIR_EnumerationType(target_base_type)->enumeration_literals, (int)range.right) ->declarator->text.to_chars(); if (e < range.left || e > range.right) { if (print_error) if (is_implicit_subtype(target_type)) // If the traget type is an implicit type then do not print // any range information as this is automatically done by // the error method! codegen_error.error("%:error:%s enumeration value is not within bounds of type %n.", n, error_prefix_str.c_str(), target_type); else codegen_error.error("%:error:%s enumeration value is not within bounds of type %n. " "Range of type %n is %s to %s.", n, error_prefix_str.c_str(), target_type, target_type, left_str.c_str(), right_str.c_str()); error_count++; } } else if (target_base_type->is(IR_INTEGER_TYPE)) { // ***************************************************** // Integer type // ***************************************************** if ((range.dir == IR_DIRECTION_DOWN && (e < range.right || e > range.left)) || (range.dir != IR_DIRECTION_DOWN && (e > range.right || e < range.left))) { if (print_error) if (is_implicit_subtype(target_type)) // If the traget type is an implicit type then do not print // any range information as this is automatically done by // the error method! codegen_error.error("%:error:%s integer value %i is not within bounds of type %n.", n, error_prefix_str.c_str(), (int)e, target_type); else codegen_error.error("%:error:%s integer value %i is not within bounds of type %n. " "Range of type %n is %s %s %s.", n, error_prefix_str.c_str(), (int)e, target_type, target_type, left_str.c_str(), (range.dir == IR_DIRECTION_DOWN? "downto":"to"), right_str.c_str()); error_count++; } } else if (target_base_type->is(IR_PHYSICAL_TYPE)) { // ***************************************************** // Physical type // ***************************************************** string value_str = to_string(e); if ((range.dir == IR_DIRECTION_DOWN && (e < range.right || e > range.left)) || (range.dir != IR_DIRECTION_DOWN && (e > range.right || e < range.left))) { if (print_error) if (is_implicit_subtype(target_type)) // If the traget type is an implicit type then do not print // any range information as this is automatically done by // the error method! codegen_error.error("%:error:%s pyhsical value %s is not within bounds of type %n.", n, error_prefix_str.c_str(), value_str.c_str(), target_type); else codegen_error.error("%:error:%s pyhsical value %s is not within bounds of type %n. " "Range of type %n is %s %s %s.", n, error_prefix_str.c_str(), value_str.c_str(), target_type, target_type, left_str.c_str(), (range.dir == IR_DIRECTION_DOWN? "downto":"to"), right_str.c_str()); error_count++; } } else { assert(false); } return error_count; } /* Check whether a scalar floating point value e is within the bound * sepcified by the target type. print_error controls whether an error * message is printed whenever the bounds check fails or just the * number of errors are returnd. Node n is used to determine the line * number and source file name if an error message should be * printed. runtime_checks returns the checks that must be performed * at runtime. error_prefix_str will be prepended to the error message * in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, double e, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error, string error_prefix_str) { int error_count = 0; pIIR_Type target_base_type = get_base_type(target_type); // Bail out if target type is not an floating point type assert(target_base_type->is(IR_FLOATING_TYPE)); // Determine range of target type vector range_des_vec = get_discrete_range(target_type, rstack, IR_NOT_STATIC); error_count += range_des_vec[0].constant_fold_rangedes(rstack); if (error_count != 0) return error_count; StaticRangeDescriptor range = range_des_vec[0].rangedes_to_double(rstack); string left_str = to_string(range.left); string right_str = to_string(range.right); if (!range.valid[1]) { // If the range is not static then do not perform any furhter // checks. All checks will be done at runtime. runtime_checks |= RT_CHECK_DIRECTION | RT_CHECK_LEFT_BOUND | RT_CHECK_RIGHT_BOUND; return error_count; } if (!range.valid[0]) { // If bound is not static then store that the value must be // checked against this bound at runtime. range.left = range.dir == IR_DIRECTION_UP? -HUGE_VAL : HUGE_VAL; left_str = "?"; runtime_checks |= RT_CHECK_LEFT_BOUND; } if (!range.valid[2]) { // If bound is not static then store that the value must be // checked against this bound at runtime. range.right = range.dir == IR_DIRECTION_UP? HUGE_VAL : -HUGE_VAL; right_str = "?"; runtime_checks |= RT_CHECK_RIGHT_BOUND; } if ((range.dir == IR_DIRECTION_DOWN && (e < range.right || e > range.left)) || (range.dir != IR_DIRECTION_DOWN && (e > range.right || e < range.left))) { if (print_error) if (is_implicit_subtype(target_type)) // If the traget type is an implicit type then do not print // any range information as this is automatically done by // the error method! codegen_error.error("%:error:%s floating point value %f is not within bounds of type %n.", n, error_prefix_str.c_str(), e, target_type); else codegen_error.error("%:error:%s floating point value %f is not within bounds of type %n. " "Range of type %n is %f %s %f.", n, error_prefix_str.c_str(),e, target_type, target_type, range.left, (range.dir == IR_DIRECTION_DOWN? "downto":"to"), range.right); error_count++; } return error_count; } /* Check whether a folded value value is within the bound sepcified by * the target type. print_error controls whether an error message is * printed whenever the bounds check fails or just the number of * errors are returned. Node n is used to determine the line number * and source file name if an error message should be * printed. runtime_checks returns the checks that must be performed * at runtime. error_prefix_str will be prepended to the error message * in case of an error. */ int check_scalar_against_bounds(pIIR_Root n, StaticDataType &value, pIIR_Type target_type, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error, string error_prefix_str) { if (get_base_type(target_type)->is(IR_FLOATING_TYPE)) return check_scalar_against_bounds(n, value.double_value(), target_type, rstack, runtime_checks, print_error, error_prefix_str); else return check_scalar_against_bounds(n, value.long_value(), target_type, rstack, runtime_checks, print_error, error_prefix_str); } /* Check whether the source matches target type */ int check_for_target_type(pIIR_Root n, pIIR_Type target_type, pIIR_Expression source, RegionStack &rstack, RuntimeCheckFlags &runtime_checks, bool print_error, string error_prefix_str) { int error_count = 0; if (is_scalar_type(target_type)) { // If target_type is scalar then source must be scalar as // well. This should have been already checked by the parser. assert(is_scalar_type(source->subtype)); // If the source value could be folded then check whether it is in // bounds of the target_type if (valid_folded_value(source)) return check_scalar_against_bounds(n, folded_value(source), target_type, rstack, runtime_checks, print_error, error_prefix_str); else runtime_checks |= RT_CHECK_LEFT_BOUND | RT_CHECK_RIGHT_BOUND; } else if (is_array_type(target_type)) { // If target_type is an array then source must be an array as well. assert(is_array_type(source->subtype)); if (!is_constrained_array_type(target_type)) { // If target_type array is unconstrained then we cannot check // the assignemnt at compile time. Further, the array aggregate // must not contain an others clause! if (source->is(IR_ARRAY_AGGREGATE)) { for (pIIR_IndexedAssociationList a = pIIR_ArrayAggregate(source)->indexed_association_list; a; a = a->rest) if (a->first->is(IR_OTHERS_INDEXED_ASSOCIATION)) { if (print_error) codegen_error.error("%:error:%s others must not be used in array aggregate if target type is unconstrained.", n, error_prefix_str.c_str()); error_count++; } } runtime_checks |= RT_CHECK_LEFT_ARRAY_BOUND | RT_CHECK_RIGHT_ARRAY_BOUND; } else if (!is_constrained_array_type(source->subtype)) { // If source array is unconstrained then we cannot check the // assignemnt at compile time. runtime_checks |= RT_CHECK_LEFT_ARRAY_BOUND | RT_CHECK_RIGHT_ARRAY_BOUND; } else { // Get bounds of target_type and source arrays vector range_desc_target = get_discrete_range(target_type, rstack, IR_NOT_STATIC); vector range_desc_source = get_discrete_range(source->subtype, rstack, IR_NOT_STATIC); // Check each dimension const int dim_count = range_desc_target.size(); for (int dim = 0; dim < dim_count; dim++) { // Try to determine bounds now! StaticRangeDescriptor target_range = range_desc_target[dim].rangedes_to_lint(rstack); StaticRangeDescriptor source_range = range_desc_source[dim].rangedes_to_lint(rstack); lint target_length, source_length; // If we could determine bounds and direction at compile time // then check wether the array length matches. if (and_reduce(target_range.valid) && (and_reduce(source_range.valid) || valid_folded_value(source))) { target_length = range_to_length(target_range.left, target_range.dir, target_range.right); source_length = valid_folded_value(source)? folded_value(source).array_literal_value().size() : range_to_length(source_range.left, source_range.dir, source_range.right); // Report an error if array length do not match if (source_length != target_length) { if (print_error) { // If we have more than a single dimension then also // output the dimension number string dim_str = dim_count == 1? "" : "(dimension " + to_string(dim + 1) + ")"; codegen_error.error("%:error:%s array length mismatch%s. " "Target array type has length %i while source array has length %i.", n, error_prefix_str.c_str(), dim_str.c_str(), (int)target_length, (int)source_length); } error_count++; } } else // Ok, we could not determine the array bounds at compile // time. Hence, range checking must be done at runtime. runtime_checks |= RT_CHECK_LEFT_ARRAY_BOUND | RT_CHECK_RIGHT_ARRAY_BOUND; } } } else if (get_base_type(target_type)->is(IR_RECORD_TYPE)) { // XXX - perform checking of record elements. return error_count; } else if (get_base_type(target_type)->is(IR_ACCESS_TYPE)) { return error_count; } else assert(false); return error_count; } // ****************************************************************************************** // Name: insert_internal_object_declaration, set of functions // // Description: Creates an internal object declaration and inserts it // into the corresponding declaration list. The new item is inserted // right before *listp. region points to the declarative region the // new item belongs to. type_str is the C++ type of the item while // initial_str stores its initial value. Alternatively, the type may // be specified by a pIIR_Type pointer and the intial value may be // defined by a pIIR_Expression. // // Return value: returns pointer to new internal object declaration // // ****************************************************************************************** pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, const string &type_str, const string &initial_str, int flags) { // If listp is not specified then append the new item to the end of // the list if (listp == NULL) listp = get_last_rest_address(&extended_declarations(region)); pV2CC_InternalObjectDeclaration obj = new V2CC_InternalObjectDeclaration(pos /* pIIR_PosInfo */, to_TextLiteral(name) /* declarator name */, region /* declaration region */, NULL /* attribute value list */, 0 /* seqno */ , NULL /* type */ , NULL /* initial value expression */, NULL /* aliased object declaration */, (string)type_str /* type string */, (string)initial_str /* initial value string */, flags /* some flags */); *listp = new IIR_DeclarationList(obj->pos, obj, *listp); return obj; } pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, pIIR_Type type, const string &initial_str, int flags) { // If listp is not specified then append the new item to the end of // the list if (listp == NULL) listp = get_last_rest_address(&extended_declarations(region)); pV2CC_InternalObjectDeclaration obj = new V2CC_InternalObjectDeclaration(pos /* pIIR_PosInfo */, to_TextLiteral(name) /* declarator name */, region /* declaration region */, NULL /* attribute value list */, 0 /* seqno */ , type /* type */ , NULL /* initial value expression */, NULL /* aliased object declaration */, "" /* type string */, (string)initial_str /* initial value string */, flags /* some flags */); *listp = new IIR_DeclarationList(obj->pos, obj, *listp); return obj; } pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, const string &type_str, pIIR_Expression initial, int flags) { // If listp is not specified then append the new item to the end of // the list if (listp == NULL) listp = get_last_rest_address(&extended_declarations(region)); pV2CC_InternalObjectDeclaration obj = new V2CC_InternalObjectDeclaration(pos /* pIIR_PosInfo */, to_TextLiteral(name) /* declarator name */, region /* declaration region */, NULL /* attribute value list */, 0 /* seqno */ , NULL /* type */ , initial /* initial value expression */, NULL /* aliased object declaration */, (string)type_str /* type string */, "" /* initial value string */, flags /* some flags */); *listp = new IIR_DeclarationList(obj->pos, obj, *listp); return obj; } pV2CC_InternalObjectDeclaration insert_internal_object_declaration(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, pIIR_PosInfo pos, const string &name, pIIR_Type type, pIIR_Expression initial, int flags) { // If listp is not specified then append the new item to the end of // the list if (listp == NULL) listp = get_last_rest_address(&extended_declarations(region)); pV2CC_InternalObjectDeclaration obj = new V2CC_InternalObjectDeclaration(pos /* pIIR_PosInfo */, to_TextLiteral(name) /* declarator name */, region /* declaration region */, NULL /* attribute value list */, 0 /* seqno */ , type /* type */ , initial /* initial value expression */, NULL /* aliased object declaration */, "" /* type string */, "" /* initial value string */, flags /* some flags */); *listp = new IIR_DeclarationList(obj->pos, obj, *listp); return obj; } // ****************************************************************************************** // Name: insert_internal_code, function // // Description: Creates an internal object which contains code to be // included into the generated C++ code. hdr contains header code to // be prepended to the C++ code while impl stores the actual // implementation code. Usually, this object is used to store the code // generated from VHDL subporogram declarations. In this case, hdr // contains the C++ interface definition of the subprogram while impl // stores its implementation code. // // Return value: returns pointer to new internal object declaration // // ****************************************************************************************** pV2CC_InternalCode insert_internal_code(pIIR_DeclarationList *listp, pIIR_DeclarativeRegion region, const string &name, const string &hdr, const string &impl, int flags) { // If listp is not specified then append the new item to the end of // the list if (listp == NULL) listp = get_last_rest_address(&extended_declarations(region)); pV2CC_InternalCode obj = new V2CC_InternalCode(NULL /* pIIR_PosInfo */, to_TextLiteral(name) /* declarator name */, region /* declaration region */, NULL /* attribute value list */, 0 /* seqno */ , NULL /* type */ , NULL /* initial value expression */, NULL /* aliased object declaration */, (string)hdr /* header string */, (string)impl /* initial value string */, flags /* some flags */ ); *listp = new IIR_DeclarationList(obj->pos, obj, *listp); return obj; } // ****************************************************************************************** // Name: m_get_object_declaration , generic function // // Description: Returns the object declaration a reference expression // is based on. E.g. an expression "sig(3 downto 1)" will return the // object declaration pointer associated with "sig". Note that if the // prefix is a signal kind attribute then this signal attribute object // is returned! // // Return value: returns object declaration // // ****************************************************************************************** pIIR_ObjectDeclaration m_get_object_declaration(pIIR_ObjectReference mor) { return NULL; } pIIR_ObjectDeclaration m_get_object_declaration(pIIR_SimpleReference sr) { return sr->object; } pIIR_ObjectDeclaration m_get_object_declaration(pIIR_SliceReference slr) { return get_object_declaration(slr->array); } pIIR_ObjectDeclaration m_get_object_declaration(pIIR_SignalAttr asr) { codegen_error.error("%:error: sorry, currently no signal kind attributes are supported", asr); return NULL; } pIIR_ObjectDeclaration m_get_object_declaration(pIIR_ArrayReference ar) { return get_object_declaration(ar->array); } pIIR_ObjectDeclaration m_get_object_declaration(pIIR_RecordReference rr) { return get_object_declaration(rr->record); } // ****************************************************************************************** // Name: m_get_discrete_range , generic function // // Description: Returns an array of RangeDescriptors derived from the // first parameter. Note that usually this function is called to // determine the bounds on an scalar type or the index bounds on an // array. In most cases it will return an array containing only a // single element. However, when called to extract the index ranges // from an array several RangeDescriptors may be returned where each // one covers another index range. // // Return value: RangeDescriptor (see v2cc.h) // // ****************************************************************************************** vector m_get_discrete_range(pIIR_EnumerationType et, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; pIIR_EnumerationLiteral left, right; left = et->enumeration_literals->first; for (pIIR_EnumerationLiteralList el = et->enumeration_literals; el; el = el->rest) if (el->rest == NULL) // Store right bound right = el->first; bounds.push_back(RangeDescriptor(left, IR_DIRECTION_UP, right, IR_LOCALLY_STATIC)); return bounds; } vector m_get_discrete_range(pIIR_IntegerType it, RegionStack &rstack, IR_StaticLevel slevel) { return get_discrete_range(pIIR_ScalarSubtype(it->declaration->type)->range, rstack, slevel); } vector m_get_discrete_range(pIIR_PhysicalType pt, RegionStack &rstack, IR_StaticLevel slevel) { return get_discrete_range(pIIR_ScalarSubtype(pt->declaration->type)->range, rstack, slevel); } vector m_get_discrete_range(pIIR_FloatingType ft, RegionStack &rstack, IR_StaticLevel slevel) { return get_discrete_range(pIIR_ScalarSubtype(ft->declaration->type)->range, rstack, slevel); } vector m_get_discrete_range(pIIR_ScalarSubtype st, RegionStack &rstack, IR_StaticLevel slevel) { if (st->range == NULL) { // If no discrete array range is defined then try to get the range // from the base type of the current type return get_discrete_range(st->immediate_base, rstack, slevel); } else { // Get the range of the type vector bounds = get_discrete_range(st->range, rstack, slevel); // Test static level of the exracted range(s). If no bound with // the required static range could be extracted then try to // extract an appropriate range from the base type of the current // type. Otherwise return bounds. if (bounds.size() == 0) return get_discrete_range(st->immediate_base, rstack, slevel); else return bounds; } } vector m_get_discrete_range(pIIR_ExplicitRange r, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; // If both bounds matche the required static level then create a // corresponding RangeDescriptor from the range. Otherwise return an // empty RangeDescriptor vector. if (level_match(r->left->static_level, slevel) && level_match(r->right->static_level, slevel)) { IR_StaticLevel new_level = merge_level(r->left->static_level, r->right->static_level); bounds.push_back(RangeDescriptor(r->left, r->direction, r->right, new_level)); } return bounds; } vector m_get_discrete_range(pIIR_ArraySubtype ast, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; if (ast->constraint == NULL) return get_discrete_range(ast->immediate_base, rstack, slevel); for (pIIR_TypeList tl = ast->constraint; tl; tl = tl->rest) { vector new_bound = get_discrete_range(tl->first, rstack, slevel); assert (new_bound.size() <= 1); bounds.push_back(new_bound[0]); } return bounds; } vector m_get_discrete_range(pIIR_ArrayType at, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) { vector new_bound = get_discrete_range(tl->first, rstack, slevel); assert (new_bound.size() <= 1); bounds.push_back(new_bound[0]); } return bounds; } vector m_get_discrete_range(pIIR_Attr_ArrayRANGE atr, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; bounds.push_back(RangeDescriptor(atr)); return bounds; } vector m_get_discrete_range(pIIR_Attr_ArrayREVERSE_RANGE atr, RegionStack &rstack, IR_StaticLevel slevel) { vector bounds; bounds.push_back(RangeDescriptor(atr)); return bounds; } vector m_get_discrete_range(pIIR_SliceReference sr, RegionStack &rstack, IR_StaticLevel slevel) { return get_discrete_range(sr->range, rstack, slevel); } freehdl-0.0.7/v2cc/v2cc-const-fold.cc0000644000175000017500000014053110755353077014137 00000000000000#include #include "v2cc-chunk.h" #include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "mapping.h" #include "v2cc-util.h" // Used to generate error messages extern vaul_error_printer codegen_error; // ****************************************************************************************** // Name: m_constant_fold, generic function // // Description: performs constant folding optimizations on nodes // // Return value: returns number of errors found during folding // // ****************************************************************************************** int m_constant_fold (pIIR_Type st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; if (st->declaration != NULL) error_count += constant_fold(st->declaration->type, rstack); return error_count; } int m_constant_fold (pIIR_PhysicalType st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; if (st->base != NULL) error_count += constant_fold(st->base, rstack); for (pIIR_UnitList ul = st->units; ul; ul = ul->rest) if (ul->first->multiplier) error_count += constant_fold(ul->first->multiplier, rstack); return error_count; } int m_constant_fold (pIIR_ScalarSubtype st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(st->immediate_base, rstack); if (st->range != NULL) error_count += constant_fold(st->range, rstack); return error_count; } int m_constant_fold (pIIR_ArrayType st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; for (pIIR_TypeList tl = st->index_types; tl; tl = tl->rest) error_count += constant_fold(tl->first, rstack); error_count += constant_fold(st->element_type, rstack); return error_count; } int m_constant_fold (pIIR_ArraySubtype st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(st->immediate_base, rstack); for (pIIR_TypeList tl = st->constraint; tl; tl = tl->rest) error_count += constant_fold(tl->first, rstack); return error_count; } int m_constant_fold (pIIR_QualifiedExpression e, RegionStack &rstack) { if (done(e) & CONST_FOLD) return 0; else done(e) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(e->type_mark, rstack); error_count += constant_fold(e->expression, rstack); return error_count; } int m_constant_fold(pIIR_AttrSigFunc ase, RegionStack &rstack) { if (done(ase) & CONST_FOLD) return 0; else done(ase) |= CONST_FOLD; int error_count = constant_fold(ase->signal, rstack); return error_count; } int m_constant_fold(pIIR_ArrayLiteralExpression le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; int error_count = 0; // Get the valid enumeration items pIIR_EnumerationLiteralList enum_item_list = pIIR_EnumerationType(get_base_type(pIIR_ArrayType(get_base_type(le->subtype))->element_type))->enumeration_literals; char *str = le->value->text.to_chars() + 1; // Skip leading " int length = strlen(str) - 1; // Get length of array vector literal_value(length); // Get enumeration pos for each item int i = 0; string item = "'"; while (true) { if (*str == '"' && *(str + 1) == '\0') break; // Skip trailing " item = string("'") + *str + string("'"); literal_value[i] = literal_to_pos(enum_item_list, item); i++; str++; } // Store folded value folded_value(le).array_literal_value() = literal_value; valid_folded_value(le) = true; // Currently array literals are not folded! return error_count; } int m_constant_fold(pIIR_EnumLiteralReference le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; int error_count = constant_fold(le->value, rstack); folded_value(le).long_value() = le->value->enum_pos; valid_folded_value(le) = true; return error_count; } int m_constant_fold(pIIR_CharacterLiteral le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; int error_count = 0; folded_value(le).long_value() = (long long int)(le->text.to_chars())[1]; valid_folded_value(le) = true; return error_count; } int m_constant_fold(pIIR_StringLiteral le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; int error_count = 0; // String literals are currently not folded return error_count; } int m_constant_fold(pIIR_EnumerationLiteral el, RegionStack &rstack) { if (done(el) & CONST_FOLD) return 0; else done(el) |= CONST_FOLD; folded_value(el).long_value() = lint(el->enum_pos); valid_folded_value(el) = true; return 0; } int m_constant_fold(pIIR_IntegerLiteral le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; pair result = string_to_lint (le->text.to_chars()); folded_value(le) = result.second; valid_folded_value(le) = result.first; // Retrun an error of the constant could not be folded! return result.first? 0 : 1; } int m_constant_fold(pIIR_FloatingPointLiteral le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; pair result = string_to_double (le->text.to_chars()); folded_value(le) = result.second; valid_folded_value(le) = result.first; // Retrun an error of the constant could not be folded! return result.first? 0 : 1; } int m_constant_fold(pIIR_AbstractLiteralExpression ale, RegionStack &rstack) { if (done(ale) & CONST_FOLD) return 0; else done(ale) |= CONST_FOLD; int error_count = constant_fold(ale->value, rstack); if (valid_folded_value(ale->value)) { folded_value(ale) = folded_value(ale->value); valid_folded_value(ale) = valid_folded_value(ale->value); } return error_count; } // function is used to fold a scalar value template T perform_operation(pIIR_FunctionCall fc, A a) { string op_str = fc->function->declarator->text.to_chars(); if (op_str == "\"not\"") return T(int(a)? 0 : 1); else if (op_str == "\"+\"") return T(a); else if (op_str == "\"-\"") return T(A(-1) * a); else if (op_str == "\"abs\"") return T((a < 0)? -a : a); else assert(false); } // Returns 0 if parameter is equal to 0, -1 if the parameter is less // than 0, 1 otherwise template int sign(const X a) { if (a == X(0)) return 0; else if (a < X(0)) return -1; else return 1; } // Overloaded functions returning the min/max values of the // corresponding type. Note that the parameter dummy is actually only // used to select the corresponding function. double max_huge_value(double dummy) { return HUGE_VAL; } double min_huge_value(double dummy) { return -HUGE_VAL; } lint max_huge_value(lint dummy) { return PHYSICAL_MAX; } lint min_huge_value(lint dummy) { return PHYSICAL_MIN; } //******************************************************* // Add operations //******************************************************* template X calculate_plus(const X a, const Y b) { X result = a + b; // Check whether the sign of the result is ok if (abs(sign(a) + sign(b)) == 2 && sign(a) != sign(result)) // If the result is wrong then return either the max or the min // lint value return sign(a)==1? max_huge_value(a) : min_huge_value(a); else // Return result of the operation return result; } double calculate_plus(const double a, const double b) { return a + b; // If doubles are added we don't have to check the // result as this is done by the floating point operator } //******************************************************* // Subtract operations //******************************************************* template X calculate_minus(const X a, const Y b) { X result = a - b; // Check whether the sign of the result is ok if (abs(sign(a) - sign(b)) == 2 && sign(a) != sign(result)) // If the result is wrong then return either the max or the min // lint value return sign(a)==1? max_huge_value(a) : min_huge_value(a); else // Return result of the operation return result; } double calculate_minus(const double a, const double b) { return a - b; // If doubles are subtracted we don't have to check // the result as this is done by the floating point operator } //******************************************************* // Multiply operations //******************************************************* template X calculate_mult(const X a, const Y b) { X result = a * b; // Check whether at least one parameter is equal to 0 or the result // is reasonable. Note that we will compare result / a == b as well // as result / b == a as X and Y may be different types (e.g., // double and long long int). if (a == X(0) || b == Y(0) || (Y(result / a) == b) || (X(result / b) == a)) return result; else return sign(a) * sign(b) == -1? min_huge_value(a) : max_huge_value(a); } double calculate_mult(const double a, const double b) { return a * b; // If doubles are multiplied we don't have to check // the result as this is done by the floating point operator } //******************************************************* // Divide operations //******************************************************* template X calculate_div(const X a, const Y b) { // Check second parameter if (b == Y(0)) // If the second parameter is 0 then return either the maximum // lint or the min lint value depending on the sign of the first // parameter return sign(a) == -1? min_huge_value(a) : max_huge_value(a); else return X(a / b); } double calculate_div(const double a, const double b) { return a / b; // If doubles are divided we don't have to check // the result as this is done by the floating point operator } // function is used to fold two scalar values template T perform_operation(pIIR_FunctionCall fc, A a, B b) { string op_str = fc->function->declarator->text.to_chars(); if (op_str == "\"and\"") return T(int(a) & int(b)? 1 : 0); else if (op_str == "\"or\"") return T(int(a) | int(b)? 1 : 0); else if (op_str == "\"xor\"") return T(int(a) ^ int(b) ? 1 : 0); else if (op_str == "\"xnor\"") return T(1 ^ (int(a) ^ int(b)) ? 1 : 0); else if (op_str == "\"nand\"") return T(1 ^ (int(a) & int(b)) ? 1 : 0); else if (op_str == "\"nor\"") return T(1 ^ (int(a) | int(b)) ? 1 : 0); else if (op_str == "\"=\"") return T((a == b)? 1 : 0); else if (op_str == "\">\"") return T((a > b)? 1 : 0); else if (op_str == "\">=\"") return T((a > b)? 1 : 0); else if (op_str == "\"<=\"") return T((a <= b)? 1 : 0); else if (op_str == "\"<\"") return T((a < b)? 1 : 0); else if (op_str == "\"/=\"") return T((a != b)? 1 : 0); else if (op_str == "\"=\"") return T((a == b)? 1 : 0); else if (op_str == "\"+\"") return T(calculate_plus(a, b)); else if (op_str == "\"-\"") return T(calculate_minus(a, b)); else if (op_str == "\"*\"") return T(calculate_mult(a, b)); else if (op_str == "\"/\"") return T(calculate_div(a, b)); else if (op_str == "\"mod\"") assert(false); else if (op_str == "\"rem\"") assert(false); else if (op_str == "\"**\"") { return T(calculate_pow(a, b)); } else assert(false); } int m_constant_fold(pIIR_FunctionCall fc, RegionStack &rstack) { if (done(fc) & CONST_FOLD) return 0; else done(fc) |= CONST_FOLD; int error_count = 0; int n_args = 0; int try_function_folding = true; // Try to fold function parameters for (pIIR_AssociationList al = fc->parameter_association_list; al; al = al->rest) { error_count += constant_fold(al->first->actual, rstack); if (!valid_folded_value(al->first->actual)) try_function_folding = false; n_args++; } // Return if not all prameters are locally static! if (!try_function_folding) return error_count; // Now, try to fold function call switch (get_operator_type(fc->function)) { // Analyze function call type case STD_OP: // The function call is a standard operator call if (n_args == 1) { //********************************************************************** // Function has one parameter //********************************************************************** pIIR_Type base_type = get_base_type(fc->parameter_association_list->first->actual->subtype); if (base_type->is(IR_INTEGER_TYPE) || base_type->is(IR_ENUMERATION_TYPE) || base_type->is(IR_PHYSICAL_TYPE)) { lint arg = folded_value(fc->parameter_association_list->first->actual).long_value(); folded_value(fc).long_value() = perform_operation(fc, arg); } else if (base_type->is(IR_FLOATING_TYPE)) { double arg = folded_value(fc->parameter_association_list->first->actual).double_value(); folded_value(fc).double_value() = perform_operation(fc, arg); } else assert(false); } else if (n_args == 2) { //********************************************************************** // Function has two parameters //********************************************************************** pIIR_Type base_type1 = get_base_type(fc->parameter_association_list->first->actual->subtype); pIIR_Type base_type2 = get_base_type(fc->parameter_association_list->rest->first->actual->subtype); pIIR_Type result_type = get_base_type(fc->subtype); if (is_array_type(result_type)) { //********************************************************************** // Two arrays (or an array and an array element, or two array elements) are // concatenated string op_str = fc->function->declarator->text.to_chars(); // Only the concatenation operator is predefined for arrays assert(op_str == "\"&\""); // First, determine length of arguments int length1 = is_array_type(base_type1)? folded_value(fc->parameter_association_list->first->actual).array_literal_value().size() : 1; int length2 = is_array_type(base_type2)? folded_value(fc->parameter_association_list->rest->first->actual).array_literal_value().size() : 1; // Next, concatenate both arguments vector result(length1 + length2); if (is_array_type(base_type1)) // The argument is an array copy(folded_value(fc->parameter_association_list->first->actual).array_literal_value().begin(), folded_value(fc->parameter_association_list->first->actual).array_literal_value().end(), result.begin()); else // The argument is an array element result[0] = folded_value(fc->parameter_association_list->first->actual).long_value(); if (is_array_type(base_type2)) // The argument is an array copy(folded_value(fc->parameter_association_list->rest->first->actual).array_literal_value().begin(), folded_value(fc->parameter_association_list->rest->first->actual).array_literal_value().end(), &result[length1]); else // The argument is an array element result[length1] = folded_value(fc->parameter_association_list->rest->first->actual).long_value(); // Check whether length of target array matches length of // concatenation result. if (is_constrained_array_type(fc->subtype)) { // First, try to determine array bounds vector range_desc = get_discrete_range(fc->subtype, rstack, IR_NOT_STATIC); range_desc[0].constant_fold_rangedes(rstack); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); // If array bounds are locally static then determine length // of array if (and_reduce(range.valid)) { lint length = range_to_length(range.left, range.dir, range.right); if (length != (length1 + length2)) { codegen_error.error("%:error: length (=%i) of concatenation result does not match length (=%i) of target array.", fc, length1 + length2, length); error_count++; } } } folded_value(fc).array_literal_value() = result; } else if (base_type1->is(IR_PHYSICAL_TYPE) && base_type2->is(IR_PHYSICAL_TYPE) || base_type1->is(IR_PHYSICAL_TYPE) && base_type2->is(IR_INTEGER_TYPE) || base_type1->is(IR_INTEGER_TYPE) && base_type2->is(IR_PHYSICAL_TYPE)) { //********************************************************************** lint arg1 = folded_value(fc->parameter_association_list->first->actual).long_value(); lint arg2 = folded_value(fc->parameter_association_list->rest->first->actual).long_value(); lint result = perform_operation(fc, arg1, arg2); // Check whether result is ok if (result > PHYSICAL_MAX || result < PHYSICAL_MIN) { result = result > 0? PHYSICAL_MAX : PHYSICAL_MIN; codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).long_value() = result; } else if (base_type1->is(IR_PHYSICAL_TYPE) && base_type2->is(IR_FLOATING_TYPE)) { //********************************************************************** lint arg1 = folded_value(fc->parameter_association_list->first->actual).long_value(); double arg2 = folded_value(fc->parameter_association_list->rest->first->actual).double_value(); lint result = perform_operation(fc, double(arg1), arg2); // Check whether result is ok if (result > PHYSICAL_MAX || result < PHYSICAL_MIN) { result = result > 0? PHYSICAL_MAX : PHYSICAL_MIN; codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).long_value() = result; } else if (base_type1->is(IR_FLOATING_TYPE) && base_type2->is(IR_PHYSICAL_TYPE)) { //********************************************************************** double arg1 = folded_value(fc->parameter_association_list->first->actual).double_value(); lint arg2 = folded_value(fc->parameter_association_list->rest->first->actual).long_value(); lint result = perform_operation(fc, arg1, double(arg2)); // Check whether result is ok if (result > PHYSICAL_MAX || result < PHYSICAL_MIN) { result = result > 0? PHYSICAL_MAX : PHYSICAL_MIN; codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).long_value() = result; } else if ((base_type1->is(IR_ENUMERATION_TYPE) || base_type1->is(IR_INTEGER_TYPE)) && (base_type2->is(IR_ENUMERATION_TYPE) || base_type2->is(IR_INTEGER_TYPE))) { //********************************************************************** lint arg1 = folded_value(fc->parameter_association_list->first->actual).long_value(); lint arg2 = folded_value(fc->parameter_association_list->rest->first->actual).long_value(); lint result = perform_operation(fc, arg1, arg2); // Check whether result is ok if (result > INTEGER_MAX || result < INTEGER_MIN) { result = result > 0? INTEGER_MAX : INTEGER_MIN; codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).long_value() = result; } else if (base_type1->is(IR_FLOATING_TYPE) && base_type2->is(IR_FLOATING_TYPE) && result_type->is(IR_ENUMERATION_TYPE)) { //********************************************************************** // Compare operation double arg1 = folded_value(fc->parameter_association_list->first->actual).double_value(); double arg2 = folded_value(fc->parameter_association_list->rest->first->actual).double_value(); lint result = perform_operation(fc, arg1, arg2); // Check whether result is ok if (result > INTEGER_MAX || result < INTEGER_MIN) { result = result > 0? INTEGER_MAX : INTEGER_MIN; codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).long_value() = result; } else if (base_type1->is(IR_FLOATING_TYPE) && base_type2->is(IR_INTEGER_TYPE)) { //********************************************************************** // Power double arg1 = folded_value(fc->parameter_association_list->first->actual).double_value(); lint arg2 = folded_value(fc->parameter_association_list->rest->first->actual).long_value(); double result = perform_operation(fc, arg1, arg2); // Check whether result is ok if (result == HUGE_VAL || result == -HUGE_VAL) { codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).double_value() = result; } else if (base_type1->is(IR_FLOATING_TYPE) && base_type2->is(IR_FLOATING_TYPE) && result_type->is(IR_FLOATING_TYPE)) { //********************************************************************** // Misc operations double arg1 = folded_value(fc->parameter_association_list->first->actual).double_value(); double arg2 = folded_value(fc->parameter_association_list->rest->first->actual).double_value(); double result = perform_operation(fc, arg1, arg2); // Check whether result is ok if (result == HUGE_VAL || result == -HUGE_VAL) { codegen_error.error("%:error: overflow/underflow in %n.", fc, fc); error_count++; } // Store result folded_value(fc).double_value() = result; } else assert(false); } if (error_count == 0) valid_folded_value(fc) = true; // The node has been optimized break; case BASIC_OP: // The function is a operator defined in an IEEE // library. Currently no constant folding is performed for this class // of operators case USER_OP: // The function is an user defined operator call case NO_OP: // A ordinary function call (no operator) break; } return error_count; } int m_constant_fold(pIIR_PhysicalLiteral le, RegionStack &rstack) { if (done(le) & CONST_FOLD) return 0; else done(le) |= CONST_FOLD; // First, try to fold the unit. I.e., evaluate the number of basic // unit the current unit consists of int error_count = constant_fold(le->unit, rstack); // Next, fold the value expression if (le->value != NULL) // If value pointer is not NULL then fold value error_count += constant_fold(le->value, rstack); if (!valid_folded_value(le->unit) || !(le->value == NULL || valid_folded_value(le->value))) return error_count; // Calculate the resulting physical value. The physical value is // actually converted to a long long int number which represents the // number of basic units the physical value consists of. valid_folded_value(le) = true; if (le->value == NULL) // If the value expression is NULL then only a time unit was // given. Hence, implicitly set value to 1. folded_value(le).long_value() = folded_value(le->unit).long_value(); else if (le->value->is(IR_INTEGER_LITERAL)) folded_value(le).long_value() = calculate_mult(folded_value(le->value).long_value(), folded_value(le->unit).long_value()); else if (le->value->is(IR_FLOATING_POINT_LITERAL)) { // XXX - Allow inaccuracies here. `calculate_mult (double, // long)' does extensive checking to ensure that only // multiplications are performed where the result can be // represented exactly. This does not make much sense for // floating point and for example fails for 1.0e-3 * 1000000. double res = (folded_value(le->value).double_value() * folded_value(le->unit).long_value()); if (res > PHYSICAL_MAX) folded_value(le).long_value() = PHYSICAL_MAX; else if (res < PHYSICAL_MIN) folded_value(le).long_value() = PHYSICAL_MIN; else folded_value(le).long_value() = lint(res); } else assert(false); // Check whether no overflow occurred during constant folding if (folded_value(le).long_value() > PHYSICAL_MAX || folded_value(le).long_value() < PHYSICAL_MIN) { codegen_error.error("%:error: overflow occured during constant folding.", le); error_count++; } return error_count; } int m_constant_fold(pIIR_PhysicalUnit pu, RegionStack &rstack) { if (done(pu) & CONST_FOLD) return 0; else done(pu) |= CONST_FOLD; int error_count = 0; // Fold multiplier value if (pu->multiplier != NULL) error_count = constant_fold(pu->multiplier, rstack); // Fold unit name, i.e. determine number of basic units this unit // includes if (pu->unit_name != NULL) error_count += constant_fold(pu->unit_name, rstack); // Flag an error if no valid data could be folded if (pu->multiplier != NULL && !valid_folded_value(pu->multiplier)) { codegen_error.error("%:error: cannot evaluate expression.", pu, pu->multiplier); error_count++; } // Flag an error if no valid data could be folded if (pu->unit_name != NULL && !valid_folded_value(pu->unit_name)) { codegen_error.error("%:error: cannot evaluate expression.", pu, pu->unit_name); error_count++; } // Determine multiplier value an unit value (unit value = value // related to the basic unit) lint mult_value = pu->multiplier == NULL? lint(1) : folded_value(pu->multiplier).long_value(); lint unit_value = pu->unit_name == NULL? lint(1) : folded_value(pu->unit_name).long_value(); // Multiply the multiplier value with the number of basic units and // store result into node folded_value(pu).long_value() = calculate_mult(mult_value, unit_value); valid_folded_value(pu) = true; // Check whether no overflow occured during constant folding if (folded_value(pu).long_value() > PHYSICAL_MAX || folded_value(pu).long_value() < PHYSICAL_MIN) { codegen_error.error("%:error: overflow occured during constant folding.", pu); error_count++; } return error_count; } int m_constant_fold(pIIR_SimpleReference sr, RegionStack &rstack) { if (done(sr) & CONST_FOLD) return 0; else done(sr) |= CONST_FOLD; // Return if the expression is not locally static or does not // reference a constant if (!sr->object->is(IR_CONSTANT_DECLARATION)) return 0; pIIR_ConstantDeclaration cdecl = pIIR_ConstantDeclaration(sr->object); int error_count = 0; // Return if constant does not have an initial value if (cdecl->initial_value != NULL) error_count = constant_fold(cdecl->initial_value, rstack); else return 0; // Return if no folded constant value could be determined. if (error_count != 0 || !valid_folded_value(cdecl->initial_value)) return error_count; pIIR_Type base_type = get_base_type(sr->subtype); // Get base type if (base_type->is(IR_INTEGER_TYPE) || base_type->is(IR_ENUMERATION_TYPE) || base_type->is(IR_PHYSICAL_TYPE)) { folded_value(sr).long_value() = folded_value(cdecl->initial_value).long_value(); valid_folded_value(sr) = true; } if (base_type->is(IR_FLOATING_TYPE)) { folded_value(sr).double_value() = folded_value(cdecl->initial_value).double_value(); valid_folded_value(sr) = true; } else if (folded_value(cdecl->initial_value).is_array_literal_value ()) { folded_value(sr).array_literal_value() = folded_value(cdecl->initial_value).array_literal_value (); valid_folded_value(sr) = true; } return 0; } int m_constant_fold(pIIR_ArrayReference ar, RegionStack &rstack) { if (done(ar) & CONST_FOLD) return 0; else done(ar) |= CONST_FOLD; int error_count = constant_fold(ar->array, rstack); for (pIIR_ExpressionList el = ar->indices; el; el = el->rest) error_count += constant_fold(el, rstack); return error_count; } int m_constant_fold(pIIR_ArrayRange ar, RegionStack &rstack) { if (done(ar) & CONST_FOLD) return 0; else done(ar) |= CONST_FOLD; int error_count = 0; if (ar->array != NULL) error_count += constant_fold(ar->array, rstack); if (ar->index != NULL) error_count += constant_fold(ar->index, rstack); return error_count; } int m_constant_fold(pIIR_ExplicitRange er, RegionStack &rstack) { if (done(er) & CONST_FOLD) return 0; else done(er) |= CONST_FOLD; int error_count = constant_fold(er->left, rstack); error_count += constant_fold(er->right, rstack); return error_count; } int m_constant_fold(pIIR_OthersIndexedAssociation ia, RegionStack &rstack) { int error_count = constant_fold(ia->value, rstack); return error_count; } int m_constant_fold(pIIR_RangeIndexedAssociation ia, RegionStack &rstack) { if (done(ia) & CONST_FOLD) return 0; else done(ia) |= CONST_FOLD; int error_count = constant_fold(ia->value, rstack); error_count += constant_fold(ia->index_range, rstack); return error_count; } int m_constant_fold(pIIR_SingleIndexedAssociation ia, RegionStack &rstack) { if (done(ia) & CONST_FOLD) return 0; else done(ia) |= CONST_FOLD; int error_count = 0; if (ia->index != NULL) error_count += constant_fold(ia->index, rstack); error_count += constant_fold(ia->value, rstack); return error_count; } int m_constant_fold (pIIR_SliceIndexedAssociation sia, RegionStack &rstack) { if (done(sia) & CONST_FOLD) return 0; else done(sia) |= CONST_FOLD; int error_count = constant_fold(sia->value, rstack); error_count += constant_fold(sia->index_range, rstack); return error_count; } int m_constant_fold(pIIR_SliceReference sr, RegionStack &rstack) { if (done(sr) & CONST_FOLD) return 0; else done(sr) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(sr->array, rstack); error_count += constant_fold(sr->range, rstack); return error_count; } int m_constant_fold(pIIR_RecordReference rr, RegionStack &rstack) { if (done(rr) & CONST_FOLD) return 0; else done(rr) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(rr->record, rstack); return error_count; } int m_constant_fold(pIIR_Expression e, RegionStack &rstack) { return 0; } int m_constant_fold(pIIR_Allocator a, RegionStack &rstack) { if (done(a) & CONST_FOLD) return 0; else done(a) |= CONST_FOLD; int error_count = constant_fold(a->type_mark, rstack); if (a->value != NULL) error_count += constant_fold(a->value, rstack); return error_count; } int m_constant_fold(pIIR_ExpressionList el, RegionStack &rstack) { if (done(el) & CONST_FOLD) return 0; else done(el) |= CONST_FOLD; int error_count = 0; for ( ; el; el = el->rest) error_count += constant_fold(el->first, rstack); return error_count; } int m_constant_fold (pIIR_ArrayAggregate aa, RegionStack &rstack) { if (done(aa) & CONST_FOLD) return 0; else done(aa) |= CONST_FOLD; int error_count = 0; // First, determine context of asscociations for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) error_count += constant_fold(al->first, rstack); return error_count; } int m_constant_fold (pIIR_RecordAggregate ra, RegionStack &rstack) { if (done(ra) & CONST_FOLD) return 0; else done(ra) |= CONST_FOLD; int error_count = 0; // First, determine context of asscociations for (pIIR_ElementAssociationList al = ra->element_association_list; al; al = al->rest) error_count += constant_fold(al->first->value, rstack); return error_count; } int m_constant_fold (pIIR_AttrArrayFunc aa, RegionStack &rstack) { if (done(aa) & CONST_FOLD) return 0; else done(aa) |= CONST_FOLD; int error_count = 0; vector range_des_vec; if (aa->array != NULL) { if (!is_constrained_array_type(aa->array->subtype)) return error_count; // Get range descriptors from array object range_des_vec = get_discrete_range(aa->array->subtype, rstack, IR_NOT_STATIC); } else if (aa->array_type != NULL) { if (!is_constrained_array_type(aa->array_type)) return error_count; // Get range descriptors from array type range_des_vec = get_discrete_range(aa->array_type, rstack, IR_NOT_STATIC); } else assert(false); // Constant fold corresponding range descriptor RangeDescriptor &range_des = range_des_vec[aa->index - 1]; range_des.constant_fold_rangedes(rstack); StaticRangeDescriptor range = range_des.rangedes_to_lint(rstack); // Initialize flag valid_folded_value(aa) = false; // Check attribute if (aa->is(IR_ATTR_ARRAY_LENGTH)) { if (and_reduce(range.valid)) { folded_value(aa).long_value() = (range.left <= range.right && range.dir == IR_DIRECTION_UP) || (range.left >= range.right && range.dir == IR_DIRECTION_DOWN) ? lint_abs(range.right - range.left) + 1 : 0; valid_folded_value(aa) = true; } } else if (aa->is(IR_ATTR_ARRAY_ASCENDING)) { if (range.valid[1]) { folded_value(aa).long_value() = range.dir == IR_DIRECTION_UP? 1 : 0; valid_folded_value(aa) = true; } } else if (aa->is(IR_ATTR_ARRAY_LOW)) { if (and_reduce(range.valid)) { folded_value(aa).long_value() = min (range.left, range.right); valid_folded_value(aa) = true; } } else if (aa->is(IR_ATTR_ARRAY_HIGH)) { if (and_reduce(range.valid)) { folded_value(aa).long_value() = max (range.left, range.right); valid_folded_value(aa) = true; } } else if (aa->is(IR_ATTR_ARRAY_RIGHT)) { if (range.valid[2]) { folded_value(aa).long_value() = range.right; valid_folded_value(aa) = true; } } else if (aa->is(IR_ATTR_ARRAY_LEFT)) { if (range.valid[0]) { folded_value(aa).long_value() = range.left; valid_folded_value(aa) = true; } } else assert(false); return error_count; } int m_constant_fold (pIIR_AttrTypeFunc a, RegionStack &rstack) { int error_count = 0; vector type_range_des; StaticRangeDescriptor static_lint_range; StaticRangeDescriptor static_double_range; pIIR_Root left_bound_node, right_bound_node; if (a->prefix != NULL) { // Determine range of prefix type type_range_des = get_discrete_range(a->prefix, rstack, IR_NOT_STATIC); // type_range_des should contain exactly one single // RangeDescriptor instance assert(type_range_des.size() == 1); left_bound_node = type_range_des[0].left; right_bound_node = type_range_des[0].right; // Try to fold range descriptor type_range_des[0].constant_fold_rangedes(rstack); if (get_base_type (a->prefix)-> is (IR_FLOATING_TYPE)) { // Determine left, right and direction of range. is_static stores // whether the corresponding value is static. static_double_range = type_range_des[0].rangedes_to_double (rstack); // if neither left or right bound nor the direction are static // then do not perform any constant folding because no range // checking can be done at compile time. if (!or_reduce(static_double_range.valid)) return error_count; } else { // Determine left, right and direction of range. is_static stores // whether the corresponding value is static. static_lint_range = type_range_des[0].rangedes_to_lint (rstack); // if neither left or right bound nor the direction are static // then do not perform any constant folding because no range // checking can be done at compile time. if (!or_reduce(static_lint_range.valid)) return error_count; } } // Fold argument if (a->argument != NULL) constant_fold(a->argument, rstack); // Return if the argument is not locally static if (a->argument != NULL && !valid_folded_value(a->argument)) return error_count; // Determine argument value and store whether the argument is an // integer/enumeration/physical or floating point type lint lint_argument; double double_argument; bool has_long_argument; bool has_no_argument = true; if (a->argument != NULL) { pIIR_Type type = get_base_type(a->argument->subtype); has_no_argument = false; if (type->is(IR_INTEGER_TYPE) || type->is(IR_ENUMERATION_TYPE) || type->is(IR_PHYSICAL_TYPE)) { lint_argument = folded_value(a->argument).long_value(); has_long_argument = true; } else if (type->is(IR_FLOATING_TYPE)) { double_argument = folded_value(a->argument).double_value(); has_long_argument = false; } else { cerr << "unsupported argtype: " << type->base->kind_name () << "\n"; assert(false); } } // Bail out if the attribute is used on an illegal type if (!has_long_argument && (a->is(IR_ATTR_RIGHTOF) || a->is(IR_ATTR_LEFTOF) || a->is(IR_ATTR_VAL) || a->is(IR_ATTR_POS) || a->is(IR_ATTR_SUCC) || a->is(IR_ATTR_PRED) || a->is(IR_ATTR_LEFTOF) || a->is(IR_ATTR_RIGHTOF) )) { codegen_error.error("%:error: attribute %n is not defined for floating point types.", a, a); return ++error_count; } // Finally, handle the various attributes // ***** RIGHTOF ******************************************* // Note that this attribute is not defined for floatingpoint types if (a->is(IR_ATTR_RIGHTOF)) { folded_value(a).long_value() = lint_argument + (static_lint_range.dir == IR_DIRECTION_UP? +1 : -1); // Check result if (static_lint_range.dir == IR_DIRECTION_DOWN) if (!static_lint_range.valid[0]) // Return if we cannot range check the result return error_count; else if (folded_value(a).long_value() < static_lint_range.left) { codegen_error.error("%:error: result of attribute %n is out of bounds. Left bound of type %n is %n.", a, a, a->prefix, left_bound_node); return ++error_count; } if (static_lint_range.dir == IR_DIRECTION_UP) if (!static_lint_range.valid[2]) // Return if we cannot range check the result return error_count; else if (folded_value(a).long_value() > static_lint_range.right) { codegen_error.error("%:error: result of attribute %n is out of bounds. Right bound of type %n is %n.", a, a, a->prefix, right_bound_node); return ++error_count; } valid_folded_value(a) = true; // ***** LEFTOF ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (a->is(IR_ATTR_LEFTOF)) { folded_value(a).long_value() = lint_argument - (static_lint_range.dir == IR_DIRECTION_UP? +1 : -1); // Check result if (static_lint_range.dir == IR_DIRECTION_UP) if (!static_lint_range.valid[2]) // Return if we cannot range check the result return error_count; else if (folded_value(a).long_value() < static_lint_range.left) { codegen_error.error("%:error: result of attribute %n is out of bounds. Left bound of type %n is %n.", a, a, a->prefix, left_bound_node); return ++error_count; } if (static_lint_range.dir == IR_DIRECTION_DOWN) if (!static_lint_range.valid[0]) // Return if we cannot range check the result return error_count; else if (folded_value(a).long_value() > static_lint_range.right) { codegen_error.error("%:error: result of attribute %n is out of bounds. Right bound of type %n is %n.", a, a, a->prefix, right_bound_node); return ++error_count; } valid_folded_value(a) = true; // ***** PRED ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (a->is(IR_ATTR_PRED)) { folded_value(a).long_value() = lint_argument - 1; // Check result if (!static_lint_range.valid[0]) // Return if we cannot range check the result return error_count; if (folded_value(a).long_value() < static_lint_range.left) { codegen_error.error("%:error: result of attribute %n is out of bound. Left bound of type %n is %n.", a, a, a->prefix, right_bound_node); return ++error_count; } valid_folded_value(a) = true; // ***** SUCC ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (a->is(IR_ATTR_SUCC)) { folded_value(a).long_value() = lint_argument + 1; // Check result if (!static_lint_range.valid[2]) // Return if we cannot range check the result return error_count; if (folded_value(a).long_value() > static_lint_range.right) { codegen_error.error("%:error: result of attribute %n is out of bound. Right bound of type %n is %n.", a, a, a->prefix, right_bound_node); return ++error_count; } valid_folded_value(a) = true; // ***** VAL ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (a->is(IR_ATTR_VAL)) { folded_value(a).long_value() = lint_argument; // Check result if (!static_lint_range.valid[2] || !static_lint_range.valid[0]) // Return if we cannot range check the result return error_count; else if (folded_value(a).long_value() < static_lint_range.left) { codegen_error.error("%:error: result of attribute %n is out of bounds. Left bound of type %n is %n.", a, a, a->prefix, left_bound_node); return ++error_count; } else if (folded_value(a).long_value() > static_lint_range.right) { codegen_error.error("%:error: result of attribute %n is out of bounds. Right bound of type %n is %n.", a, a, a->prefix, right_bound_node); return ++error_count; } valid_folded_value(a) = true; // ***** POS ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (a->is(IR_ATTR_POS)) { folded_value(a).long_value() = lint_argument; valid_folded_value(a) = true; // ***** VALUE ******************************************* } else if (a->is(IR_ATTR_VALUE)) { // The VALUE attribute is not folded return error_count; // ***** IMAGE ******************************************* } else if (a->is(IR_ATTR_IMAGE)) { // The IMAGE attribute is not folded return error_count; } else assert(false); return error_count; } int m_constant_fold (pIIR_AttrTypeValue a, RegionStack &rstack) { int error_count = 0; vector type_range_des; StaticRangeDescriptor static_lint_range; StaticRangeDescriptor static_double_range; bool is_floatingpoint_type = false; if (a->prefix != NULL) { // Determine range of prefix type type_range_des = get_discrete_range(a->prefix, rstack, IR_NOT_STATIC); // type_range_des should contain exactly one single // RangeDescriptor instance assert(type_range_des.size() == 1); // Try to fold range descriptor type_range_des[0].constant_fold_rangedes(rstack); // Determine left, right and direction of range. is_static stores // whether the corresponding value is static. if (get_base_type (a->prefix)->is (IR_FLOATING_TYPE)) { static_double_range = type_range_des[0].rangedes_to_double (rstack); // if neither left or right bound nor the direction are static // then do not perform any constant folding because no range // checking can be done at compile time. is_floatingpoint_type = true; if (!or_reduce(static_double_range.valid)) return error_count; } else { static_lint_range = type_range_des[0].rangedes_to_lint (rstack); // if neither left or right bound nor the direction are static // then do not perform any constant folding because no range // checking can be done at compile time. is_floatingpoint_type = false; if (!or_reduce(static_lint_range.valid)) return error_count; } } // Fold argument if (a->argument != NULL) constant_fold(a->argument, rstack); // Return if the argument is not locally static if (a->argument != NULL && !valid_folded_value(a->argument)) return error_count; // Determine argument value and store whether the argument is an // integer/enumeration/physical or floating point type lint lint_argument; double double_argument; bool has_long_argument; bool has_no_argument = true; if (a->argument != NULL) { pIIR_Type type = get_base_type(a->argument->subtype); has_no_argument = false; if (type->is(IR_INTEGER_TYPE) || type->is(IR_ENUMERATION_TYPE) || type->is(IR_PHYSICAL_TYPE)) { lint_argument = folded_value(a->argument).long_value(); has_long_argument = true; } else if (type->is(IR_FLOATING_TYPE)) { double_argument = folded_value(a->argument).double_value(); has_long_argument = false; } else assert(false); } // Create shortcut to access valid array. vector &valid = is_floatingpoint_type? static_double_range.valid : static_lint_range.valid; // Finally, handle the various attributes // ***** LENGTH ******************************************* if (a->is(IR_ATTR_LENGTH)) { // Actually, this attribute is defined for arrays only! assert(false); // ***** ASCENDING ******************************************* } else if (a->is(IR_ATTR_ASCENDING)) { if (!valid[1]) // Return if direction is not static return error_count; if (is_floatingpoint_type) folded_value(a).double_value() = static_double_range.dir == IR_DIRECTION_UP? 1 : 0; else folded_value(a).long_value() = static_lint_range.dir == IR_DIRECTION_UP? 1 : 0; valid_folded_value(a) = true; // ***** HIGH ******************************************* } else if (a->is(IR_ATTR_HIGH)) { if (!valid[2] || !valid[0]) // Return if bound is not static return error_count; if (is_floatingpoint_type) folded_value(a).double_value() = max(static_double_range.right, static_double_range.left); else folded_value(a).long_value() = max(static_lint_range.right, static_lint_range.left); valid_folded_value(a) = true; // ***** LOW ******************************************* } else if (a->is(IR_ATTR_LOW)) { if (!valid[2] || !valid[0]) // Return if bound is not static return error_count; if (is_floatingpoint_type) folded_value(a).double_value() = min(static_double_range.right, static_double_range.left); else folded_value(a).long_value() = min(static_lint_range.right, static_lint_range.left); valid_folded_value(a) = true; // ***** RIGHT ******************************************* } else if (a->is(IR_ATTR_RIGHT)) { if (!valid[2]) // Return if bound is not static return error_count; if (is_floatingpoint_type) folded_value(a).double_value() = static_double_range.right; else folded_value(a).long_value() = static_lint_range.right; valid_folded_value(a) = true; // ***** LEFT ******************************************* } else if (a->is(IR_ATTR_LEFT)) { if (!valid[0]) // Return if bound is not static return error_count; if (is_floatingpoint_type) folded_value(a).double_value() = static_double_range.left; else folded_value(a).long_value() = static_lint_range.left; valid_folded_value(a) = true; } else assert(false); return error_count; } int m_constant_fold (pIIR_TypeConversion tc, RegionStack &rstack) { int error_count = 0; error_count += constant_fold(tc->expression, rstack); // Return if an error occured during constant folding of the operand // or no valid folded value could be determined for the operand or // the operand is not scalar. if (error_count != 0 || !valid_folded_value(tc->expression) || !is_scalar_type(tc->expression->subtype)) return error_count; // Determine converted value pIIR_Type target_base_type = get_base_type(tc->type_mark); pIIR_Type source_base_type = get_base_type(tc->expression->subtype); if (target_base_type->is(IR_FLOATING_TYPE) && source_base_type->is(IR_INTEGER_TYPE)) { folded_value(tc).double_value() = (double)folded_value(tc->expression).long_value(); // Check whether error_count += check_scalar_against_bounds(tc, folded_value(tc).double_value(), tc->type_mark, rstack, runtime_checks(tc), true, " illegal type conversion:" ); } else if (source_base_type->is(IR_FLOATING_TYPE) && target_base_type->is(IR_INTEGER_TYPE)) { folded_value(tc).long_value() = (lint)rint(folded_value(tc->expression).double_value()); error_count += check_scalar_against_bounds(tc, folded_value(tc).long_value(), tc->type_mark, rstack, runtime_checks(tc), true, " illegal type conversion:" ); } else if (target_base_type->is(IR_FLOATING_TYPE) && source_base_type->is(IR_FLOATING_TYPE)) { folded_value(tc).double_value() = folded_value(tc->expression).double_value(); error_count += check_scalar_against_bounds(tc, folded_value(tc).double_value(), tc->type_mark, rstack, runtime_checks(tc), true, " illegal type conversion:" ); } else { folded_value(tc).long_value() = folded_value(tc->expression).long_value(); error_count += check_scalar_against_bounds(tc, folded_value(tc).long_value(), tc->type_mark, rstack, runtime_checks(tc), true, " illegal type conversion:" ); } valid_folded_value(tc) = (error_count == 0); return error_count; } freehdl-0.0.7/v2cc/v2cc-decl.cc0000644000175000017500000024106610707453042012771 00000000000000#include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" void test (RegionStack &rstack) { cout << "----------------------" << endl; for (pIIR_DeclarationList l = extended_declarations (RootDeclarativeRegion (rstack)); l; l = l->rest) { cout << l->first->declarator->text.to_chars() << endl; } cout << "----------------------" << endl; } // used to generate error messages extern vaul_error_printer codegen_error; /* Emit global declaration code of the current context stack */ void emit_global_internal_object_declarations(pIIR_DeclarativeRegion region, string &str, RegionStack &rstack) { // ******************************************************************* // Emit global prototypes // ******************************************************************* for (pIIR_DeclarationList decls = extended_declarations(region); decls; decls = decls->rest) if (decls->first->is(V2CC_INTERNAL_CODE)) { pV2CC_InternalCode ic = pV2CC_InternalCode(decls->first); if (ic->flags & DECLARE_GLOBALLY) str += ic->cpp_header_string; } } /* Define all global internal objects */ void emit_global_internal_object_definitions(pIIR_DeclarativeRegion region, string &str, RegionStack &rstack) { // ******************************************************************* // declare all internal global objects // ******************************************************************* for (pIIR_DeclarationList decls = extended_declarations(region); decls; decls = decls->rest) { if (decls->first->is(V2CC_INTERNAL_CODE)) { // ******************************************************************* // Internal code object // ******************************************************************* pV2CC_InternalCode ic = pV2CC_InternalCode(decls->first); if (ic->flags & DECLARE_GLOBALLY) str += ic->cpp_impl_string; } else if (((decls->first->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decls->first)->alias_base != NULL) || decls->first->is(IR_CONSTANT_DECLARATION)) || decls->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { // ************************************************************************** // constant or type declaration // ************************************************************************** vector get_decl (pIIR_Declaration decl, RegionStack &rstack); vector result = get_decl (decls->first, rstack); string &type_str = result[0]; string &obj_str = result[1]; string &init_str = result[2]; str += type_str + " " + obj_str + init_str + ";\n"; } } } /* Define all global internal objects */ void emit_global_internal_object_init(pIIR_DeclarativeRegion region, string &str, RegionStack &rstack) { // Create a temporary region stack which contains the root region // only. Note that this stack is removed automatically on function // return. RegionStack root_tmp_stack; root_tmp_stack.push(RootDeclarativeRegion(rstack)); // ******************************************************************* // analyze all internal global objects // ******************************************************************* for (pIIR_DeclarationList decls = extended_declarations(region); decls; decls = decls->rest) { if (decls->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { // ******************************************************************* // Internal object declaration // ******************************************************************* pV2CC_InternalObjectDeclaration obj = pV2CC_InternalObjectDeclaration(decls->first); if (obj->flags & DECLARE_GLOBALLY) { string type_str = get_internal_object_type_string(obj, rstack); if (!(obj->flags & DECLARE_AND_INIT)) { string initial_str = get_internal_object_initial_string(obj, rstack); if (initial_str != "") str += obj->declarator->text.to_chars() + initial_str + ";\n"; } } } else if ((decls->first->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decls->first)->alias_base != NULL) || decls->first->is(IR_CONSTANT_DECLARATION)) { void emit_decls_init_item (pIIR_DeclarationList dl, string &str, RegionStack &rstack, int l); emit_decls_init_item (decls, str, root_tmp_stack, 0); } else if ((decls->first->is(IR_TYPE_DECLARATION))) { void emit_decls_init_item (pIIR_DeclarationList dl, string &str, RegionStack &rstack, int l); emit_decls_init_item (decls, str, root_tmp_stack, 0); } } } /* Refer to a type. If it has a name, use that. Otherwise be more verbose. */ void emit_type_name (pIIR_Type t, string &str, RegionStack &rstack, int l = 0) { emit_id (t->declaration, str, rstack); } string get_design_file_name(string &library, string &unit) { char *fn = vaul.mapper->find_design_file(library.c_str(), unit.c_str()); if (fn == NULL) { fprintf(stderr, "Internal error in file %s at line %i: could not find unit '%s' in library '%s'.\n", __FILE__, __LINE__, unit.c_str(), library.c_str()); exit(1); } string result = fn; delete fn; return result; } // Emit declaration of external definitions used within the current // desing(s) void emit_external_decls (decl_flag_list &ext_decls_list, pIIR_Declaration ref_decl, string &str, RegionStack &rstack, int l) { str += "/* External declarations */\n"; /* Get source file name of declaration */ string ref_fn = string (get_source_file_name (ref_decl)); string obj_decls; pIIR_DeclarationList odl = new IIR_DeclarationList(NULL, NULL, NULL); tree_protect(odl); // odl shall not be removed by the garbage collector for (decl_flag_list::iterator iter = ext_decls_list.begin(); iter != ext_decls_list.end(); iter++) { pIIR_Declaration decl = pIIR_Declaration((*iter).first); // If the bool value is set to true then the declaration has been // already emitted, i.e. there is nothing left to do. if ((*iter).second) continue; // Continue if the current declaration is predefined in // library std but not std.textio. vector libunit = get_library_and_unit_name (decl); if (libunit[0] == "std" && libunit[1] != "textio") continue; // Compare file name of declaration with reference design. Do not // emit declaration if file names are equal. if (string (get_source_file_name (decl)) == ref_fn) continue; // If declaration is an object declaration then we use function // "emit_decl" to create the corresponding declarations. Note that // the keyword "extern" must be prepended in this case. if (decl->is(IR_OBJECT_DECLARATION)) { odl->first = decl; emit_decls (odl, obj_decls = "", rstack, l); // Prepend "extern". if (obj_decls.size() > 0) str += "extern " + obj_decls; } else { // Otherwise, just emit header code. emit_hdr (decl, str, rstack, l); } (*iter).second = true; // Mark entry, i.e. the declaration must // not be emitted again. } str += "/* End of external declarations */\n"; odl->first = NULL; tree_unprotect(odl); // ok, odl can now be removed by the garbage // collector } static string make_absolute (string fn) { if (fn.size() == 0 || fn[0] == '/') { #ifdef _WIN32 for (int i = 0; i < fn.size(); i++) if (fn[i] == '\\') fn[i] ='/'; #endif return fn; } else { const int buffer_size = 4096; char *buffer = (char*)malloc (sizeof (char) * buffer_size); assert (getcwd (buffer, buffer_size) != NULL); #ifdef _WIN32 for (int i = 0; buffer[i] && i < buffer_size; i++) if (buffer[i] == '\\') buffer[i] ='/'; #endif fn = string (buffer) + "/" + fn; free (buffer); return fn; } } void emit_source_file_register_code(pIIR_DeclarativeRegion r, string &str, RegionStack &rstack, int l) { string ref_fn = string (get_source_file_name (r)); str += spaces(l) + "register_source_file(\"" + make_absolute (ref_fn) + "\",\"" + ref_fn + "\");\n"; } vector get_decl (pIIR_Declaration decl, RegionStack &rstack) { vector result; string type_str = ""; string obj_str = ""; string init_str = ""; // Now, generate code depending on the object type if (decl->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decl)->alias_base != NULL) { // ************************************************************************** // Alias declaration // ************************************************************************** pIIR_ObjectDeclaration alias_decl = pIIR_ObjectDeclaration(decl); // Determine aliased object pIIR_ObjectDeclaration aliased_object = get_object_declaration(alias_decl->alias_base); if (aliased_object->is(IR_CONSTANT_DECLARATION) || aliased_object->is(IR_VARIABLE_DECLARATION) || aliased_object->is(IR_CONSTANT_INTERFACE_DECLARATION) || aliased_object->is(IR_VARIABLE_INTERFACE_DECLARATION)) { // Aliased object is a variable or a constant. if (is_array_type(alias_decl->subtype)) { // Array alias objects are implemented as a special array type // array_alias object type_str = "array_alias<" + qid(get_declaration(pIIR_ObjectDeclaration(decl)->subtype), rstack, TYPE) + " >"; obj_str = qid(decl, rstack, id_type()); } else { // The other alias objects are implemented via pointers type_str = qid (get_declaration(pIIR_ObjectDeclaration (decl)->subtype), rstack, TYPE); obj_str = "*" + qid (decl, rstack, id_type()); } } else if (aliased_object->is (IR_SIGNAL_DECLARATION) || aliased_object->is (IR_SIGNAL_INTERFACE_DECLARATION)) { // Aliased object is a signal type_str = "sig_info<" + qid (get_declaration(pIIR_ObjectDeclaration(decl)->subtype), rstack, TYPE) + ">"; obj_str = "*" + qid (decl, rstack, id_type()); } else { codegen_error.error("%:error: sorry, this alias declaration is currently not supported", decl); exit(1); } } else if (decl->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) { // ************************************************************************** // an implicit signal to implement wait statements with time out // clauses shall be created // ************************************************************************** pV2CC_ImplicitSignalDeclaration_WaitFor obj = pV2CC_ImplicitSignalDeclaration_WaitFor(decl); type_str = "sig_info"; obj_str = "*" + qid(obj, rstack, id_type()); } else if (decl->is(IR_SIGNAL_DECLARATION) || decl->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // ************************************************************************** // signal declaration // ************************************************************************** pIIR_SignalDeclaration sig = pIIR_SignalDeclaration(decl); type_str = "sig_info<" + qid(get_declaration(sig->subtype), rstack, TYPE) + ">"; obj_str = "*" + qid(sig, rstack, id_type()); } else if (decl->is(IR_CONSTANT_DECLARATION) || decl->is(IR_CONSTANT_INTERFACE_DECLARATION) || decl->is(IR_VARIABLE_DECLARATION)) { // ************************************************************************** // constant or variable declaration // ************************************************************************** type_str = qid(get_declaration(pIIR_ObjectDeclaration(decl)->subtype), rstack, TYPE); obj_str = qid(decl, rstack, id_type()); } else if (decl->is(IR_FILE_DECLARATION)) { // ************************************************************************** // File declaration // ************************************************************************** type_str = qid(get_declaration(pIIR_ObjectDeclaration(decl)->subtype), rstack, TYPE); obj_str = qid(decl, rstack, id_type()); } else if (decl->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { // ************************************************************************** // an internal object required by the generated code // ************************************************************************** pV2CC_InternalObjectDeclaration obj = pV2CC_InternalObjectDeclaration(decl); type_str = get_internal_object_type_string(obj, rstack); obj_str = obj->declarator->text.to_chars(); // If the internal object shall be declared and initialized at // the same time, then get the initial value. if (obj->flags & DECLARE_AND_INIT) init_str = get_internal_object_initial_string(obj, rstack); } else if (decl->is(IR_TYPE_DECLARATION)) { // ************************************************************************** // A new type has been declared // ************************************************************************** return result; } else // otherwise, skip item return result; result.resize(3); result[0] = type_str; result[1] = obj_str; result[2] = init_str; return result; } void emit_decls (pIIR_DeclarationList decl_list, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration type = NULL; string type_str = ""; string old_type_str = ""; string obj_str = ""; // Analyze each item on the declaration list for (pIIR_DeclarationList dl = decl_list; dl; dl = dl->rest) { pIIR_Declaration decl = (pIIR_Declaration)dl->first; vector result = get_decl(decl, rstack); if (result.size() == 0) continue; type_str = result[0]; obj_str = result[1]; // several items of the same type will be declared in a single // declaration statement if (type_str != old_type_str) { if (old_type_str != "") str += ";\n"; str += spaces(l) + type_str + " " + obj_str; old_type_str = type_str; } else str += "," + obj_str; } if (type_str != "") str += ";\n"; } /* * emit IIR Declarations */ void m_emit_decl (pIIR_Declaration d, string &str, RegionStack &rstack, int l) { // catch-all for ignored declarations. str += spaces(l) + string("/* ") + d->kind_name(); emit_id (d, str, rstack); str += " */\n"; } void m_emit_decl (pIIR_SubprogramDeclaration s, string &str, RegionStack &rstack, int l) { assert(false); } void m_emit_decl (pIIR_VariableDeclaration v, string &str, RegionStack &rstack, int l) { str += spaces(l); emit_type_name (v->subtype, str, rstack, 0); str += " "; emit_id (v, str, rstack); if (v->initial_value) // should be done only in constr. { str += " = "; emit_expr (v->initial_value, str, rstack, DEFAULT); } str += ";\n"; } void m_emit_decl (pIIR_ConstantDeclaration c, string &str, RegionStack &rstack, int l) { str += spaces(l); if (!c->initial_value) str += "extern "; str += "const "; emit_type_name (c->subtype, str, rstack, 0); str += " "; emit_id (c, str, rstack); if (c->initial_value) { str += " = "; emit_expr (c->initial_value, str, rstack, 0); } str += ";\n"; } void m_emit_decl (pIIR_FileDeclaration f, string &str, RegionStack &rstack, int l) { // A file. The file name is in the INITIAL_VALUE slot. str += spaces(l); emit_type_name (f->subtype, str, rstack, 0); str += " "; emit_id(f, str, rstack); if (f->file_logical_name) { str += " = open ("; emit_expr (f->file_logical_name, str, rstack, 0); if (f->file_open_expression) { str += ", "; emit_expr (f->file_open_expression, str, rstack, 0); } str += ")"; } str += ";\n"; } void m_emit_decl (pIIR_SignalDeclaration s, string &str, RegionStack &rstack, int l) { str += "sig_info<" + qid(s->subtype->declaration, rstack, TYPE) + "> *" + qid(s, rstack, id_type()) + ";\n"; } void m_emit_decl (pIIR_TypeDeclaration t, string &str, RegionStack &rstack, int l) { // A type. We give types names with typedef and then later refer // to them via these names str += "typedef " + qid (t->type->declaration, rstack, id_type()) + " " + qid(t, rstack, id_type()) + ";\n"; } void emit_init_func (pIIR_LibraryUnit l, string &str, const string &body, RegionStack &rstack) { string lid = qid (l, rstack, id_type()); /* Emit prototypes for init funcs of units that we depend on. */ // Print line and file info last_pos_info = emit_posinfo (NO_SOURCE_LINE, str, last_pos_info, 0); if (l->continued) str += "int " + qid (l->continued, rstack, id_type ()) + "_init ();\n"; for (pIIR_LibraryUnitList ul = l->used_units; ul; ul = ul->rest) if (ul->first != l->continued) str += "int " + qid (ul->first, rstack, id_type ()) + "_init ();\n"; str += "bool " + lid + "_init_done = false;\n"; str += "int " + lid + "_init(){\n"; str += "if (" + lid + "_init_done) return 1;\n"; str += lid + "_init_done=true;\n"; /* Emit calls to init funcs of units that we depend on. */ if (l->continued) str += qid (l->continued, rstack, id_type ()) + "_init ();\n"; for (pIIR_LibraryUnitList ul = l->used_units; ul; ul = ul->rest) if (ul->first != l->continued) str += qid (ul->first, rstack, id_type ()) + "_init ();\n"; emit_source_file_register_code(l, str, rstack, 0); str += "name_stack iname;\n"; str += "iname.push(\"\");\n"; str += body; str += "iname.pop();\n"; if (l->is (IR_PACKAGE_DECLARATION)) { // If the body handle pointer is valid, then call the initialization // function for the package body! str += "handle_info *h = get_handle (\"" + string (l->library_name->text.to_chars()) + "\",\"" + nid (l, BARE) + "\",NULL);\n"; str += "if (h != NULL) (*h->init_function) ();\n"; } str += "return 1;\n"; str += "}\n"; if (l->is (IR_PACKAGE_BODY_DECLARATION)) { pIIR_PackageBodyDeclaration pb = (pIIR_PackageBodyDeclaration)l; str += "/* handle for simulator to find package body initialization function */\n"; // handle func str += "handle_info *"; // dummy var str += qid (pb, rstack, id_type()); str += "_hinfo =\n"; str += " add_handle(\""; str += string (pb->package->library_name->text.to_chars()) + "\",\"" + nid (pb->package, BARE) + "\",NULL"; str += ",NULL"; str += ",&" + qid (pb, rstack, id_type()) + "_init);\n"; } //str += "int " + lid + "_init_var=register_init_func (" + lid + "_init);\n"; } void m_emit_decl (pIIR_PackageDeclaration p, string &str, RegionStack &rstack, int l) { // Do nothing, if no code shall be generated for this library unit if (!generate_code (p)) return; // A package. Just emit all declarations in it. rstack.push(p); // Perform some optimizations optimize (p, rstack); str += "\n/* package " + get_long_name(p) + " */\n"; string impl_str, hdr_str, init_str; last_pos_info = NO_SOURCE_LINE; // emit implementation code. Note that during this call internal // code objects may also be generated which are finally outputted by // calling emit_global_internal_object_init and // emit_global_internal_object_declarations. emit_impl (p, impl_str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_external_decls(external_decls_list, p, str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_hdr (p, hdr_str, rstack, l); // ******************************************************************* // Define all internal global objects initializations // ******************************************************************* emit_global_internal_object_init(RootDeclarativeRegion(rstack), init_str, rstack); // ******************************************************************* // First, emit global prototypes // ******************************************************************* emit_global_internal_object_declarations(RootDeclarativeRegion(rstack), str, rstack); // The sequence of declarations is as follows: 1. external // declarations, 2. internal declarations, 3. other declarations str += hdr_str; // ******************************************************************* // Define all internal global objects // ******************************************************************* emit_global_internal_object_definitions(RootDeclarativeRegion(rstack), str, rstack); str += "/* Initialization function for package "+get_long_name(p)+" */\n"; emit_init_func (p, str, "void *sref=register_package(\":" + nid(p, LIBRARY|BARE) + "\",\":" + nid(p, BARE) + "\");\n" + init_str + impl_str, rstack); str += "\n/* end of package " + get_long_name(p) + " */\n"; rstack.pop(); } void m_emit_decl (pIIR_PackageBodyDeclaration pb, string &str, RegionStack &rstack, int l) { // Do nothing, if no code shall be generated for this library unit if (!generate_code (pb)) return; // A package body. Just emit all declarations in it. rstack.push(pb); // Perform some optimizations optimize (pb, rstack); str += "\n/* package body " + get_long_name(pb) + " */\n"; string impl_str, hdr_str, init_str; last_pos_info = NO_SOURCE_LINE; // emit implementation code. Note that during this call internal // code objects may also be generated which are finally outputted by // calling emit_global_internal_object_init and // emit_global_internal_object_declarations. emit_impl (pb, impl_str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_external_decls (external_decls_list, pb, str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_hdr (pb, hdr_str, rstack, l); // ******************************************************************* // Define all internal global objects initializations // ******************************************************************* emit_global_internal_object_init(RootDeclarativeRegion(rstack), init_str, rstack); // ******************************************************************* // First, emit global prototypes // ******************************************************************* emit_global_internal_object_declarations(RootDeclarativeRegion(rstack), str, rstack); // The sequence of declarations is as follows: 1. external // declarations, 2. internal declarations, 3. other declarations str += hdr_str; // ******************************************************************* // Define all internal global objects // ******************************************************************* emit_global_internal_object_definitions(RootDeclarativeRegion(rstack), str, rstack); str += "/* Initialization function for package body " + get_long_name(pb) + " */\n"; emit_init_func (pb, str, "void *sref=register_package_body(\":" + nid(pb, LIBRARY|BARE) + "\",\":" + nid(pb, BARE) + "\");\n" + init_str + impl_str, rstack); str += "\n/* end of package body " + get_long_name(pb) + " */\n"; rstack.pop(); } void m_emit_decl (pIIR_EntityDeclaration e, string &str, RegionStack &rstack, int l) { // Do nothing, if no code shall be generated for this library unit if (!generate_code (e)) return; rstack.push(e); // Perform some optimizations optimize (e, rstack); string impl_str, hdr_str, init_str; last_pos_info = NO_SOURCE_LINE; // emit implementation code. Note that during this call internal // code objects may also be generated which are finally outputted by // calling emit_global_internal_object_init and // emit_global_internal_object_declarations. emit_impl (e, impl_str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_external_decls(external_decls_list, e, str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_hdr(e, hdr_str, rstack, l); // ******************************************************************* // Define all internal global objects initializations // ******************************************************************* emit_global_internal_object_init(RootDeclarativeRegion(rstack), init_str, rstack); // ******************************************************************* // First, emit global prototypes // ******************************************************************* emit_global_internal_object_declarations(RootDeclarativeRegion(rstack), str, rstack); str += hdr_str; // ******************************************************************* // Define all internal global objects // ******************************************************************* emit_global_internal_object_definitions(RootDeclarativeRegion(rstack), str, rstack); str += impl_str; str += "\n"; str += "/* Initialization function for entity "+get_long_name(e)+" */\n"; emit_init_func (e, str, init_str, rstack); str += "\n/* end of " + qid(e, rstack, id_type()) + " Entity */\n"; rstack.pop(); } void // emit Arch decl=hdr+impl+procs m_emit_decl (pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack, int l) { // Do nothing, if no code shall be generated for this library unit if (!generate_code (a)) return; rstack.push(a->entity); rstack.push(a); pIIR_EntityDeclaration e = a->entity; // Perform some optimizations optimize (a, rstack); string impl_str, hdr_str, init_str; last_pos_info = NO_SOURCE_LINE; // emit implementation code. Note that during this call internal // code objects may also be generated which are finally outputted by // calling emit_global_internal_object_init and // emit_global_internal_object_declarations. emit_impl (a, impl_str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_external_decls(external_decls_list, a, str, rstack, l); last_pos_info = NO_SOURCE_LINE; emit_hdr (a, hdr_str, rstack, l); // ******************************************************************* // Define all internal global objects initializations // ******************************************************************* emit_global_internal_object_init(RootDeclarativeRegion(rstack), init_str, rstack); // ******************************************************************* // First, emit global prototypes // ******************************************************************* emit_global_internal_object_declarations(RootDeclarativeRegion(rstack), str, rstack); str += hdr_str; // ******************************************************************* // Define all internal global objects // ******************************************************************* emit_global_internal_object_definitions(RootDeclarativeRegion(rstack), str, rstack); str += impl_str; str += "\n"; str += "/* Initialization function for architecture " + get_long_name(a) + " */\n"; emit_init_func (a, str, init_str, rstack); str += "\n/* end of " + get_long_name(a) + " Architecture */\n"; rstack.pop(); rstack.pop(); } void m_emit_decl (pIIR_ConfigurationDeclaration c, string &str, RegionStack &rstack, int l) { // Do nothing, if no code shall be generated for this library unit if (!generate_code (c)) return; str += "\n/* configuration " + qid(c, rstack, id_type()) + " */\n"; } void m_emit_decl (pIIR_ComponentDeclaration c, string &str, RegionStack &rstack, int l) { // A component. Emit its interface. str += "component " + qid(c, rstack, id_type()) + " (\n"; str += ");\n"; } /* * Main cc file */ void m_emit_main (pIIR_Declaration d, string &str, RegionStack &rstack, int l) { } void m_emit_main (pIIR_ConfigurationDeclaration c, string &str, RegionStack &rstack, int l) { codegen_error.error ("%: sorry configurations are currently not supported!", c); } void m_emit_main (pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack, int l) { rstack.push(a->entity); rstack.push(a); pIIR_EntityDeclaration e = a->entity; string lid = qid (a, rstack, id_type()); str += "/* Main function for architecture " + get_long_name(a) + " */\n"; str += string ("#include\n") + "int main (int argc, char *argv[]) \n" + "\n" + "{\n" + " extern handle_info *" + qid (a, rstack, id_type()) + "_hinfo;\n" + " extern int kernel_main (int, char *[], handle_info*);\n" + " return kernel_main (argc, argv, " + qid (a, rstack, id_type()) + "_hinfo);\n" + "}\n"; str += "\n/* end of " + get_long_name(a) + " main function */\n"; rstack.pop(); rstack.pop(); } /* * Headers */ void m_emit_hdr (pIIR_EntityDeclaration e, string &str, RegionStack &rstack, int l) // Entity header { str += string ("/* Entity class declaration */\n") + string ("class ") + qid(e, rstack, id_type()) + string(" {\n") + string ("public:\n") + string (" void *father_component;\n") + string (" ") + qid(e, rstack, id_type()) + string (" (name_stack &iname, map_list *mlist, void *father);\n") + string (" ~") + qid(e, rstack, id_type()) + string ("() {};\n"); emit_decls (extended_generic_clause(e), str, rstack, 2); // emit signal decls emit_decls (extended_port_clause(e), str, rstack, 2); // emit signal decls str += "};\n\n"; } void // Arch header m_emit_hdr (pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack, int l) { pIIR_EntityDeclaration e = a->entity; str += string("/* Architecture class declaration */\n") + string("class ") + qid(a, rstack, id_type()) + string(" : public ") + qid(e, rstack, id_type()) + string(" {\n") + string("public:\n") + " " + qid(a, rstack, id_type()) + string(" (name_stack &iname, map_list *mlist, void *father, int level);\n") + " " + string("~") + qid(a, rstack, id_type()) + string("();\n"); emit_decls (extended_declarations(a), str, rstack, 2); // emit signal decls str += "};\n"; emit_hdr(a->architecture_statement_part, str, rstack, 2); // emit process hdrs } void // ConcStat headers m_emit_hdr (pIIR_ConcurrentStatementList csl, string &str, RegionStack &rstack, int l) { str += "\n/* Concurrent statement class declaration(s) */\n\n"; while (csl) { emit_hdr (csl->first, str, rstack, l); csl = csl->rest; } } void m_emit_hdr (pIIR_ConcurrentStatement p, string &str, RegionStack &rstack, int l) { rstack.push(p); str += "/* Concurrent Statement header */\n"; rstack.pop(); } void m_emit_hdr (pIIR_BlockStatement bs, string &str, RegionStack &rstack, int l) { rstack.push(bs); str += "/* Block Statement header */\n"; rstack.pop(); } void m_emit_hdr (pIIR_ConcurrentGenerateStatement gs, string &str, RegionStack &rstack, int l) { rstack.push(gs); // Create a list of declarative region pointers beginning from the // target region up to the root region list RegionList = create_region_list(gs); RegionList.pop_front(); str += "\n/* Class generate statement " + nid(gs, BARE) + " */\n" + "class " + qid(gs, rstack, id_type()) + " {\n" + "public:\n"; // Create constructor parameters from extended_interface_dclarations // list string constructor_pars, separator; for (pIIR_DeclarationList eil = extended_interface_declarations(gs); eil; eil = eil->rest) if (eil->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { pV2CC_InternalObjectDeclaration iobj = pV2CC_InternalObjectDeclaration(eil->first); constructor_pars += separator + iobj->cpp_type_string + " " + iobj->declarator->text.to_chars() + "_PAR"; separator = ","; } // Declare constructor str += spaces(2) + qid(gs, rstack, id_type()) + "(" + constructor_pars + ",name_stack &iname,int level);\n"; // Emit code to initialize some interal process members if (extended_interface_declarations(gs)!= NULL) emit_decls(extended_interface_declarations(gs), str, rstack, 2); if (extended_declarations(gs) != NULL) emit_decls(extended_declarations(gs), str, rstack, 2); str += "};\n"; // Emit header code of included concurrent statements emit_hdr(gs->concurrent_statement_part, str, rstack, 2); rstack.pop(); } void m_emit_hdr (pIIR_ComponentInstantiationStatement ci, string &str, RegionStack &rstack, int l) { } void //emit hdr for Process m_emit_hdr (pIIR_ProcessStatement p, string &str, RegionStack &rstack, int l) { rstack.push(p); // Create parameter list for class contructor string separator, constructor_pars; for (pIIR_DeclarationList eil = extended_interface_declarations(p); eil; eil = eil->rest) if (eil->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { pV2CC_InternalObjectDeclaration iobj = pV2CC_InternalObjectDeclaration(eil->first); constructor_pars += separator + iobj->cpp_type_string + " " + iobj->declarator->text.to_chars() + "_PAR"; separator = ","; } str += "\n/* Class decl. process " + nid(p, BARE) + " */\n" + "class " + qid(p, rstack, id_type()) + " : public process_base {\n" + "public:\n" + " " + qid(p, rstack, id_type()) + "(" + constructor_pars + ",name_stack &iname);\n" + " ~" + qid(p, rstack, id_type()) + "() {};\n" + " bool execute();\n"; // execute() // get context object. The contex stores various informations needed during // the code generation process ContextInfo &pctxt = *ActiveContext(rstack); // Declare additional class member if (extended_interface_declarations(p) != NULL) emit_decls(extended_interface_declarations(p), str, rstack, 2); // ***************************************************************************** // create the driver pointer for each signal that is written by the // process // ***************************************************************************** bool first = true; const char *sep = " "; // first, get a list of driven signals access_list driven_sigs = filter_unique(pctxt.accessed_objects, WRITE, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (access_list::iterator i = driven_sigs.begin(); i != driven_sigs.end(); i++) { if (first) { first = false; str += " driver_info"; } str += string(sep) + "*" + qid((*i).declaration, rstack, DRIVER); sep = ","; } if (!first) str += ";\n"; // ***************************************************************************** // get reader pointer for all signals that are read within the // process // ***************************************************************************** pIIR_TypeDeclaration old_type = NULL; first = true; sep = " "; // first, get a list of read signals access_list read_sigs = filter_unique(pctxt.accessed_objects, READ, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (access_list::iterator i = read_sigs.begin(); i != read_sigs.end(); i++) { pIIR_Type subtype = pIIR_ObjectDeclaration((*i).declaration)->subtype; pIIR_TypeDeclaration type = subtype != NULL? get_declaration(subtype) : NULL; if (type != old_type || (type == NULL && old_type == NULL)) { if (!first) str +=";\n"; str += " " + ((type != NULL)? qid(type, rstack, TYPE) : "enumeration"); first = false; sep = " "; old_type = type; } str += string(sep) + "*" + qid((*i).declaration, rstack, READER); sep = ","; } if (read_sigs.size()) str += ";\n"; // ***************************************************************************** // Create local copy of sig_info pointer for signals that are prefix // of a signal function kind attribute (e.g. event, active, // last_event, last_active,...) // ***************************************************************************** old_type = NULL; first = true; sep = " "; // first, get a list of signals which are prefix of an attribute access_list attr_sigs = filter_unique(pctxt.accessed_objects, SIGNAL_FUNCTION_ATTRIBUTE, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (access_list::iterator i = attr_sigs.begin(); i != attr_sigs.end(); i++) { pIIR_TypeDeclaration type = get_declaration(pIIR_ObjectDeclaration((*i).declaration)->subtype); if (type != old_type) { if (!first) str +=";\n"; str += " sig_info<" + qid(type, rstack, TYPE) + ">"; first = false; sep = " "; old_type = type; } str += string(sep) + "*" + qid((*i).declaration, rstack, DEFAULT); sep = ","; } if (attr_sigs.size()) str += ";\n"; // ***************************************************************************** // declare variables and constants // ***************************************************************************** emit_decls(extended_declarations(p), str, rstack, l); // ***************************************************************************** // declare winfo_item array // ***************************************************************************** if (pctxt.wait_statements.size() > 0) str += string(" winfo_item winfo[") + to_string (pctxt.wait_statements.size()) + string("];\n"); // ***************************************************************************** // ptr to parent architecture // ***************************************************************************** str += string(" ") + qid(p->declarative_region, rstack, id_type()) + string(" *arch;\n") + string("};\n"); rstack.pop(); } // emit_hdr for Process // Emit subprogram prototype. Parameter full_prototype controls // whether the parameter names of the subprogram (full_prototype=true) // are printed or not. string emit_subprogram_prototype(pIIR_SubprogramDeclaration sbp, RegionStack &rstack, bool full_prototype, int l) { string str, return_type_str; string separator = ""; // Check whether sbp is a function or a procedure bool is_function = sbp->is(IR_FUNCTION_DECLARATION); // Determine return type of generated function if (sbp->is(IR_FUNCTION_DECLARATION)) return_type_str = qid(get_declaration(pIIR_FunctionDeclaration(sbp)->return_type), rstack, TYPE); else return_type_str = "void"; // Print return type and name str += return_type_str + " " + qid(sbp, rstack, DEFAULT) + "("; // **************************************************************************** // Analyze normal subprogram parameter // **************************************************************************** for (pIIR_DeclarationList il = extended_interface_declarations(sbp); il; il = il->rest) { if (!il->first->is(IR_INTERFACE_DECLARATION)) continue; pIIR_InterfaceDeclaration par = pIIR_InterfaceDeclaration(il->first); // The parameter is passed in by reference if it is a non scalar // type or if the parameter is of mode OUT, INOUT or BUFFER. bool call_by_reference = !is_scalar_type(par->subtype) || par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE; // Determine whether the parameter must be copied back bool copy_back = is_scalar_type(par->subtype) && (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter must be copied in bool copy_in = copy_back && (par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter can be used directly or an // temporary must be created. It cannot be used directly if the // parameter value must be copied back or the parameter type is a // constrained array type. bool direct_use = !(copy_back || is_constrained_array_type(par->subtype)); if (par->is(IR_VARIABLE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + (!direct_use? "_PAR" : ""); } else if (par->is(IR_CONSTANT_INTERFACE_DECLARATION)) { str += separator + "const " + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + (!direct_use? "_PAR" : ""); } else if (par->is(IR_FILE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + (!direct_use? "_PAR" : ""); } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // Signal values are NOT copied back! Instead, any operations // are directly applied on the corresponding reader/driver... copy_back = false; direct_use = true; // First, append sig_info pointer str += separator + "sig_info<" + qid(get_declaration(par->subtype), rstack, TYPE) + "> *"; if (full_prototype) str += qid(par, rstack, SIGNAL); // Next, append reader if signal is of mode in or inout or buffer if (par->mode == IR_IN_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += "," + qid(get_declaration(par->subtype), rstack, TYPE) + " *"; if (full_prototype) str += qid(par, rstack, READER); } // Finally, append driver if mode is of out or inout or buffer if (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += ",driver_info *"; if (full_prototype) str += qid(par, rstack, DRIVER); } } // Set separator for next parameter separator = ","; } // **************************************************************************** // Analyze extra subprogram parameter // **************************************************************************** list &extra_parameter = context(sbp).extra_interface_objects; for (list::iterator iter = extra_parameter.begin(); iter != extra_parameter.end(); iter++) { pIIR_Declaration par = (*iter).declaration; if (par->is(IR_VARIABLE_INTERFACE_DECLARATION) || par->is(IR_VARIABLE_DECLARATION) || par->is(IR_CONSTANT_INTERFACE_DECLARATION) || par->is(IR_CONSTANT_DECLARATION) || par->is(IR_FILE_DECLARATION) || par->is(IR_FILE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(pIIR_ObjectDeclaration(par)->subtype), rstack, TYPE) + " &"; if (full_prototype) str += qid(par, rstack, DEFAULT); } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION) || par->is(IR_SIGNAL_DECLARATION)) { pIIR_ObjectDeclaration opar = pIIR_ObjectDeclaration(par); AccessFlags &aflags = (*iter).access_type; string decl_type; if (opar->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) decl_type = "enumeration"; else decl_type = qid(get_declaration(opar->subtype), rstack, TYPE); // Add sig_info pointer if a signal function kind attribute has // been applied on the parameter if (aflags & SIGNAL_FUNCTION_ATTRIBUTE) { str += separator + "sig_info<" + decl_type + "> *"; if (full_prototype) str += qid(par, rstack, SIGNAL); separator = ","; } // Next, append reader if signal is read if (aflags & READ) { str += separator + decl_type + " *"; if (full_prototype) str += qid(par, rstack, READER); separator = ","; } // Finally, append driver if signal is written if (aflags & WRITE) { str += separator + "driver_info *"; if (full_prototype) str += qid(par, rstack, DRIVER); } } else if (par->is(IR_TYPE_DECLARATION) || par->is(IR_SUBTYPE_DECLARATION)) { // A type has been used and we need to pass over the type info // pointer of that type! str += separator + qid(par, rstack, INFO) + " &"; if (full_prototype) str += qid(par, rstack, INFO) + "_INFO"; } // Set separator for next parameter separator = ","; } str += ")"; return str; } // Emit procedure class constructor (I.e., this subprograms contains // waits and hence must be converted into a corresponding // class). Parameter full_prototype controls whether the parameter // names of the subprogram (full_prototype=true) are printed or not. string emit_delayed_procedure_constructor (pIIR_ProcedureDeclaration sbp, RegionStack &rstack, bool full_prototype, int l) { string str; string separator = ""; // Print return type and name str += qid(sbp, rstack, DEFAULT) + " (process_base *" + string (full_prototype ? "process_PAR," : ",") + + "winfo_item &" + string (full_prototype ? "winfo_PAR," : ","); // **************************************************************************** // Analyze normal subprogram parameter // **************************************************************************** for (pIIR_DeclarationList il = extended_interface_declarations(sbp); il; il = il->rest) { if (!il->first->is(IR_INTERFACE_DECLARATION)) continue; pIIR_InterfaceDeclaration par = pIIR_InterfaceDeclaration(il->first); // The parameter is passed in by reference if it is a non scalar // type or if the parameter is of mode OUT, INOUT or BUFFER. bool call_by_reference = !is_scalar_type(par->subtype) || par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE; // Determine whether the parameter must be copied back bool copy_back = is_scalar_type(par->subtype) && (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter must be copied in bool copy_in = copy_back && (par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter can be used directly or an // temporary must be created. It cannot be used directly if the // parameter value must be copied back or the parameter type is a // constrained array type. bool direct_use = !(copy_back || is_constrained_array_type(par->subtype)); if (par->is(IR_VARIABLE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + "_PAR"; } else if (par->is(IR_CONSTANT_INTERFACE_DECLARATION)) { str += separator + "const " + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + "_PAR"; } else if (par->is(IR_FILE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " "); if (full_prototype) str += qid(par, rstack, DEFAULT) + "_PAR"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // Signal values are NOT copied back! Instead, any operations // are directly applied on the corresponding reader/driver... copy_back = false; direct_use = true; // First, append sig_info pointer str += separator + "sig_info<" + qid(get_declaration(par->subtype), rstack, TYPE) + "> *"; if (full_prototype) str += qid(par, rstack, SIGNAL) + "_PAR"; // Next, append reader if signal is of mode in or inout or buffer if (par->mode == IR_IN_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += "," + qid(get_declaration(par->subtype), rstack, TYPE) + " *"; if (full_prototype) str += qid(par, rstack, READER) + "_PAR"; } // Finally, append driver if mode is of out or inout or buffer if (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += ",driver_info *"; if (full_prototype) str += qid(par, rstack, DRIVER) + "_PAR"; } } else continue; // Set separator for next parameter separator = ","; } // **************************************************************************** // Analyze extra subprogram parameter // **************************************************************************** list &extra_parameter = context(sbp).extra_interface_objects; for (list::iterator iter = extra_parameter.begin(); iter != extra_parameter.end(); iter++) { pIIR_Declaration par = (*iter).declaration; if (par->is(IR_VARIABLE_INTERFACE_DECLARATION) || par->is(IR_VARIABLE_DECLARATION) || par->is(IR_CONSTANT_INTERFACE_DECLARATION) || par->is(IR_CONSTANT_DECLARATION) || par->is(IR_FILE_DECLARATION) || par->is(IR_FILE_INTERFACE_DECLARATION)) { str += separator + qid(get_declaration(pIIR_ObjectDeclaration(par)->subtype), rstack, TYPE) + " &"; if (full_prototype) str += qid(par, rstack, DEFAULT) + "_PAR"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION) || par->is(IR_SIGNAL_DECLARATION)) { pIIR_ObjectDeclaration opar = pIIR_ObjectDeclaration(par); AccessFlags &aflags = (*iter).access_type; string decl_type; if (opar->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) decl_type = "enumeration"; else decl_type = qid(get_declaration(opar->subtype), rstack, TYPE); // Add sig_info pointer if a signal function kind attribute has // been applied on the parameter if ((aflags & SIGNAL_FUNCTION_ATTRIBUTE) || (aflags & SENSITIVE)) { str += separator + "sig_info<" + decl_type + "> *"; if (full_prototype) str += qid(par, rstack, SIGNAL) + "_PAR"; separator = ","; } // Next, append reader if signal is read if (aflags & READ) { str += separator + decl_type + " *"; if (full_prototype) str += qid(par, rstack, READER) + "_PAR"; separator = ","; } // Finally, append driver if signal is written if (aflags & WRITE) { str += separator + "driver_info *"; if (full_prototype) str += qid(par, rstack, DRIVER)+ "_PAR"; } } else if (par->is(IR_TYPE_DECLARATION) || par->is(IR_SUBTYPE_DECLARATION)) { // A type has been used and we need to pass over the type info // pointer of that type! str += separator + qid(par, rstack, INFO) + " &"; if (full_prototype) str += qid(par, rstack, INFO) + "_INFO_PAR"; } else continue; // Set separator for next parameter separator = ","; } str += ")"; return str; } // Print subprogram prototype to str void //emit hdr for subprograms m_emit_hdr (pIIR_PredefinedProcedureDeclaration sbp, string &str, RegionStack &rstack, int l) { rstack.push(sbp); str += "/* Prototype for predefined subprogram " + get_long_name(sbp) + " */\n"; // Emit the various implicit subprogram prototypes string proc_name = convert_string(sbp->declarator->text.to_chars(), tolower); if (proc_name == "deallocate") { // *************************************************************** // Dellocate operation // *************************************************************** str += "#define " + qid(sbp, rstack, DEFAULT) + "(p,a) p=(p!=NULL?(a.designated_type_info->remove(p),(void*)NULL):(void*)NULL)\n"; } else if (proc_name == "file_open") { // *************************************************************** // File open operation // ************************************************************** if (get_base_type(sbp->interface_declarations->first->subtype)->is(IR_FILE_TYPE)) { // If the first procedure parameter is of a file type then the // file_open procedure which does not return status information // is emitted. str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,n,k) file_open(f,n,k)\n"; } else { // Otherwise, the first parameter takes the file open status. str += "#define " + qid(sbp, rstack, DEFAULT) + "(s,f,n,k) file_open(s,f,n,k)\n"; } } else if (proc_name == "read") { // *************************************************************** // File read operation // *************************************************************** pIIR_Type element_type = pIIR_FileType(sbp->interface_declarations->first->subtype)->type_mark; // The actual file read opertation depends on the file element // type if (is_array_type(element_type)) { if (!is_constrained_array_type(element_type)) // If the file elemement type is an unconstrained array then a // special file read operation must be used. This read operation // has an additional parameter to return the number of array // elements written into the destination array. str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v,l) file_read_array(f,&v,l)\n"; else str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_read_array(f,&v)\n"; } else if (get_base_type(element_type)->is(IR_RECORD_TYPE)) { str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_read_record(f,&v)\n"; } else { string element_type_str = qid(get_base_type(element_type), rstack, TYPE); str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_read_scalar(f,&v,sizeof(" + element_type_str + "))\n"; } } else if (proc_name == "write") { // *************************************************************** // File write operation // *************************************************************** pIIR_Type element_base_type = get_base_type(pIIR_FileType(sbp->interface_declarations->first->subtype)->type_mark); // The actual file write opertation depends on the file element // type if (element_base_type->is(IR_ARRAY_TYPE)) str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_write_array(f,const_pointer(v))\n"; else if (element_base_type->is(IR_RECORD_TYPE)) str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_write_record(f,const_pointer(v))\n"; else { string element_base_type_str = qid(element_base_type, rstack, TYPE); str += "#define " + qid(sbp, rstack, DEFAULT) + "(f,v) file_write_scalar(f,const_pointer(v),sizeof(" + element_base_type_str + "))\n"; } } else if (proc_name == "file_close") { // *************************************************************** // File write operation // *************************************************************** str += "#define " + qid(sbp, rstack, DEFAULT) + "(f) file_close(f)\n"; } else assert(false); rstack.pop(); } // Print subprogram prototype to str void //emit hdr for subprograms m_emit_hdr (pIIR_PredefinedFunctionDeclaration sbp, string &str, RegionStack &rstack, int l) { rstack.push(sbp); str += "/* Prototype for predefined function " + get_long_name(sbp) + " */\n"; // Emit the various implicit subprogram prototypes string func_name = convert_string(sbp->declarator->text.to_chars(), tolower); if (func_name == "endfile") str += "#define " + qid(sbp, rstack, DEFAULT) + "(f) file_eof(f)\n"; rstack.pop(); } // Print subprogram prototype to str void //emit hdr for subprograms m_emit_hdr (pIIR_SubprogramDeclaration sbp, string &str, RegionStack &rstack, int l) { // Nothing to do if sbp is a standard operator if (sbp->is (IR_FUNCTION_DECLARATION) && get_operator_type(sbp) == STD_OP) return; rstack.push(sbp); // Check out whether this is a normal plain subprogram or a // procedure that contain wait statements. if (sbp->is (IR_PROCEDURE_DECLARATION) && (has_wait (pIIR_ProcedureDeclaration (sbp)) || has_wait_for (pIIR_ProcedureDeclaration (sbp)))) { // Ok, there are waits in this procedure. Hence, we need some // special handling for this. Each such procedure is translated // into a corresponding class similar to a process class. // First, determine declarations that belong to corresponding // constructor parameters string decl_str; // **************************************************************************** // Analyze normal subprogram parameter // **************************************************************************** for (pIIR_DeclarationList il = extended_interface_declarations(sbp); il; il = il->rest) { if (!il->first->is(IR_INTERFACE_DECLARATION)) continue; pIIR_InterfaceDeclaration par = pIIR_InterfaceDeclaration(il->first); // The parameter is passed in by reference if it is not a scalar // type or if the parameter is of mode OUT, INOUT or BUFFER. bool call_by_reference = !is_scalar_type(par->subtype) || par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE; // Determine whether the parameter must be copied back bool copy_back = (is_scalar_type(par->subtype) || is_constrained_array_type (get_basic_type (par->subtype))) && (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter must be copied in bool copy_in = copy_back && (par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter can be used directly or an // temporary must be created. It cannot be used directly if the // parameter value must be copied back or the parameter type is a // constrained array type. bool direct_use = !(copy_back || is_constrained_array_type(par->subtype)); if (par->is(IR_VARIABLE_INTERFACE_DECLARATION)) { decl_str += spaces (l + 2) + qid (get_declaration(par->subtype), rstack, TYPE) + (call_by_reference && !copy_back? " &" : " ") + qid (par, rstack, DEFAULT) + ";\n"; if (copy_back) decl_str += spaces (l + 2) + qid (get_declaration(par->subtype), rstack, TYPE) + " &" + qid (par, rstack, DEFAULT) + "_REF;\n"; } else if (par->is(IR_CONSTANT_INTERFACE_DECLARATION)) { decl_str += spaces (l + 2) + "const " + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " ") + qid (par, rstack, DEFAULT) + ";\n"; } else if (par->is(IR_FILE_INTERFACE_DECLARATION)) { decl_str += spaces (l + 2) + qid(get_declaration(par->subtype), rstack, TYPE) + (call_by_reference? " &" : " ") + qid(par, rstack, DEFAULT) + ";\n"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // Signal values are NOT copied back! Instead, any operations // are directly applied on the corresponding reader/driver... copy_back = false; direct_use = true; // First, append sig_info pointer decl_str += spaces (l + 2) + "sig_info<" + qid(get_declaration(par->subtype), rstack, TYPE) + "> *" + qid(par, rstack, SIGNAL) + ";\n"; // Next, append reader if signal is of mode in or inout or buffer if (par->mode == IR_IN_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { decl_str += spaces (l + 2) + qid(get_declaration(par->subtype), rstack, TYPE) + " *" + qid(par, rstack, READER) + ";\n"; } // Finally, append driver if mode is of out or inout or buffer if (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { decl_str += spaces (l + 2) + "driver_info *" + qid(par, rstack, DRIVER) + ";\n"; } } } // **************************************************************************** // Analyze extra subprogram parameter // **************************************************************************** list &extra_parameter = context(sbp).extra_interface_objects; for (list::iterator iter = extra_parameter.begin(); iter != extra_parameter.end(); iter++) { pIIR_Declaration par = (*iter).declaration; if (par->is(IR_VARIABLE_INTERFACE_DECLARATION) || par->is(IR_VARIABLE_DECLARATION) || par->is(IR_CONSTANT_INTERFACE_DECLARATION) || par->is(IR_CONSTANT_DECLARATION) || par->is(IR_FILE_DECLARATION) || par->is(IR_FILE_INTERFACE_DECLARATION)) { decl_str += spaces (l + 2) + qid(get_declaration(pIIR_ObjectDeclaration(par)->subtype), rstack, TYPE) + " &" + qid(par, rstack, DEFAULT) + ";\n"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION) || par->is(IR_SIGNAL_DECLARATION)) { pIIR_ObjectDeclaration opar = pIIR_ObjectDeclaration(par); AccessFlags &aflags = (*iter).access_type; string decl_type; if (opar->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) decl_type = "enumeration"; else decl_type = qid(get_declaration(opar->subtype), rstack, TYPE); // Add sig_info pointer if a signal function kind attribute has // been applied on the parameter if ((aflags & SIGNAL_FUNCTION_ATTRIBUTE) || (aflags & SENSITIVE)) { decl_str += spaces (l + 2) + "sig_info<" + decl_type + "> *" + qid(par, rstack, SIGNAL) + ";\n"; } // Next, append reader if signal is read if (aflags & READ) { decl_str += spaces (l + 2) + decl_type + " *" + qid(par, rstack, READER) + ";\n"; } // Finally, append driver if signal is written if (aflags & WRITE) { decl_str += spaces (l + 2) + "driver_info *" + qid(par, rstack, DRIVER) + ";\n"; } } else if (par->is(IR_TYPE_DECLARATION) || par->is(IR_SUBTYPE_DECLARATION)) { // A type has been used and we need to pass over the type info // pointer of that type! decl_str += spaces (l + 2) + qid(par, rstack, INFO) + " &" + qid(par, rstack, INFO) + "_INFO;\n"; } } str += "/* Class decl. for subprogram " + get_long_name(sbp) + " (contains waits) */\n"; str += "class " + qid(sbp, rstack, DEFAULT) + " : public delayed_procedure_base {\n"; str += "public:\n"; str += " " + emit_delayed_procedure_constructor (pIIR_ProcedureDeclaration (sbp), rstack, false, 2) + ";\n"; str += " ~" + qid(sbp, rstack, DEFAULT) + " ();\n"; str += " bool execute ();\n"; str += " /* declarations connected with subprogram interface */\n"; str += decl_str; str += " /* local declarations */\n"; // ***************************************************************************** // declare variables and constants // ***************************************************************************** emit_decls(extended_declarations(sbp), str, rstack, l + 2); str += "};\n"; } else { // Ok, this is a plain subprogram. str += "/* Prototype for subprogram " + get_long_name(sbp) + " */\n"; str += emit_subprogram_prototype(sbp, rstack, false, l); str += ";\n"; } rstack.pop(); } void m_emit_hdr (pIIR_EnumerationType et, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = et->declaration; str += "/* Definitions for enumeration type " + get_long_name(decl) + " */\n"; // Emit enum info class definition str += "class " + qid(decl, rstack, INFO) + ":public enum_info_base{\n" + " static const char *values[];\n" + "public:\n" + " " + qid(decl, rstack, INFO) + "():enum_info_base(0,"+ to_string(enum_item_number(et) - 1) + ",values) {};\n" + " static const char **get_values() { return values; }\n" + " static int low() { return 0; }\n" + " static int high() { return " + to_string(enum_item_number(et) - 1) + "; }\n" + " static int left() { return 0; }\n" + " static int right() { return " + to_string(enum_item_number(et) - 1) + "; }\n" + "};\n"; // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(et) == RootDeclarativeRegion(rstack)) str += "extern " + qid(decl, rstack, INFO) + " " + qid(decl, rstack, INFO) + "_INFO;\n"; } void m_emit_hdr (pIIR_AccessType at, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = at->declaration; str += "/* Definitions for access type " + get_long_name(decl) + " */\n"; // The derived info class is just a access_info_base! str += "#define " + qid(at, rstack, INFO) + " access_info_base\n"; // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(at) == RootDeclarativeRegion(rstack)) str += "extern access_info_base " + qid(at, rstack, INFO) + "_INFO;\n"; } void m_emit_hdr (pIIR_FileType ft, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = ft->declaration; str += "/* Definitions for file type " + get_long_name(decl) + " */\n"; // The derived info class is just a vhdlfile_info_base! str += "#define " + qid(ft, rstack, INFO) + " vhdlfile_info_base\n"; // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(ft) == RootDeclarativeRegion(rstack)) str += "extern vhdlfile_info_base " + qid(ft, rstack, INFO) + "_INFO;\n"; } void m_emit_hdr (pIIR_ArrayType at, string &str, RegionStack &rstack, int l) { int counter = 0; // Count number of dimensions for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) counter++; // If the array hase more than a single dimension then first declare // the a separate internal array type for each dimension. Note that // e.g. a two-dimensional array "type mytype array(integer range <>, // positive range <>) of bit" is transformed into two one // dimentional arrays similar to: "type internal_array is // array(positive range <>) of bit" and "type mytype is // array(integer range <>) of internal_array". string array_type_str = qid(at->element_type, rstack, TYPE); for (int i = counter; i >= 1; i--) { pIIR_TypeList tl = at->index_types; for (int j = 1; j < i; j++) tl = tl->rest; array_type_str = "array_type<" + array_type_str + " >"; } // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(at) == RootDeclarativeRegion(rstack)) str += "extern array_info " + qid(at->declaration, rstack, INFO) + "_INFO;\n"; str += "#define " + qid(at->declaration, rstack, TYPE) + " " + array_type_str + "\n"; str += "#define " + qid(at->declaration, rstack, INFO) + " array_info\n\n"; } void m_emit_hdr (pIIR_ArraySubtype ast, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = ast->declaration; // Test whether the array subtype introduces some constraints if (ast->constraint == NULL) { // Ok, no new constraints. Hence, derive array type and array info // from immediate base type // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(ast) == RootDeclarativeRegion(rstack)) str += "extern array_info " + qid(ast, rstack, INFO) + "_INFO;\n"; str += "#define " + qid(ast, rstack, TYPE) + " " + qid(ast->immediate_base, rstack, TYPE) + "\n"; str += "#define " + qid(ast, rstack, INFO) + " array_info\n\n"; } else { // A constrained subtype. Get base type of array subtype. assert(ast->base->is(IR_ARRAY_TYPE)); pIIR_ArrayType array_type = pIIR_ArrayType(ast->base); int counter = 0; // Count number of dimensions for (pIIR_TypeList tl = ast->constraint; tl; tl = tl->rest) counter++; // If the array hase more than a single dimension then first declare // the a separate internal array type for each dimension. Note that // e.g. a two-dimensional array "type mytype array(integer range <>, // positive range <>) of bit" is transformed into two one // dimentional arrays similar to: "type internal_array is // array(positive range <>) of bit" and "type mytype is // array(integer range <>) of internal_array". string array_type_str = qid(array_type->element_type, rstack, TYPE); for (int i = counter; i >= 1; i--) { pIIR_TypeList tl = array_type->index_types; for (int j = 1; j < i; j++) tl = tl->rest; array_type_str = "array_type<" + array_type_str + " >"; } // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(ast) == RootDeclarativeRegion(rstack)) str += "extern array_info " + qid(ast, rstack, INFO) + "_INFO;\n"; str += "#define " + qid(ast, rstack, TYPE) + " " + array_type_str + "\n"; str += "#define " + qid(ast, rstack, INFO) + " array_info\n\n"; } } void m_emit_hdr (pIIR_ScalarSubtype sst, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = get_declaration(sst); // Is the subtype constrained or at least a resolution function hase // been added? if (sst->range == NULL && sst->resolution_function == NULL) { // No, the subtype is not constrained. Hence, the type info // object is a copy of the type info object of the base type. str += "#define " + qid(decl, rstack, INFO) + " " + qid(get_declaration(sst->immediate_base), rstack, INFO) + "\n"; } else if (sst->base->is(IR_ENUMERATION_TYPE)) { // **************************************************************************** // Enumeration subtype // **************************************************************************** // The subtype is contrained! Determine range of the new // enumeration subtype. str += "/** Enumeration info class " + get_long_name(decl) + " */\n"; vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction could be determined at // compile time. Enumeration types with static bounds are defined // globally. StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (and_reduce(range.valid)) { // Emit enum info class definition str += "class " + qid(decl, rstack, INFO) + ":public enum_info_base{\n" + " static const char **values;\n" + "public:\n" + " " + qid(decl, rstack, INFO) + "():enum_info_base(" + to_string(range.left) + ","+ to_string(range.right) + ",values) {};\n" + " static const char **get_values() { return values; }\n" + " static int low() { return " + to_string(range.left) + "; }\n" + " static int high() { return " + to_string(range.right) + "; }\n" + " static int left() { return " + to_string(range.left) + "; }\n" + " static int right() { return " + to_string(range.right) + "; }\n" + "};\n"; } else { // Enumeration info class definition with non static bounds // (i.e., the bounds must be calculated at runtime) str += "#define " + qid(decl, rstack, INFO) + " enum_info_base\n"; } } else if (sst->base->is(IR_INTEGER_TYPE)) { // **************************************************************************** // Integer subtype // **************************************************************************** str += "/** Integer info class " + get_long_name(decl) + " */\n"; vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction could be determined at // compile time. Integer types which static bounds are defined // globally. StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (and_reduce (range.valid)) { // Integer info class definition with static bounds str += "class " + qid(decl, rstack, INFO) + ":public integer_info_base{\n" + "public:\n" + " " + qid(decl, rstack, INFO) + "():integer_info_base(" + to_string(range.left) + ","+ to_string(range.right) + "," + to_string(min(range.left,range.right)) + "," + to_string(max(range.left, range.right)) + ") {};\n" + " static integer low() { return " + to_string(min(range.left, range.right)) + "; }\n" + " static integer high() { return " + to_string(max(range.left, range.right)) + "; }\n" + " static integer left() { return " + to_string(range.left) + "; }\n" + " static integer right() { return " + to_string(range.right) + "; }\n" + "};\n"; } else { // Integer info class definition with non static bounds (i.e., // the bounds must be calculated at runtime) str += "#define " + qid(decl, rstack, INFO) + " integer_info_base\n"; } } else if (sst->base->is(IR_FLOATING_TYPE)) { // **************************************************************************** // Floating point subtype // **************************************************************************** str += "/** Floating point info class " + get_long_name(decl) + " */\n"; vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction could be determined at // compile time. Floating point types which static bounds are // defined globally. StaticRangeDescriptor range = range_desc[0].rangedes_to_double (rstack); if (and_reduce(range.valid)) { // Integer info class definition with static bounds str += "class " + qid(decl, rstack, INFO) + ":public float_info_base{\n" + "public:\n" + " " + qid(decl, rstack, INFO) + "():float_info_base(" + to_string(range.left) + ","+ to_string(range.right) + "," + to_string(min(range.left,range.right)) + "," + to_string(max(range.left, range.right)) + ") {};\n" + " static floatingpoint low() { return " + to_string(min(range.left, range.right)) + "; }\n" + " static floatingpoint high() { return " + to_string(max(range.left, range.right)) + "; }\n" + " static floatingpoint left() { return " + to_string(range.left) + "; }\n" + " static floatingpoint right() { return " + to_string(range.right) + "; }\n" + "};\n"; } else { // Integer info class definition with non static bounds (i.e., // the bounds must be calculated at runtime) str += "#define " + qid(decl, rstack, INFO) + " floating_info_base\n"; } } else if (sst->base->is(IR_PHYSICAL_TYPE)) { // **************************************************************************** // Physical subtype // **************************************************************************** lint left, right; IR_Direction dir; vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction could be determined at // compile time. Physical types which static bounds are defined // globally. StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (and_reduce(range.valid)) { string base_info_str = get_type_info_obj(sst->base, rstack, false); // Integer info class definition with static bounds str += "/** Physical type info class " + get_long_name(decl) + " */\n"; str += "struct " + qid(decl, rstack, INFO) + ":public physical_info_base{\n"; if (sst->base->declaration == sst->declaration) { // For a `primary' subtype, emit the base information as well. str += " static const char *units[];\n"; str += " static const lint scale[];\n"; str += " static const int unit_count;\n"; str += " " + qid(decl, rstack, INFO) + "():physical_info_base(" + to_string(range.left) + "LL,"+ to_string(range.right) + "LL," + to_string(min(range.left,range.right)) + "LL," + to_string(max(range.left, range.right)) + "LL, units, scale, unit_count) {};\n"; } else { // For a genuine subtype, refer to the already existing base // type. str += " " + qid(decl, rstack, INFO) + "():physical_info_base(" + to_string(range.left) + "LL,"+ to_string(range.right) + "LL," + to_string(min(range.left,range.right)) + "LL," + to_string(max(range.left, range.right)) + "LL," + base_info_str + "->units," + base_info_str + "->scale," + base_info_str + "->unit_count) {};\n"; } str += " static physical low() { return " + to_string(min(range.left, range.right)) + "LL; }\n" + " static physical high() { return " + to_string(max(range.left, range.right)) + "LL; }\n" + " static physical left() { return " + to_string(range.left) + "LL; }\n" + " static physical right() { return " + to_string(range.right) + "LL; }\n" + "};\n"; } else { // Physical info class definition with non static bounds (i.e., // the bounds must be calculated at runtime) str += "/** Physical type info class " + get_long_name(decl) + " */\n"; str += "#define " + qid(decl, rstack, INFO) + " physical_info_base\n"; } } else codegen_error.error("%:error: sorry, this subtype declaration is currently not supported", sst); // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(sst) == RootDeclarativeRegion(rstack)) str += "extern " + qid(decl, rstack, INFO) + " " + qid(decl, rstack, INFO) + "_INFO;\n"; } void m_emit_hdr (pIIR_PackageDeclaration p, string &str, RegionStack &rstack, int l) { if (extended_declarations(p) != NULL) emit_decls(extended_declarations(p), str, rstack, l); } void m_emit_hdr (pIIR_PackageBodyDeclaration pb, string &str, RegionStack &rstack, int l) { if (extended_declarations(pb) != NULL) emit_decls(extended_declarations(pb), str, rstack, l); } void m_emit_hdr (pIIR_TypeDeclaration d, string &str, RegionStack &rstack, int l) { emit_hdr (d->type, str, rstack, l); } void m_emit_hdr (pIIR_RecordType rt, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = rt->declaration; str += "/* Definitions for record type " + get_long_name(decl) + " */\n"; // The derived info class is just a record_base! str += "#define " + qid(rt, rstack, INFO) + " record_info\n"; // Define prototpye of a function to get pointer to record members str += "void *" + qid(rt, rstack, DEFAULT) + "_ELEM_ADDR(void*,int);\n"; // The instance class makes use of a auxilliary struct which gets // the suffix "_DATA". string data_class = qid(rt, rstack, DEFAULT) + "_DATA"; str += "struct " + data_class + " {\n"; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) { str += (" " + qid(edl->first->subtype, rstack, TYPE) + " " + nid(edl->first, DEFAULT) + ";\n"); } // Emit constructor for aggregates str += " " + data_class + "("; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) { str += qid (edl->first->subtype, rstack, TYPE) + " " + nid(edl->first, DEFAULT); if (edl->rest) str += ", "; } str += ") : \n"; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) { str += " " + nid(edl->first, DEFAULT) + "(" + nid(edl->first, DEFAULT) + ")"; if (edl->rest) str += ",\n"; } str += "\n { }\n"; // Emit default constructor str += " " + data_class + "() { }\n"; // Emit method to initialize record instance with default values str += " void init(type_info_interface *rinfo) {\n"; str += " type_info_interface **einfos = ((record_info*)rinfo)->element_types;\n"; int i = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest, i++) { pIIR_Type element_type = get_base_type(edl->first->subtype); string i_str = to_string(i); if (element_type->is(IR_INTEGER_TYPE)) str += " " + nid(edl->first, DEFAULT) + "=((integer_info_base*)einfos[" + i_str + "])->left_bound;\n"; else if (element_type->is(IR_FLOATING_TYPE)) str += " " + nid(edl->first, DEFAULT) + "=((float_info_base*)einfos[" + i_str + "])->left_bound;\n"; else if (element_type->is(IR_PHYSICAL_TYPE)) str += " " + nid(edl->first, DEFAULT) + "=((physical_info_base*)einfos[" + i_str + "])->left_bound;\n"; else if (element_type->is(IR_ENUMERATION_TYPE)) str += " " + nid(edl->first, DEFAULT) + "=((enum_info_base*)einfos[" + i_str + "])->left_bound;\n"; else if (element_type->is(IR_ACCESS_TYPE)) str += " " + nid(edl->first, DEFAULT) + "=NULL;\n"; else if (element_type->is(IR_RECORD_TYPE)) str += " " + nid(edl->first, DEFAULT) + ".init(einfos[" + i_str + "]);\n"; else if (element_type->is(IR_ARRAY_TYPE)) str += " " + nid(edl->first, DEFAULT) + ".init(einfos[" + i_str + "]);\n"; } str += " };\n"; // Emit method to initialize record instance with values obtained // from a reference record instance. str += " void init(type_info_interface *rinfo, const void *p) {\n"; str += " type_info_interface **einfos = ((record_info*)rinfo)->element_types;\n"; str += " const " + data_class + " &src_data = *(" + data_class + "*)((const record_base *)p)->data;\n"; i = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest, i++) { pIIR_Type element_type = get_base_type(edl->first->subtype); string einfo_str = "einfos[" + to_string(i) + "]"; if (element_type->is(IR_RECORD_TYPE)) str += " " + nid(edl->first, DEFAULT) + ".init(" + einfo_str + ",(const void*)&src_data." + nid(edl->first, DEFAULT) + ");\n"; else if (element_type->is(IR_ARRAY_TYPE)) str += " " + nid(edl->first, DEFAULT) + ".init(" + einfo_str + ",(const void*)&src_data." + nid(edl->first, DEFAULT) + ");\n"; else str += " " + nid(edl->first, DEFAULT) + "=src_data." + nid(edl->first, DEFAULT) + ";\n"; } str += " };\n"; str += "};\n"; str += "#define " + qid(rt, rstack, TYPE) + " record_type" + "<" + data_class + ">\n"; // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(rt) == RootDeclarativeRegion(rstack)) str += "extern record_info " + qid(rt, rstack, INFO) + "_INFO;\n"; } void m_emit_hdr (pIIR_RecordSubtype rst, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = rst->declaration; // Derive array type and array info from immediate base type // If the type shall be globally visible then add an external info // instance declaration if (static_declarative_region(rst) == RootDeclarativeRegion(rstack)) str += "extern record_info " + qid(rst, rstack, INFO) + "_INFO;\n"; str += "#define " + qid(rst, rstack, TYPE) + " " + qid(rst->immediate_base, rstack, TYPE) + "\n"; str += "#define " + qid(rst, rstack, INFO) + " record_info\n\n"; } void m_emit_hdr (pIIR_Root r, string &str, RegionStack &rstack, int l) { str += "/* No header for " + string(r->kind_name()) + " */\n"; } freehdl-0.0.7/v2cc/v2cc-expr.cc0000644000175000017500000013204110755353132013032 00000000000000#if HAVE_ALLOCA_H #include #endif #include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" // used to generate error messages extern vaul_error_printer codegen_error; string sprint_acl(list &acl_list, const string acl_object); // ****************************************************************************************** // Singleton Class VHDLOperators // ****************************************************************************************** VHDLOperators* VHDLOperators::single_instance = NULL; void VHDLOperators::init_operator_macros() { // Add uniary operator macros unary_operator_macro["\"not\""] = "op_not(%s)"; unary_operator_macro["\"+\""] = "(+%s)"; unary_operator_macro["\"-\""] = "(-%s)"; unary_operator_macro["\"abs\""] = "op_abs(%s)"; // Add binary operator macros binary_operator_macro["\"and\""] = "(%s&&%s)"; binary_operator_macro["\"or\""] = "(%s||%s)"; binary_operator_macro["\"xor\""] = "op_xor(%s,%s)"; binary_operator_macro["\"xnor\""] = "op_xnor(%s,%s)"; binary_operator_macro["\"nand\""] = "op_nand(%s,%s)"; binary_operator_macro["\"nor\""] = "op_nor(%s,%s)"; binary_operator_macro["\"=\""] = "(%s==%s)"; binary_operator_macro["\">\""] = "(%s>%s)"; binary_operator_macro["\">=\""] = "(%s>=%s)"; binary_operator_macro["\"<\""] = "(%s<%s)"; binary_operator_macro["\"<=\""] = "(%s<=%s)"; binary_operator_macro["\"/=\""] = "(%s!=%s)"; binary_operator_macro["\"+\""] = "(%s+%s)"; binary_operator_macro["\"-\""] = "(%s-%s)"; binary_operator_macro["\"/\""] = "(%s/%s)"; binary_operator_macro["\"*\""] = "(%s*%s)"; binary_operator_macro["\"mod\""] = "op_mod(%s,%s)"; binary_operator_macro["\"rem\""] = "(%s%%%s)"; binary_operator_macro["\"**\""] = "op_power(%s,%s)"; binary_operator_macro["\"&\""] = "concat"; } void VHDLOperators::init_array_operator_macros() { // Add uniary operator macros unary_array_operator_macro["\"not\""] = "op_array_not(%s)"; // Add binary operator macros binary_array_operator_macro["\"and\""] = "op_array_and(%s,%s)"; binary_array_operator_macro["\"or\""] = "op_array_or(%s,%s)"; binary_array_operator_macro["\"xor\""] = "op_array_xor(%s,%s)"; binary_array_operator_macro["\"xnor\""] = "op_array_xnor(%s,%s)"; binary_array_operator_macro["\"nand\""] = "op_array_nand(%s,%s)"; binary_array_operator_macro["\"nor\""] = "op_array_nor(%s,%s)"; binary_array_operator_macro["\"=\""] = "(%s==%s)"; binary_array_operator_macro["\">\""] = "(!op_array_lt(%s,%s))"; binary_array_operator_macro["\">=\""] = "(!op_array_le(%s,%s))"; binary_array_operator_macro["\"<\""] = "op_array_lt(%s,%s)"; binary_array_operator_macro["\"<=\""] = "op_array_le(%s,%s)"; binary_array_operator_macro["\"/=\""] = "(!(%s==%s))"; binary_array_operator_macro["\"&\""] = "concat"; binary_array_operator_macro["\"sll\""] = "op_array_sll(%s,%s)"; binary_array_operator_macro["\"srl\""] = "op_array_srl(%s,%s)"; binary_array_operator_macro["\"sla\""] = "op_array_sla(%s,%s)"; binary_array_operator_macro["\"sra\""] = "op_array_sra(%s,%s)"; binary_array_operator_macro["\"rol\""] = "op_array_rol(%s,%s)"; binary_array_operator_macro["\"ror\""] = "op_array_ror(%s,%s)"; } void VHDLOperators::init_user_operator_names() { // Add uniary operator macros unary_user_operator_name["\"not\""] = "op_not"; unary_user_operator_name["\"+\""] = "op_plus"; unary_user_operator_name["\"-\""] = "op_minus"; unary_user_operator_name["\"abs\""] = "op_abs"; // Add binary operator names binary_user_operator_name["\"and\""] = "op_and"; binary_user_operator_name["\"or\""] = "op_or"; binary_user_operator_name["\"xor\""] = "op_xor"; binary_user_operator_name["\"xnor\""] = "op_xnor"; binary_user_operator_name["\"nand\""] = "op_nand"; binary_user_operator_name["\"nor\""] = "op_nor"; binary_user_operator_name["\"=\""] = "op_eq"; binary_user_operator_name["\">\""] = "op_gt"; binary_user_operator_name["\">=\""] = "op_ge"; binary_user_operator_name["\"<\""] = "op_lt"; binary_user_operator_name["\"<=\""] = "op_le"; binary_user_operator_name["\"/=\""] = "op_ne"; binary_user_operator_name["\"+\""] = "op_plus"; binary_user_operator_name["\"-\""] = "op_minus"; binary_user_operator_name["\"/\""] = "op_div"; binary_user_operator_name["\"*\""] = "op_mult"; binary_user_operator_name["\"mod\""] = "op_mod"; binary_user_operator_name["\"rem\""] = "op_rem"; binary_user_operator_name["\"**\""] = "op_power"; binary_user_operator_name["\"&\""] = "op_concat"; binary_user_operator_name["\"sll\""] = "op_sll"; binary_user_operator_name["\"srl\""] = "op_srl"; binary_user_operator_name["\"sla\""] = "op_sla"; binary_user_operator_name["\"sra\""] = "op_sra"; binary_user_operator_name["\"rol\""] = "op_rol"; binary_user_operator_name["\"ror\""] = "op_ror"; } /* Get unary operator name string */ string VHDLOperators::get_unary_user_operator_name (const string &str) { return unary_user_operator_name [str]; } /* Get unary operator name string */ string VHDLOperators::get_binary_user_operator_name (const string &str) { return binary_user_operator_name [str]; } /* Generate string for a call to a binary operator */ string VHDLOperators::get_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1, const string arg2) { string macro; if (is_array_type(fd->interface_declarations->first->subtype)) macro = binary_array_operator_macro[fd->declarator->text.to_chars()]; else macro = binary_operator_macro[fd->declarator->text.to_chars()]; int size = macro.length() + arg1.length() + arg2.length() + 1; // Actually "size" is an upper bound #ifdef HAVE_ALLOCA char *str = (char*)alloca (sizeof(char)*size); #else char *str = (char*)malloc (sizeof(char)*size); #endif sprintf(str, macro.c_str(), arg1.c_str(), arg2.c_str()); string result = str; #ifndef HAVE_ALLOCA free (str); #endif return result; } /* Generate string for a call to a unary operator */ string VHDLOperators::get_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1) { string macro; if (is_array_type(fd->interface_declarations->first->subtype)) macro = unary_array_operator_macro[fd->declarator->text.to_chars()]; else macro = unary_operator_macro[fd->declarator->text.to_chars()]; int size = macro.length() + arg1.length() + 1; // Actually "size" is an upper bound #ifdef HAVE_ALLOCA char *str = (char*)alloca (sizeof(char)*size); #else char *str = (char*)malloc (sizeof(char)*size); #endif sprintf(str, macro.c_str(), arg1.c_str()); string result = str; #ifndef HAVE_ALLOCA free (str); #endif return result; } // Generated code to concat two arrays string VHDLOperators::get_concat_operator_call_string(pIIR_FunctionCall fc, string &arg1, string &arg2, RegionStack &rstack) { pIIR_Expression arg_exp1 = fc->parameter_association_list->first->actual; pIIR_Expression arg_exp2 = fc->parameter_association_list->rest->first->actual; pIIR_ArrayType dest_type = (pIIR_ArrayType)get_base_type(fc->subtype); pIIR_Type arg_type1 = get_base_type(arg_exp1->subtype); pIIR_Type arg_type2 = get_base_type(arg_exp2->subtype); // Determine range of the destination array vector range_desc = get_discrete_range (((pIIR_ScalarSubtype)(dest_type->index_types->first))->range, rstack, IR_NOT_STATIC); // Convert to integer strings StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // First, convert the arguments into appropriate array objects if // required if (dest_type != arg_type1) { // First argument is an element of the resulting array. Create // index range for an array consisting of one single element string range_str = range.left + "," + range.dir + "," + range.left; // Create call to array consructor. The second constructor argument // is a the element value. The first argument is an array_info // instance. arg1 = qid(dest_type->declaration, rstack, TYPE) + "(new array_info(" + qid(dest_type->declaration, rstack, INFO) + "_INFO.element_type," + qid(dest_type->declaration, rstack, INFO) + "_INFO.index_type," + range_str + ",0)," + arg1 + ")"; } if (dest_type != arg_type2) { // Second argument is an element of the resulting array. Create // index range for an array consisting of one single element string range_str = range.left + "," + range.dir + "," + range.left; // Create call to array consructor. The second constructor argument // is a the element value. The first argument is an array_info // instance. arg2= qid(dest_type->declaration, rstack, TYPE) + "(new array_info(" + qid(dest_type->declaration, rstack, INFO) + "_INFO.element_type," + qid(dest_type->declaration, rstack, INFO) + "_INFO.index_type," + range_str + ",0)," + arg2 + ")"; } string str = "concat<" + qid(dest_type->declaration, rstack, TYPE) + "," + qid(dest_type->element_type->declaration, rstack, TYPE)+ ">(" + arg1 + "," + arg2 + ")"; return str; } /* Test whether operator name denotes contat operator */ bool VHDLOperators::is_concat_operator (const string &str) { return binary_operator_macro[str] == "concat"; } VHDLOperators::VHDLOperators () { init_operator_macros(); init_array_operator_macros(); init_user_operator_names(); } VHDLOperators* VHDLOperators::get_instance () { if (single_instance == NULL) { single_instance = new VHDLOperators; } return single_instance; } // ****************************************************************************************** bool m_emit_expr (pIIR_AttrSigFunc af, string &str, RegionStack &rstack, id_type t) { string scalar_function_name, composite_function_name; // First, determine attribute kind if (af->is(IR_ATTR_EVENT)) { // Attribute: EVENT scalar_function_name = "attr_scalar_EVENT"; composite_function_name = "attr_composite_EVENT"; } else if (af->is(IR_ATTR_ACTIVE)) { // Attribute: ACTIVE scalar_function_name = "attr_scalar_ACTIVE"; composite_function_name = "attr_composite_ACTIVE"; } else if (af->is(IR_ATTR_LAST_VALUE)) { // Attribute: LAST_VALUE scalar_function_name = "attr_scalar_LAST_VALUE<" + qid(get_declaration(af->subtype), rstack, TYPE) + ">"; composite_function_name = "attr_composite_LAST_VALUE<" + qid(get_declaration(af->subtype), rstack, TYPE) + ">";; } else if (af->is(IR_ATTR_LAST_EVENT)) { // Attribute: LAST_EVENT scalar_function_name = "attr_scalar_LAST_EVENT"; composite_function_name = "attr_composite_LAST_EVENT"; } else // else bail out! codegen_error.error("%:error: sorry, this attribute is currently not supported", af); string result; // Next, create attribute code if (af->signal->is(IR_SIMPLE_REFERENCE)) { // Prefix is a scalar signal result += scalar_function_name + "("; emit_expr(af->signal, result, rstack, id_type(SIGNAL, DEFAULT)); result += ")"; } else { // Prefix is a composite signal result += composite_function_name + "("; // Get object declaration of the prefix signal pIIR_ObjectDeclaration object_decl = get_object_declaration(af->signal); result += qid(object_decl, rstack, SIGNAL); // Append acl list > acl_list; get_acl(af->signal, acl_list, rstack, IR_NOT_STATIC, true); // Create internal acl string internal_acl_name = create_internal_acl(get_acl_size(acl_list), rstack, true); // Add acl sequence if (af->is(IR_ATTR_LAST_VALUE) && !is_scalar_type(af->subtype)) { // If the attribute is LAST_VALUE and the result is not scalar // then add a copy of the signal part as an additional parameter result += ",&(" + sprint_acl(acl_list, internal_acl_name + "->clear()", rstack, id_type(SIGNAL, ARCHREF)) + "),"; emit_expr(af->signal, result, rstack, id_type(READER, DEREF)); result += ")"; } else result += ",&(" + sprint_acl(acl_list, internal_acl_name + "->clear()", rstack, id_type(SIGNAL, ARCHREF)) + "))"; } str += result; return false; } bool m_emit_expr (pIIR_AttrArrayFunc at, string &str, RegionStack &rstack, id_type t) { // If the result type is an enumeration type then a cast // operation "enumeration(...)" must be done pIIR_Type type = get_base_type(at->subtype); string cast_start = "", cast_end = ""; if (type->is(IR_ENUMERATION_TYPE)) { cast_start = "enumeration("; cast_end = ")"; } // First, check whether the attribute was folded successfully. if (valid_folded_value(at)) { // Emit the folded value instead of accessing determining the // attribute at runtime str += cast_start + to_string(folded_value(at).long_value()) + cast_end; return true; } else { string info_instance_str; if (at->array != NULL) { // The range attribute has been applied on an array // instance. First, emit code to extract the info instance from // the array. emit_expr (at->array, info_instance_str, rstack, id_type(READER, DEREF)); info_instance_str += ".info"; } else // The range attribute has been applied on an array type. Emit // code to reference the range corresponding info instance. info_instance_str += get_type_info_obj(at->array_type, rstack, false); // Get index number int index_number = at->index; // Build code to access the array info instance which // corresponds with the index_number for (int i = 1; i < index_number; i++) info_instance_str = "((array_info*)" + info_instance_str + "->element_type)"; // Finally, emit code to determine the attribute code at runtime if (at->is(IR_ATTR_ARRAY_LENGTH)) str += info_instance_str + "->length"; else if (at->is(IR_ATTR_ARRAY_ASCENDING)) str += "enumeration(" + info_instance_str + "->index_direction==to?1:0)"; else if (at->is(IR_ATTR_ARRAY_LOW)) str += cast_start + "min(" + info_instance_str + "->left_bound," + info_instance_str + "->right_bound)" + cast_end; else if (at->is(IR_ATTR_ARRAY_HIGH)) str += cast_start + "max(" + info_instance_str + "->left_bound," + info_instance_str + "->right_bound)" + cast_end; else if (at->is(IR_ATTR_ARRAY_RIGHT)) str += cast_start + info_instance_str + "->right_bound" + cast_end; else if (at->is(IR_ATTR_ARRAY_LEFT)) str += cast_start + info_instance_str + "->left_bound" + cast_end; else assert(false); return false; } } bool m_emit_expr (pIIR_FunctionCall fc, string &str, RegionStack &rstack, id_type t) { // If the function call has been folded then return the optimized // result instead of actually emitting the function call if (valid_folded_value(fc)) { emit_folded_value(folded_value(fc), str, rstack, fc->subtype); return true; // Ok, were are done! } VHDLOperators &operators = *VHDLOperators::get_instance (); // count the arguments int n_args = 0; for (pIIR_AssociationList al = fc->parameter_association_list; al; al = al->rest) n_args++; string arg1, arg2; bool int_literal; switch (get_operator_type(fc->function)) { // Analyze function call type case STD_OP: // The function call is a standard operator call // emit first operand int_literal = emit_expr (fc->parameter_association_list->first->actual, arg1, rstack, id_type(READER, DEREF)); // First argument //if (int_literal) //arg1 = cast(fc->parameter_association_list->first->actual, arg1); // emit second operand if (n_args == 2) { // Binary operator call int_literal = emit_expr (fc->parameter_association_list->rest->first->actual, arg2, rstack, id_type(READER, DEREF)); // Second argument //if (int_literal) //arg2 = cast(fc->parameter_association_list->rest->first->actual, arg2); string call_str; if (operators.is_concat_operator (fc->function->declarator->text.to_chars())) // Add concat operator call. The concat operator is handled // differently from the other operators call_str = operators.get_concat_operator_call_string(fc, arg1, arg2, rstack); else // Add operator call to code call_str = operators.get_operator_call_string(fc->function, arg1, arg2); // Next, check whether this is a operator call with mixed // parameter types (e.g., of the form time * integer or time / // real). In this case cast the result to the target type. if (string(fc->function->declarator->text.to_chars()) == "\"*\"" || string(fc->function->declarator->text.to_chars()) == "\"/\"") { pIIR_Type arg1_type = get_base_type (fc->function->interface_declarations->first->subtype); pIIR_Type arg2_type = get_base_type (fc->function->interface_declarations->rest->first->subtype); if (arg1_type != arg2_type) { pIIR_Type return_type = get_base_type (fc->function->return_type); if (return_type->is (IR_INTEGER_TYPE)) call_str = "integer(" + call_str + ")"; else if (return_type->is (IR_ENUMERATION_TYPE)) call_str = "enumeration(" + call_str + ")"; else if (return_type->is (IR_PHYSICAL_TYPE)) call_str = "physical(" + call_str + ")"; else if (return_type->is (IR_ENUMERATION_TYPE)) call_str = "floatingpoint(" + call_str + ")"; } } str += call_str; } else // Unary operator call str += operators.get_operator_call_string(fc->function, arg1); // Add operator call break; case USER_OP: // The function is an user defined operator call case BASIC_OP: // The function is a operator defined in an IEEE // library. Currently this is handled like a user defined operator // call case NO_OP: // A ordinary function call (no operator) void emit_subprogram_associations (string&, RegionStack&, pIIR_AssociationList, pIIR_InterfaceList, list&); str += qid(fc->function, rstack, DEFAULT); str += " ("; emit_subprogram_associations (str, rstack, fc->parameter_association_list, fc->function->interface_declarations, context(fc->function).extra_interface_objects); //emit_associations (str, rstack, fc->parameter_association_list, // fc->function->interface_declarations); str += ")"; } return false; } bool m_emit_expr (pIIR_SimpleReference sor, string &str, RegionStack &rstack, id_type t) { // If the reference has been folded then return the optimized result // instead of accessing the reference if (valid_folded_value(sor)) { emit_folded_value(folded_value(sor), str, rstack, sor->subtype); return true; // Ok, were are done! } //emit_noqual_id (sor->object, str, t); str += qid (sor->object, rstack, t); return false; } bool m_emit_expr (pIIR_NullExpression ne, string &str, RegionStack &rstack, id_type t) { str += "((vhdlaccess)NULL)"; return true; } bool m_emit_expr (pIIR_Allocator a, string &str, RegionStack &rstack, id_type t) { str += "(" + get_type_info_obj(pIIR_AccessType(a->type_mark)->designated_type, rstack, false) + ")"; if (a->value != NULL) { str += "->clone(const_pointer("; emit_expr(a->value, str, rstack, t); str += "))"; } else str += "->create()"; return false; } void emit_lit (pIIR_Literal l, string &str) { if (l == NULL) str += "1"; else if (l->is(IR_TEXT_LITERAL)) str += pIIR_TextLiteral(l)->text.to_chars(); else if (l->is(IR_INTEGER_LITERAL)) str += pIIR_IntegerLiteral(l)->text.to_chars(); else if (l->is(IR_FLOATING_POINT_LITERAL)) str += pIIR_FloatingPointLiteral(l)->text.to_chars(); else str += "<" + string(l->kind_name()) + ">"; } /* Emit a physical unit. This done by expressing it in terms of its base unit. */ void emit_unit (pIIR_PhysicalUnit u, string &str, RegionStack &rstack, int l) { str += qid(u -> type -> declaration, rstack, INFO); str += "::scale[" + to_string ( u -> unit_pos) + "]"; } bool m_emit_expr (pIIR_AbstractLiteralExpression ale, string &str, RegionStack &rstack, id_type t) { if (ale->is(IR_PHYSICAL_LITERAL)) { if (valid_folded_value(ale)) { str += to_string(folded_value(ale).long_value()) + "LL"; } else { assert (false); /* str += "("; emit_lit (ale->value, str); str += "*"; emit_unit (pIIR_PhysicalLiteral(ale)->unit, str, rstack, 0); str += ")"; */ } } else if (valid_folded_value (ale)) { if (ale->value->is(IR_INTEGER_LITERAL)) str += to_string (folded_value(ale).long_value ()); else if (ale->value->is(IR_FLOATING_POINT_LITERAL)) str += (folded_value(ale).original_string () != "") ? folded_value(ale).original_string () : to_string (folded_value(ale).double_value ()); else abort (); } else assert (false); // emit_lit (ale->value, str); return true; } bool m_emit_expr (pIIR_TypeConversion tc, string &str, RegionStack &rstack, id_type t) { if (valid_folded_value(tc)) { // Print folded value if available emit_folded_value(folded_value(tc), str, rstack, tc->type_mark); return true; } pIIR_Type target_base_type = get_base_type(tc->type_mark); pIIR_Declaration target_type_decl = get_declaration(tc->type_mark); string cast_start; string result_str; string expr_str; emit_expr(tc->expression, expr_str, rstack, t); if (target_base_type->is(IR_INTEGER_TYPE)) if (get_base_type(tc->expression->subtype)->is(IR_FLOATING_TYPE)) // If the the expression to be converted is a floating point // type then we must round the number to the nearest integer // value! result_str += "integer(rint(" + expr_str + "))"; else result_str += "integer(" + expr_str + ")"; else if (target_base_type->is(IR_ENUMERATION_TYPE)) result_str += "enumeration(" + expr_str + ")"; else if (target_base_type->is(IR_PHYSICAL_TYPE)) result_str += "physical(" + expr_str + ")"; else if (target_base_type->is(IR_FLOATING_TYPE)) result_str += "floatingpoint(" + expr_str + ")"; else if (is_array_type(target_base_type)) { pIIR_ArrayType source_array_base_type = pIIR_ArrayType(get_base_type(tc->expression->subtype)); pIIR_ArrayType target_array_base_type = pIIR_ArrayType(target_base_type); // First, considere one-dimensional arrays if (target_array_base_type->index_types->rest == NULL) { // Next, test whether the target array type is constrained if (!is_constrained_array_type(tc->type_mark)) // If the target array is unconstrained then the source // array is passed over by reference so that the array_alias // constructor can retrieve the range information from the // source array. Note that the actual data is not copied but // reused by the array_alias constructor. result_str += "array_alias<" + qid(target_type_decl, rstack, TYPE) + " >(" + get_type_info_obj(tc->type_mark, rstack, false) + "," + expr_str + ")"; else // If the target array is constrained then the bounds are // determined from the target type. Note that the data part // is not copied from the source array. Instead the data // pointer of the source is copied. result_str += "array_alias<" + qid(target_type_decl, rstack, TYPE) + " >(" + get_type_info_obj(tc->type_mark, rstack, false) + "," + expr_str + ".data)"; } else // Handle multi-dimensional arrays result_str += qid(target_type_decl, rstack, TYPE) + "().init(" + get_type_info_obj(tc->type_mark, rstack, false) + "," + expr_str + ")"; } else assert(false); str += result_str; return false; } bool m_emit_expr (pIIR_QualifiedExpression qe, string &str, RegionStack &rstack, id_type t) { emit_expr (qe->expression, str, rstack, t); return false; } bool m_emit_expr (pIIR_EnumLiteralReference elr, string &str, RegionStack &rstack, id_type t) { emit_id (elr->value, str, rstack); return true; } bool m_emit_expr (pIIR_ArrayReference aor, string &str, RegionStack &rstack, id_type t) { emit_expr (aor->array, str, rstack, t); for (pIIR_ExpressionList il = aor->indices; il; il = il->rest) { str += "["; string index; bool simple = emit_expr (il->first, index, rstack, t); str += index + "]"; } return false; } bool m_emit_expr (pIIR_ArrayLiteralExpression ale, string &str, RegionStack &rstack, id_type t) { // Array literals are always folded. Hence, valid_folded_value // should return true! assert(valid_folded_value(ale)); emit_folded_value(folded_value(ale), str, rstack, ale->subtype); return false; } bool m_emit_expr (pIIR_RecordReference ror, string &str, RegionStack &rstack, id_type t) { emit_expr (ror->record, str, rstack, t); str += ".value()." + nid (ror->element, DEFAULT); return false; } bool m_emit_expr (pIIR_RecordAggregate ra, string &str, RegionStack &rstack, id_type t) { pIIR_RecordType rt = pIIR_RecordType (get_base_type (ra->subtype->base)); str += qid (rt, rstack, TYPE) + "().init(" + get_type_info_obj(rt, rstack, false) + ")"; for (pIIR_ElementAssociationList al = ra->element_association_list; al; al = al->rest) { // check out whether the SAME value has been used for another // record element in the aggregate (e.g., this might happen in // case of an "others" choice). pIIR_ElementAssociationList test_al = ra->element_association_list; for (; test_al != al; test_al = test_al->rest) if (test_al->first->value == al->first->value) break; if (test_al != al) // If the same value expression has been used then copy the // corresponding value to its destination instead of emitting // the same value expression again. str += ".aggregate_copy(" + to_string(al->first->element->declaration_pos) + "," + to_string(test_al->first->element->declaration_pos) + ")"; else { // Othewise, just call aggregate_set where the fist parameter // is the record element position number (first record element // is associated with number 0, ...). The second paramter // points to the appropriate value expression. str += ".aggregate_set(" + to_string(al->first->element->declaration_pos) + ","; str += "const_pointer("; emit_expr (al->first->value, str, rstack, t); str += "))"; } } return false; } bool m_emit_expr (pIIR_ArrayAggregate aa, string &str, RegionStack &rstack, id_type t) { // Subtype of aggregate expression. At least the range direction will // be used... string dest_type_str, dest_type_info_str; pIIR_Type dest_type = aa->subtype; int dim_number = 1; if(dest_type->is(VAUL_SUBARRAY_TYPE)) { // If the aggreate is an multi-dimensional then a node // VAUL_SubarrayType is used to describe the (sub)type of the // sub-aggregate dest_type = pVAUL_SubarrayType(aa->subtype)->complete_type->declaration->type; pIIR_ArrayType at = pVAUL_SubarrayType(aa->subtype)->complete_type; // Determine dimension of main array to which the aggregate // belongs int dim_counter = 0; for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) dim_counter++; // Next, determine the index associated with the array // aggregate. Note that we can only count how many dimensions are // left from where the aggregate starts. int current_dim_counter = 0; for (pIIR_TypeList tl = pVAUL_SubarrayType(aa->subtype)->index_types; tl; tl = tl->rest) current_dim_counter++; // Now, determine the index number the aggregate belongs to dim_number = dim_counter - current_dim_counter + 1; // Setup dest_type_str and dest_type_info_str dest_type_str = qid(get_declaration(dest_type), rstack, TYPE); dest_type_info_str = get_type_info_obj(dest_type, rstack, false); for (int i = 1; i <= dim_counter - current_dim_counter; i++) { dest_type_str += "::E_type"; dest_type_info_str = "parray_info(" + dest_type_info_str + "->element_type)"; } } else if (dest_type->is(IR_ARRAY_TYPE)) { dest_type = aa->subtype->declaration->type; dest_type_str = qid(get_declaration(dest_type), rstack, TYPE); dest_type_info_str = get_type_info_obj(get_basic_type(dest_type), rstack, false); } else { dest_type_str = qid(get_declaration(dest_type), rstack, TYPE); dest_type_info_str = get_type_info_obj(get_basic_type(dest_type), rstack, false); } // Get range type of aggregate and determine left bound, right // bound, direction and length of aggregat. Note that if the // aggregate subtype cannot be determined from the context then // dest_range will point to the corresponding index range of the // unconstrained array associated with the aggregate. vector range_desc = get_discrete_range(dest_type, rstack, IR_NOT_STATIC); // Extract bounds from aggregate range type. Perhaps these // bounds will be used to determine the range bounds of the aggregat. string range_str; StaticRangeDescriptor range = range_desc[dim_number - 1].rangedes_to_string(rstack, t); string dest_direction_str = (dest_direction(aa) == IR_DIRECTION_UP? "to" : "downto"); // Direction of aggregate int association_count = 0; // Number of associations int max_len = 0; // Max index range length of a single choice pIIR_IndexedAssociation max_len_choice = NULL; // choice with longest range // First, take a look at all choices to determine the choice which // covers the largest range. However, an others choice will always // be selected as max_len_choice. Further, the number of // associations are counted. for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { if (al->first->is(IR_OTHERS_INDEXED_ASSOCIATION)) { // others choice max_len = INT_MAX; // set length value so that this entry is not overwritten max_len_choice = al->first; } else { if (max_len < length(al->first)) { max_len = length(al->first); max_len_choice = al->first; } } association_count++; // Count number of association } // If no max length choice could be found (e.g., because the choice // length could not be determined at compile time) then just take // the very first association element as max_len_choice. if (max_len_choice == NULL) max_len_choice = aa->indexed_association_list->first; // ***************************************************************************** // Now, generate the code. First. check some special cases. // ***************************************************************************** string value_str; if (has_others(aa)) { // Does the aggregate include an others choice? // If the answer is yes, then the subtype of the aggregate must be // determinable from the context. Get value expression of others choice. emit_expr(pIIR_OthersIndexedAssociation(max_len_choice)->value, value_str, rstack, t); // Determine range of the array aggregate. range_str = range.left + "," + range.dir + "," + range.right; } else { // Ok, aggregate does not have an others choice. Hence, the array // bounds are directly determined from the choices. Generate code // for the first array instance. The initial array instance is // created from those choice which covers the longest range. if (association_count == 1) { // Ok, there is a single choice if (max_len_choice->is(IR_SINGLE_INDEXED_ASSOCIATION)) { // Array contains only a single element pIIR_SingleIndexedAssociation saa = pIIR_SingleIndexedAssociation(max_len_choice); string index_str; if (named_association(aa)) { // In case of named association use index value of choice emit_expr(saa->index, index_str, rstack, DEFAULT); } else // In case of positional association use left bound of // aggregate type index_str = range.left; range_str = index_str + "," + dest_direction_str + "," + index_str; } else if (max_len_choice->is(IR_RANGE_INDEXED_ASSOCIATION)) { // Array contains a single range choice. Note that the range // does not have to be locally static in this case. pIIR_RangeIndexedAssociation raa = pIIR_RangeIndexedAssociation(max_len_choice); vector range_desc = get_discrete_range(raa->index_range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, t); if (!is_constrained_array_type(dest_type)) range_str = range.left + "," + range.dir + "," + range.right; else if (dest_direction_str == range.dir) range_str = range.left + "," + dest_direction_str + "," + range.right; else range_str = range.right + "," + dest_direction_str + "," + range.left; } else // This should never happen! assert(false); } else // Ok, there are more than one choices. Hence, we use min_index // and max_index to setup the array range if (named_association(aa)) { // If the aggregate uses named association then the index // bounds are derived from the index number given in the // aggregate if (dest_direction_str == "to") range_str = to_string(min_index(aa)) + "," + dest_direction_str + "," + to_string(max_index(aa)); else range_str = to_string(max_index(aa)) + "," + dest_direction_str + "," + to_string(min_index(aa)); } else { // If the aggregate uses positional association then the // bounds are derived from the left bound of the target if (dest_direction_str == "to") range_str = range.left + "," + dest_direction_str + "," + range.left + "+" + to_string(max_index(aa)); else range_str = range.left + "," + dest_direction_str + "," + range.left + "-" + to_string(max_index(aa)); } // Generate value of choice if (max_len_choice->is(IR_SINGLE_INDEXED_ASSOCIATION)) emit_expr(pIIR_SingleIndexedAssociation(max_len_choice)->value, value_str, rstack, t); else if (max_len_choice->is(IR_RANGE_INDEXED_ASSOCIATION)) emit_expr(pIIR_RangeIndexedAssociation(max_len_choice)->value, value_str, rstack, t); else assert(false); } // Create call to array constructor. The second constructor argument // is the element value. The first argument is an array_info // instance. str += dest_type_str + "(new array_info(" + dest_type_info_str + "->element_type," + dest_type_info_str + "->index_type," + range_str + ",0)," + value_str + ")"; // If only a single choice is given then were done. if (association_count == 1) return false; // Next, handle the remaining choices for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { pIIR_IndexedAssociation ia = al->first; if (ia == max_len_choice) continue; // Skip choice if it has been already handled // Emit choice value value_str = ""; emit_expr(ia->value, value_str, rstack, t); if (ia->is(IR_SINGLE_INDEXED_ASSOCIATION) && !named_association(aa)) { // If choice is a single indexed *positional* association then // index number of the element is determined by adding the // choice number (stored in min_index) to the left bound of the // aggregate (stored in left_str). string index_str = range.left + (dest_direction_str == "to"? "+" : "-") + to_string(min_index(ia)); str += ".aggregate_set(" + index_str + ",to," + index_str + "," + value_str + ")"; } else // Add code to set the corresponding array elements str += ".aggregate_set(" + to_string(min_index(ia)) + ",to," + to_string(max_index(ia)) + "," + value_str + ")"; } return false; } bool m_emit_expr (pIIR_SliceReference sr, string &str, RegionStack &rstack, id_type t) { // Get slice range vector range_desc = get_discrete_range(sr->range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, t); pIIR_TypeDeclaration type_declaration = get_declaration(sr->array->subtype); str += qid(type_declaration, rstack, id_type(TYPE | ALIAS, DEFAULT)); str += "(new array_info("; str += get_type_info_obj(get_base_type(sr->array->subtype), rstack, false) + "->element_type," + get_type_info_obj(get_base_type(sr->array->subtype), rstack, false) + "->index_type," + range.left + "," + range.dir + "," + range.right + ",0),&"; emit_expr (sr->array, str, rstack, t); str += "[" + range.left + "]"; str += ")"; return false; } bool m_emit_expr (pIIR_AccessReference aor, string &str, RegionStack &rstack, id_type t) { str += "deref<" + qid(aor->subtype, rstack, TYPE) + " >("; emit_expr (aor->access, str, rstack, t); str += ")"; return false; } void emit_builtin_id (IR_Kind k, string &str) { str += tree_kind_name(k); } bool m_emit_expr (pIIR_SignalAttr asr, string &str, RegionStack &rstack, id_type t) { emit_builtin_id (asr->kind(), str); str += "("; emit_expr (asr->signal, str, rstack, t); str += ")"; return false; } bool m_emit_expr (pIIR_AttrTypeFunc atf, string &str, RegionStack &rstack, id_type t) { // If the result type is an enumeration type then a cast // operation "enumeration(...)" must be done pIIR_Type return_type = get_base_type(atf->subtype); // First, check whether the attribute was folded successfully. if (valid_folded_value(atf)) { // Emit the folded value instead of accessing determining the // attribute at runtime emit_folded_value(folded_value(atf), str, rstack, return_type); return true; } else { // ****************************************************************** // The attribute result could not be determined at compile // time. Hence, generate code to determine the corresponding value // at runtime. // ****************************************************************** string info_instance_str = get_type_info_obj(atf->prefix, rstack, false); pIIR_Type prefix_base_type = get_base_type(atf->prefix); string argument_str; if (atf->argument != NULL) emit_expr(atf->argument, argument_str, rstack, id_type(READER, DEREF)); // Determine range of prefix type vector type_range_des = get_discrete_range(atf->prefix, rstack, IR_NOT_STATIC); // type_range_des should contain exactly one single // RangeDescriptor instance assert(type_range_des.size() == 1); // Try to fold range descriptor type_range_des[0].constant_fold_rangedes(rstack); // Determine left, right and direction of range. is_static stores // whether the corresponding value is static. StaticRangeDescriptor lint_range; StaticRangeDescriptor double_range; if (get_base_type (atf->prefix)->is (IR_FLOATING_TYPE)) double_range = type_range_des[0].rangedes_to_double (rstack); else lint_range = type_range_des[0].rangedes_to_lint (rstack); // Finally, handle the various attributes // ***** RIGHTOF ******************************************* // Note that this attribute is not defined for floatingpoint types if (atf->is(IR_ATTR_RIGHTOF)) { // The resulting string looks like: // integer_INFO->check(value+(integer_INFO->left_bound < // integer_INFO->right_bound?+1:-1)) if (lint_range.valid[1]) // If the range direction could be determined then emit // optimized code str += info_instance_str + "->check(" + argument_str + (lint_range.dir == IR_DIRECTION_UP? "+1": "-1") + ")"; else str += info_instance_str + "->check(" + argument_str + "+(" + info_instance_str + "->left_bound < " + info_instance_str + "->right_bound?+1:-1))"; // ***** LEFTOF ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (atf->is(IR_ATTR_LEFTOF)) { // The resulting string looks like: // integer_INFO->check(value+(integer_INFO->left_bound < integer_INFO->right_bound?+1:-1)) if (lint_range.valid[1]) // If the range direction could be determined then emit // optimized code str += info_instance_str + "->check(" + argument_str + (lint_range.dir == IR_DIRECTION_UP? "-1": "+1") + ")"; else str += info_instance_str + "->check(" + argument_str + "-(" + info_instance_str + "->left_bound < " + info_instance_str + "->right_bound?+1:-1))"; // ***** PRED ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (atf->is(IR_ATTR_PRED)) { str += info_instance_str + "->check(" + argument_str + "-1)"; // ***** SUCC ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (atf->is(IR_ATTR_SUCC)) { str += info_instance_str + "->check(" + argument_str + "+1)"; // ***** VAL ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (atf->is(IR_ATTR_VAL)) { str += info_instance_str + "->check(" + argument_str + ")"; // ***** POS ******************************************* // Note that this attribute is not defined for floatingpoint types } else if (atf->is(IR_ATTR_POS)) { str += info_instance_str + "->check(" + argument_str + ")"; // ***** VALUE ******************************************* } else if (atf->is(IR_ATTR_VALUE)) { str += "((" + qid(prefix_base_type->declaration, rstack, TYPE) + + ")attribute_value(" + info_instance_str + "," + argument_str + "))"; // ***** IMAGE ******************************************* } else if (atf->is(IR_ATTR_IMAGE)) { str += "attribute_image(" + info_instance_str + ",const_pointer(" + argument_str + "))"; } else assert(false); return false; } } bool m_emit_expr (pIIR_AttrTypeValue atf, string &str, RegionStack &rstack, id_type t) { // If the result type is an enumeration type then a cast // operation "enumeration(...)" must be done pIIR_Type return_type = get_base_type(atf->subtype); // First, check whether the attribute was folded successfully. if (valid_folded_value(atf)) { // Emit the folded value instead of accessing determining the // attribute at runtime emit_folded_value(folded_value(atf), str, rstack, return_type); return true; } else { // ****************************************************************** // The attribute result could not be determined at compile // time. Hence, generate code to determine the corresponding value // at runtime. // ****************************************************************** string info_instance_str = get_type_info_obj(atf->prefix, rstack, false); pIIR_Type prefix_base_type = get_base_type(atf->prefix); string argument_str; if (atf->argument != NULL) emit_expr(atf->argument, argument_str, rstack, DEREF); // Determine range of prefix type vector type_range_des = get_discrete_range(atf->prefix, rstack, IR_NOT_STATIC); // type_range_des should contain exactly one single // RangeDescriptor instance assert(type_range_des.size() == 1); // Try to fold range descriptor type_range_des[0].constant_fold_rangedes(rstack); // Determine left, right and direction of range. is_static stores // whether the corresponding value is static. StaticRangeDescriptor lint_range; StaticRangeDescriptor double_range; bool is_floatingpoint_type = false; if (get_base_type (atf->prefix)->is (IR_FLOATING_TYPE)) { double_range = type_range_des[0].rangedes_to_double (rstack); is_floatingpoint_type = true; } else { lint_range = type_range_des[0].rangedes_to_lint (rstack); is_floatingpoint_type = false; } // Finally, handle the various attributes // ***** LENGTH ******************************************* if (atf->is(IR_ATTR_LENGTH)) { // Actually, this attribute is defined for arrays only! assert(false); // ***** ASCENDING ******************************************* } else if (atf->is(IR_ATTR_ASCENDING)) { str += "enumeration(" + info_instance_str + "->left_bound < " + info_instance_str + "->right_bound?1:0)"; // ***** HIGH ******************************************* } else if (atf->is(IR_ATTR_HIGH)) { if (prefix_base_type->is(IR_ENUMERATION_TYPE)) str += "max(" + info_instance_str + "->left_bound, " + info_instance_str + "->right_bound?)"; else str += info_instance_str + "->high_bound"; // ***** LOW ******************************************* } else if (atf->is(IR_ATTR_LOW)) { if (prefix_base_type->is(IR_ENUMERATION_TYPE)) str += "min(" + info_instance_str + "->left_bound, " + info_instance_str + "->right_bound?)"; else str += info_instance_str + "->low_bound"; // ***** RIGHT ******************************************* } else if (atf->is(IR_ATTR_RIGHT)) { str += info_instance_str + "->left_bound"; // ***** LEFT ******************************************* } else if (atf->is(IR_ATTR_LEFT)) { str += info_instance_str + "->right_bound"; } else assert(false); return false; } } bool m_emit_expr (pIIR_Expression e, string &str, RegionStack &rstack, id_type t) { str += "/* IIR_Expression " + string(e->kind_name()) + " */"; return false; } // Actually, IIR_EnumerationLiteral is not an expression but we need // this method for internal use bool m_emit_expr (pIIR_EnumerationLiteral e, string &str, RegionStack &rstack, id_type t) { str += qid(e->subtype->declaration, rstack, TYPE) + "(" + to_string(e->enum_pos) + ")"; return true; } freehdl-0.0.7/v2cc/v2cc-cdfg-expr.cc0000644000175000017500000004434110707453151013737 00000000000000#include #include "v2cc-chunk.h" #include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include "mapping.h" #include "v2cc-util.h" // used to generate error messages extern vaul_error_printer codegen_error; string sprint_acl(list &acl_list, const string acl_object); /* Generate string identifier string for to a function or * subprogram. This string does contain the subrogram name and lists * its parameter type as well as return type (if any). E.g., * ":std:standard:\"+\"(:std:standard:integer,:std:standard:integer):std:standard:integer" * is associated with the add operator for type integer. */ string cdfg_get_subprogram_identifier_string(pIIR_SubprogramDeclaration sd) { const char *separator = ""; string result = "\"" + get_escaped_string(get_long_name(sd))+ "("; for (pIIR_InterfaceList al = sd->interface_declarations; al; al = al->rest) { result += separator + get_escaped_string(get_long_name(get_declaration(al->first->subtype))); separator = ","; } result += ")"; if (sd->is(IR_FUNCTION_DECLARATION)) result += get_escaped_string(get_long_name(get_declaration(pIIR_FunctionDeclaration(sd)->return_type))); result += "\""; return result; } /* Generate string for a call to a operator */ string cdfg_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1, const string arg2) { return "(list operator-call " + cdfg_get_subprogram_identifier_string(fd) + " " + arg1 + " " + arg2 + ")"; } bool m_cdfg_emit_expr (pIIR_AttrSigFunc af, string &str, RegionStack &rstack, id_type t) { string attribute_name; // First, determine attribute kind if (af->is(IR_ATTR_EVENT)) { // Attribute: EVENT attribute_name = "event"; } else if (af->is(IR_ATTR_ACTIVE)) { // Attribute: ACTIVE attribute_name = "active"; } else if (af->is(IR_ATTR_LAST_VALUE)) { // Attribute: LAST_VALUE attribute_name = "last_value"; } else // else bail out! codegen_error.error("%:error: sorry, this attribute is currently not supported", af); str += "(signal-attribute-call " + attribute_name + " "; cdfg_emit_expr(af->signal, str, rstack, t); str += ")"; return false; } bool m_cdfg_emit_expr (pIIR_AttrArrayFunc at, string &str, RegionStack &rstack, id_type t) { // First, check whether the attribute was folded successfully. if (valid_folded_value(at)) { // Emit the folded value instead of accessing determining the // attribute at runtime str += to_string(folded_value(at).long_value()); return true; } else { str += "(list array-attribute-call-"; // Finally, emit code to determine the attribute code at runtime if (at->is(IR_ATTR_ARRAY_LENGTH)) str += "length"; else if (at->is(IR_ATTR_ARRAY_ASCENDING)) str += "ascending"; else if (at->is(IR_ATTR_ARRAY_LOW)) str += "low"; else if (at->is(IR_ATTR_ARRAY_HIGH)) str += "high"; else if (at->is(IR_ATTR_ARRAY_RIGHT)) str += "right"; else if (at->is(IR_ATTR_ARRAY_LEFT)) str += "left"; else assert(false); // Get index number str += " " + to_string(at->index); if (at->array != NULL) { // The range attribute has been applied on an array // instance. First, emit code to extract the info instance from // the array. cdfg_emit_expr (at->array, str, rstack, DEFAULT); } else // The range attribute has been applied on an array type. Emit // code to reference the range corresponding info instance. str += get_type_info_obj(at->array_type, rstack, false); str += ")"; return false; } } bool m_cdfg_emit_expr (pIIR_FunctionCall fc, string &str, RegionStack &rstack, id_type t) { // If the function call has been folded then return the optimized // result instead of actually emitting the function call if (valid_folded_value(fc)) { cdfg_emit_folded_value(folded_value(fc), str, rstack, fc->subtype); return true; // Ok, were are done! } // count the arguments int n_args = 0; for (pIIR_AssociationList al = fc->parameter_association_list; al; al = al->rest) n_args++; string arg1, arg2; switch (get_operator_type(fc->function)) { // Analyze function call type case USER_OP: // The function is an user defined operator call case BASIC_OP: // The function is a operator defined in an IEEE // library. case STD_OP: // The function call is a standard operator call // emit first operand cdfg_emit_expr (fc->parameter_association_list->first->actual, arg1, rstack, DEFAULT); // First argument // emit second operand if (n_args == 2) { // Binary operator call cdfg_emit_expr (fc->parameter_association_list->rest->first->actual, arg2, rstack, DEFAULT); // Second argument } // Add operator call to code str += cdfg_operator_call_string(fc->function, arg1, arg2); break; case NO_OP: // A ordinary function call (no operator) void cdfg_emit_subprogram_associations (string&, RegionStack&, pIIR_AssociationList, pIIR_InterfaceList); str += "(list function-call " + cdfg_get_subprogram_identifier_string(fc->function) + " "; cdfg_emit_subprogram_associations (str, rstack, fc->parameter_association_list, fc->function->interface_declarations); str += ")"; } return false; } bool m_cdfg_emit_expr (pIIR_SimpleReference sor, string &str, RegionStack &rstack, id_type t) { // If the reference has been folded then return the optimized result // instead of accessing the reference if (valid_folded_value(sor)) { cdfg_emit_folded_value(folded_value(sor), str, rstack, sor->subtype); return true; // Ok, were are done! } str += qid(sor->object, rstack, id_type(DEFAULT, NO_PREFIX)); return false; } bool m_cdfg_emit_expr (pIIR_NullExpression ne, string &str, RegionStack &rstack, id_type t) { str += "NULL"; return true; } bool m_cdfg_emit_expr (pIIR_Allocator a, string &str, RegionStack &rstack, id_type t) { str += "(list allocator-call-" + string(a->value != NULL? "clone " : "create "); str += "\"" + get_escaped_string(get_long_name(get_declaration(pIIR_AccessType(a->type_mark)->designated_type))) + "\""; if (a->value != NULL) { str += " "; cdfg_emit_expr(a->value, str, rstack, t); } str += ")"; return false; } void cdfg_emit_lit (pIIR_Literal l, string &str) { if (l == NULL) str += "1"; else if (l->is(IR_TEXT_LITERAL)) str += pIIR_TextLiteral(l)->text.to_chars(); else if (l->is(IR_INTEGER_LITERAL)) str += pIIR_IntegerLiteral(l)->text.to_chars(); else if (l->is(IR_FLOATING_POINT_LITERAL)) str += pIIR_FloatingPointLiteral(l)->text.to_chars(); else str += "<" + string(l->kind_name()) + ">"; } /* Emit a physical unit. This done by expressing it in terms of its base unit. */ void cdfg_emit_unit (pIIR_PhysicalUnit u, string &str, RegionStack &rstack, int l) { str += to_string(u->unit_pos); } bool m_cdfg_emit_expr (pIIR_AbstractLiteralExpression ale, string &str, RegionStack &rstack, id_type t) { if (ale->is(IR_PHYSICAL_LITERAL)) { if (valid_folded_value(ale)) { str += to_string(folded_value(ale).long_value()); } else { assert(false); } } else if (ale->value->is(IR_INTEGER_LITERAL) || ale->value->is(IR_FLOATING_POINT_LITERAL)) { cdfg_emit_lit (ale->value, str); } else cdfg_emit_lit (ale->value, str); return true; } bool m_cdfg_emit_expr (pIIR_TypeConversion tc, string &str, RegionStack &rstack, id_type t) { if (valid_folded_value(tc)) { // Print folded value if available cdfg_emit_folded_value(folded_value(tc), str, rstack, tc->type_mark); return true; } pIIR_Type target_base_type = get_base_type(tc->type_mark); pIIR_Declaration target_type_decl = get_declaration(tc->type_mark); string cast_start; string result_str; string expr_str; cdfg_emit_expr(tc->expression, expr_str, rstack, t); if (target_base_type->is(IR_INTEGER_TYPE)) result_str += expr_str; else if (target_base_type->is(IR_ENUMERATION_TYPE)) result_str += expr_str; else if (target_base_type->is(IR_PHYSICAL_TYPE)) result_str += expr_str; else if (target_base_type->is(IR_FLOATING_TYPE)) result_str += expr_str; else if (is_array_type(target_base_type)) { pIIR_ArrayType target_array_base_type = pIIR_ArrayType(target_base_type); result_str += "(list array-type-conversion \"" + get_escaped_string(get_long_name(get_declaration(target_array_base_type))) + "\" " + expr_str + ")"; } else assert(false); str += result_str; return false; } bool m_cdfg_emit_expr (pIIR_QualifiedExpression qe, string &str, RegionStack &rstack, id_type t) { cdfg_emit_expr (qe->expression, str, rstack, t); return false; } bool m_cdfg_emit_expr (pIIR_EnumLiteralReference elr, string &str, RegionStack &rstack, id_type t) { str += to_string(elr->value->enum_pos); return true; } bool m_cdfg_emit_expr (pIIR_ArrayReference aor, string &str, RegionStack &rstack, id_type t) { str += "(list array-element-reference "; cdfg_emit_expr (aor->array, str, rstack, t); for (pIIR_ExpressionList il = aor->indices; il; il = il->rest) { str += " "; bool simple = cdfg_emit_expr (il->first, str, rstack, t); } str +=")"; return false; } bool m_cdfg_emit_expr (pIIR_ArrayLiteralExpression ale, string &str, RegionStack &rstack, id_type t) { // Array literals are always folded. Hence, valid_folded_value // should return true! assert(valid_folded_value(ale)); cdfg_emit_folded_value(folded_value(ale), str, rstack, ale->subtype); return false; } bool m_cdfg_emit_expr (pIIR_RecordReference ror, string &str, RegionStack &rstack, id_type t) { str += "(list record-element-reference "; cdfg_emit_expr (ror->record, str, rstack, t); str += " " + to_string(ror->element->declaration_pos) + ")"; return false; } bool m_cdfg_emit_expr (pIIR_RecordAggregate ra, string &str, RegionStack &rstack, id_type t) { str += "{ "; for (pIIR_ElementAssociationList al = ra->element_association_list; al; al = al->rest) { emit_id (al->first->element->declarator, str, rstack); str += ": "; cdfg_emit_expr (al->first->value, str, rstack, t); if (al->rest) str += ", "; } str += " }"; return false; } bool m_cdfg_emit_expr (pIIR_ArrayAggregate aa, string &str, RegionStack &rstack, id_type t) { // Subtype of aggregate expression. At least the range direction will // be used... string dest_type_str, value_str; pIIR_Type dest_type = aa->subtype; int dim_number = 1; if(dest_type->is(VAUL_SUBARRAY_TYPE)) { // If the aggreate is an multi-dimensional then a node // VAUL_SubarrayType is used to describe the (sub)type of the // sub-aggregate dest_type = pVAUL_SubarrayType(aa->subtype)->complete_type->declaration->type; pIIR_ArrayType at = pVAUL_SubarrayType(aa->subtype)->complete_type; // Determine dimension of main array to which the aggregate // belongs int dim_counter = 0; for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) dim_counter++; // Next, determine the index associated with the array // aggregate. Note that we can only count how many dimensions are // left from where the aggregate starts. int current_dim_counter = 0; for (pIIR_TypeList tl = pVAUL_SubarrayType(aa->subtype)->index_types; tl; tl = tl->rest) current_dim_counter++; // Now, determine the index number the aggregate belongs to dim_number = dim_counter - current_dim_counter + 1; // Setup dest_type_str and dest_type_info_str dest_type_str = "\"" + get_escaped_string(get_long_name(get_declaration(dest_type))) + "\" " + to_string(dim_number); } else if (dest_type->is(IR_ARRAY_TYPE)) { dest_type = aa->subtype->declaration->type; dest_type_str = "\"" + get_escaped_string(get_long_name(get_declaration(dest_type))) + "\""; } else { dest_type_str = "\"" + get_escaped_string(get_long_name(get_declaration(dest_type))) + "\""; } // handle choices for (pIIR_IndexedAssociationList al = aa->indexed_association_list; al; al = al->rest) { pIIR_IndexedAssociation ia = al->first; // Emit choice value value_str += " (list choice "; if (ia->is(IR_SINGLE_INDEXED_ASSOCIATION)) { cdfg_emit_expr(pIIR_SingleIndexedAssociation(ia)->index, value_str, rstack, t) + " "; } else if (ia->is(IR_RANGE_INDEXED_ASSOCIATION)) { cdfg_emit_expr(pIIR_RangeIndexedAssociation(ia)->index_range, value_str, rstack, t) + " "; } else if (ia->is(IR_OTHERS_INDEXED_ASSOCIATION)) { value_str += "others "; } cdfg_emit_expr(ia->value, value_str, rstack, t); value_str += ")"; } str += "(create-array-aggregate " + dest_type_str + " (list" + value_str + "))"; return false; } bool m_cdfg_emit_expr (pIIR_SliceReference sr, string &str, RegionStack &rstack, id_type t) { // Get slice range vector range_desc = get_discrete_range(sr->range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].cdfg_rangedes_to_string(rstack, t); string result = "(list array-slice "; cdfg_emit_expr (sr->array, result, rstack, t); result += " (list range " + range.left + " " + range.dir + " " + range.right + "))"; str += result; return false; } bool m_cdfg_emit_expr (pIIR_AccessReference aor, string &str, RegionStack &rstack, id_type t) { string result = "(list access-ref "; cdfg_emit_expr (aor->access, result, rstack, t); result += ")"; str += result; return false; } bool m_cdfg_emit_expr (pIIR_SignalAttr asr, string &str, RegionStack &rstack, id_type t) { assert(false); return false; } bool m_cdfg_emit_expr (pIIR_AttrTypeFunc atf, string &str, RegionStack &rstack, id_type t) { pIIR_Type return_type = get_base_type(atf->subtype); // First, check whether the attribute was folded successfully. if (valid_folded_value(atf)) { // Emit the folded value instead of accessing determining the // attribute at runtime cdfg_emit_folded_value(folded_value(atf), str, rstack, return_type); return true; } else { // ****************************************************************** // The attribute result could not be determined at compile // time. // ****************************************************************** string result = "(list attribute-type-func-call-"; // Finally, handle the various attributes // ***** RIGHTOF ******************************************* if (atf->is(IR_ATTR_RIGHTOF)) { result += "rightof"; // ***** LEFTOF ******************************************* } else if (atf->is(IR_ATTR_LEFTOF)) { result += "leftof"; // ***** PRED ******************************************* } else if (atf->is(IR_ATTR_PRED)) { result += "pred"; // ***** SUCC ******************************************* } else if (atf->is(IR_ATTR_SUCC)) { result += "succ"; // ***** VAL ******************************************* } else if (atf->is(IR_ATTR_VAL)) { result += "val"; // ***** POS ******************************************* } else if (atf->is(IR_ATTR_POS)) { result += "pos"; // ***** VALUE ******************************************* } else if (atf->is(IR_ATTR_VALUE)) { codegen_error.error("%:error: sorry, attribute VALUE is not supported yet", atf); // ***** IMAGE ******************************************* } else if (atf->is(IR_ATTR_IMAGE)) { codegen_error.error("%:error: sorry, attribute IMAGE is not supported yet", atf); } else assert(false); result += " \"" + get_escaped_string(get_long_name(get_declaration(atf->prefix))) + "\""; if (atf->argument != NULL) { result += " "; cdfg_emit_expr(atf->argument, result, rstack, DEREF); } result += ")"; str += result; return false; } } bool m_cdfg_emit_expr (pIIR_AttrTypeValue atf, string &str, RegionStack &rstack, id_type t) { pIIR_Type return_type = get_base_type(atf->subtype); // First, check whether the attribute was folded successfully. if (valid_folded_value(atf)) { // Emit the folded value instead of accessing determining the // attribute at runtime cdfg_emit_folded_value(folded_value(atf), str, rstack, return_type); return true; } else { // ****************************************************************** // The attribute result could not be determined at compile // time. // ****************************************************************** string result = "(list attribute-type-value-call-"; // Finally, handle the various attributes // ***** LENGTH ******************************************* if (atf->is(IR_ATTR_LENGTH)) { // Actually, this attribute is defined for arrays only! assert(false); // ***** ASCENDING ******************************************* } else if (atf->is(IR_ATTR_ASCENDING)) { result += "ascending"; // ***** HIGH ******************************************* } else if (atf->is(IR_ATTR_HIGH)) { result += "high"; // ***** LOW ******************************************* } else if (atf->is(IR_ATTR_LOW)) { result += "low"; // ***** RIGHT ******************************************* } else if (atf->is(IR_ATTR_RIGHT)) { result += "right"; // ***** LEFT ******************************************* } else if (atf->is(IR_ATTR_LEFT)) { result += "left"; } else assert(false); result += " \"" + get_escaped_string(get_long_name(get_declaration(atf->prefix))) + "\""; if (atf->argument != NULL) { result += " "; cdfg_emit_expr(atf->argument, result, rstack, DEREF); } result += ")"; str += result; return false; } } bool m_cdfg_emit_expr (pIIR_Expression e, string &str, RegionStack &rstack, id_type t) { str += "/* IIR_Expression " + string(e->kind_name()) + " */"; return false; } // Actually, IIR_EnumerationLiteral is not an expression but we need // this method for internal use bool m_cdfg_emit_expr (pIIR_EnumerationLiteral e, string &str, RegionStack &rstack, id_type t) { str += to_string(e->enum_pos); return true; } freehdl-0.0.7/v2cc/v2cc-impl.cc0000644000175000017500000042226610707454072013032 00000000000000#include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" void emit_subprogram_associations (string &str, RegionStack &rstack, pIIR_AssociationList assocs, pIIR_InterfaceList formals, list &extra_parameter) { string separator = ""; // **************************************************************************** // Add normal subprogram parameter // **************************************************************************** for (pIIR_InterfaceList fl = formals; fl; fl = fl->rest) { pIIR_InterfaceDeclaration par = fl->first; // select formal parameter /* Select association element from an association list which * corresponds with given formal */ list a_list = find_matching_actuals(assocs, par); assert (a_list.size() <= 1); // Only simple assoication is currently supported here! pIIR_AssociationElement a = a_list.size() == 0? NULL : a_list.front(); str += separator; if (a != NULL && !a->actual->is(IR_OPEN_EXPRESSION)) { // An actual is associated with the formal if (a->formal_conversion) { str += "/* converted by "; emit_id (a->formal_conversion, str, rstack); str += " */"; } // ******************************************************* // Handle signal parameter // ******************************************************* if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // First, append sig_info pointer emit_expr (a->actual, str, rstack, SIGNAL); // Next, append reader if signal is of mode in or inout or buffer if (par->mode == IR_IN_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += ","; emit_expr (a->actual, str, rstack, READER); } // Finally, append driver if mode is of out or inout or buffer if (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { str += ","; emit_expr (a->actual, str, rstack, DRIVER); } } else // ******************************************************* // Handle normal parameter (non signal) // ******************************************************* emit_expr (a->actual, str, rstack, id_type(READER, DEREF)); } else if (par->initial_value != NULL) // If the parameter was left open then insert the default // value if one is defined in the interface declaration emit_expr (par->initial_value, str, rstack, DEFAULT); else // If no default value is defined for the formal then create a // dummy instance of the appropriate type str += create_default_instance(par->subtype, rstack); separator = ","; } // **************************************************************************** // Add extra subprogram parameter // **************************************************************************** for (list::iterator iter = extra_parameter.begin(); iter != extra_parameter.end(); iter++) { pIIR_Declaration par = (*iter).declaration; if (par->is(IR_VARIABLE_INTERFACE_DECLARATION) || par->is(IR_VARIABLE_DECLARATION) || par->is(IR_CONSTANT_INTERFACE_DECLARATION) || par->is(IR_CONSTANT_DECLARATION) || par->is(IR_FILE_DECLARATION) || par->is(IR_FILE_INTERFACE_DECLARATION)) { str += separator + qid(par, rstack, DEFAULT); } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION) || par->is(IR_SIGNAL_DECLARATION)) { pIIR_ObjectDeclaration opar = pIIR_ObjectDeclaration(par); AccessFlags &aflags = (*iter).access_type; // Add sign_info pointer if a signal function kind attribute has // been applied on the parameter if ((aflags & SIGNAL_FUNCTION_ATTRIBUTE) || (aflags & SENSITIVE)) { str += separator + qid(par, rstack, SIGNAL); separator = ","; } // Next, append reader if signal is read if (aflags & READ) { str += separator + qid(par, rstack, READER); separator = ","; } // Finally, append driver if signal is written if (aflags & WRITE) str += separator + qid(par, rstack, DRIVER); } else if (par->is(IR_TYPE_DECLARATION) || par->is(IR_SUBTYPE_DECLARATION)) { // A type has been used and we need to pass over the type info // pointer of that type! str += separator + qid(par, rstack, INFO) + "_INFO"; } else continue; // Set separator for next parameter separator = ","; } } // create code to initialize VHDL objects void emit_decls_init_item (pIIR_DeclarationList dl, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration type = NULL; string type_str = ""; string init_str = ""; string info_str = ""; bool complex_info = false; pIIR_Declaration decl = pIIR_Declaration(dl->first); //*********************************************************************** // first, check whether a info object has to be created at // runtime. This is required e.g. for objects of an implicit // created array subtype. // (e.g.: "variable var : bit_vector(0 to 3)") //*********************************************************************** if (decl->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decl)->alias_base != NULL) { } else if (decl->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) { // If this signal has not been used then do not output any // initialization for it! pV2CC_ImplicitSignalDeclaration_WaitFor obj = pV2CC_ImplicitSignalDeclaration_WaitFor(decl); info_str = "&L3std_Q8standard_I7boolean_INFO"; complex_info = false; type = NULL; } else if (decl->is(IR_SIGNAL_DECLARATION) || decl->is(IR_VARIABLE_DECLARATION) || decl->is(IR_CONSTANT_DECLARATION)) { // currently, only signals, variables and constants are considered. // Try to find the corresponding type declaration. pIIR_ObjectDeclaration obj = pIIR_ObjectDeclaration(decl); complex_info = is_implicit_array_subtype(pIIR_ObjectDeclaration(decl)->subtype); type = get_declaration(obj->subtype); info_str = get_type_info_obj(obj->subtype, rstack, false); } else if (decl->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { } else if (decl->is(IR_TYPE_DECLARATION)) { } else if (decl->is(IR_FILE_DECLARATION)) { } else if (decl->is(IR_SUBPROGRAM_DECLARATION)) { } else // all other kind of objects are not considered return; //*********************************************************************** // Now, generate code to initialize objects depending on the object type //*********************************************************************** if (decl->is(IR_OBJECT_DECLARATION) && pIIR_ObjectDeclaration(decl)->alias_base != NULL) { // ************************************************************************** // Alias declaration // ************************************************************************** pIIR_ObjectDeclaration alias_decl = pIIR_ObjectDeclaration(decl); // Determine aliased object pIIR_ObjectDeclaration aliased_object = get_object_declaration(alias_decl->alias_base); if (aliased_object->is(IR_CONSTANT_DECLARATION) || aliased_object->is(IR_VARIABLE_DECLARATION) || aliased_object->is(IR_CONSTANT_INTERFACE_DECLARATION) || aliased_object->is(IR_VARIABLE_INTERFACE_DECLARATION)) { if (is_array_type(alias_decl->subtype)) { // ************************************************************************** // Array alias // ************************************************************************** // Array alias objects are declared via a special array type // array_alias string array_info_str, array_data_str; // Check whether the aliased array is an array slice or the // entire array shall be aliased if (alias_decl->alias_base->is(IR_SLICE_REFERENCE)) { pIIR_SliceReference sr = pIIR_SliceReference(alias_decl->alias_base); // Get slice range vector range_desc = get_discrete_range(sr, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // The array data pointer points to the left element of the slice array_data_str += "&"; emit_expr(sr->array, array_data_str, rstack, id_type(READER, DEREF)); array_data_str += "[" + range.left + "]"; // Assume that no subtype is specified for the alias // name. Hence, the array_info object is derived from the // slice range. array_info_str = create_array_info_obj(sr->subtype, sr->range, rstack, false); } else { // The entire array shall be aliased emit_expr(alias_decl->alias_base, array_data_str, rstack, id_type(READER, DEREF)); array_data_str += ".data"; // Assume that no subtype is specified for the alias // name. Hence, the array_info object is derived from the // aliased array. emit_expr(alias_decl->alias_base, array_info_str, rstack, id_type(READER, DEREF)); array_info_str += ".info"; } // Compare subtypes of the alias array and the aliased // array. If they are equal then we assume that the array // subtype is dereived from the aliased array. if (alias_decl->subtype != alias_decl->alias_base->subtype) array_info_str = get_type_info_obj(alias_decl->subtype, rstack, false); // Print line and file info last_pos_info = emit_posinfo(decl->pos, str, last_pos_info, l); str += spaces(l) + qid(decl, rstack, id_type()) + ".set(" + array_info_str + ", " + array_data_str + ");\n"; } else { // Print line and file info last_pos_info = emit_posinfo(decl->pos, str, last_pos_info, l); // ************************************************************************** // Remaining aliases // ************************************************************************** // The other alias objects are implemented via // pointers. Hence, initialize the pointer with the address // of the aliased object address str += spaces(l) + qid(decl, rstack, id_type()) + "=&"; emit_expr(alias_decl->alias_base, str, rstack, id_type(READER, DEREF)); str += ";\n"; } } else { codegen_error.error("%:error: sorry, this alias declaration is curently not supported", decl); exit(1); } } else if (decl->is(V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR)) { // ************************************************************************** // declaration of an implicit signal to handle waits with timeouts // ************************************************************************** pV2CC_ImplicitSignalDeclaration_WaitFor sig = pV2CC_ImplicitSignalDeclaration_WaitFor(decl); // Print line and file info last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); // Create a new sig_info instance str += spaces(l) + qid(sig, rstack, id_type()) + string("=new sig_info "); str += "(iname, \":" + nid(sig->declarative_region,BARE) + ":" + nid(sig,BARE) + "\",\"" + get_long_name(sig->declarative_region) + "\"," + info_str + ",vREGISTER,this);\n"; } else if (decl->is(IR_SIGNAL_DECLARATION)) { // ************************************************************************** // signal declaration // ************************************************************************** pIIR_SignalDeclaration sig = pIIR_SignalDeclaration(decl); // If the current signal is declared within a package then the scope // reference pointer from the package is passed over to the sig_info // constructor. Otherwise, the pointer to the current architecture // (or other declarative region) is used. string sref = is_PackageDeclarativeRegion(sig->declarative_region)? "sref" : "this"; // Print line and file info last_pos_info = emit_posinfo(sig->pos, str, last_pos_info, l); // Create a new sig_info instance string type_str = type != NULL? qid(type, rstack, TYPE) : "enumeration"; str += spaces(l) + qid(sig, rstack, id_type()) + string("=new sig_info<") + type_str + " > "; str += "(iname, \":" + nid(sig,BARE) + "\",\"" + get_long_name(sig->declarative_region) + "\"," + info_str + ",vREGISTER," + sref + ");\n"; // generate code which initializes the object if an initial // value was given in the object declaration if (sig->initial_value) { // Print line and file info last_pos_info = emit_posinfo(sig->pos, str, last_pos_info, l); str += spaces(l) + qid(sig, rstack, id_type()) + "->init(" ; emit_expr (sig->initial_value, str, rstack, DEFAULT); str += ");\n"; } } else if (decl->is(IR_CONSTANT_DECLARATION) || decl->is(IR_VARIABLE_DECLARATION)) { // ************************************************************************** // constant or variable declaration // ************************************************************************** if (!pIIR_ObjectDeclaration(decl)->subtype->is(IR_ACCESS_TYPE) && (complex_info || !is_scalar_type(pIIR_ObjectDeclaration(decl)->subtype)) && (!is_array_type (pIIR_ObjectDeclaration(decl)->subtype) || is_constrained_array_type (pIIR_ObjectDeclaration(decl)->subtype))) { // if the corresponding info object is created at runtime or // the object is of a composite type then assign this info // instance to the object pIIR_Type base_subtype = get_base_type(pIIR_ObjectDeclaration(decl)->subtype); // If the object is an one-dimensional array of scalars then // determine the initial value of the scalars and pass it over // as an addditional argument to the init method. This helps // speeding up array initialization. string elem_init_value = ""; if (is_array_type(base_subtype) && pIIR_ArrayType(base_subtype)->index_types->rest == NULL && is_scalar_type(pIIR_ArrayType(base_subtype)->element_type)) { // Get range of element type and determine left // bound. Usually, the left bound can be determined at // compile time. However, in some cases code must be // generated to access the info instance of the element // type. pIIR_Type element_type = pIIR_ArrayType(base_subtype)->element_type; vector range_desc = get_discrete_range(element_type, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); elem_init_value = "," + range.left; } str += spaces(l) + qid(decl, rstack, id_type()) + ".init(" + info_str + elem_init_value + ");\n"; } // skip if there is no initial value if (pIIR_ObjectDeclaration(decl)->initial_value != NULL && is_array_type (pIIR_ObjectDeclaration(decl)->subtype) && !is_constrained_array_type (pIIR_ObjectDeclaration(decl)->subtype) && !is_constrained_array_type (pIIR_ObjectDeclaration(decl)->initial_value->subtype)) { // Enter this part if there is an initial value and the type of // the object is an unconstrained array and the type of the // initial value is also unconstrained. This might happen if the // initial value is determined from a function call that returns // an unconstrained array. In this case, the bounds of this // initial value are determined at runtime. id_type id = get_default_id_type(rstack); // Print line and file info last_pos_info = emit_posinfo(decl->pos, str, last_pos_info, l); str += spaces(l) + qid(decl, rstack, id_type()) + ".init(const_pointer(" ; emit_expr(((pIIR_ObjectDeclaration)decl)->initial_value, str, rstack, id); str += "));\n"; // skip if there is no initial value } else if (pIIR_ObjectDeclaration(decl)->initial_value != NULL) { // processes or subprograms access objects declared within the // entity/architecture via pointers id_type id = get_default_id_type(rstack); // Print line and file info last_pos_info = emit_posinfo(decl->pos, str, last_pos_info, l); str += spaces(l) + qid(decl, rstack, id_type()) + "=" ; emit_expr(((pIIR_ObjectDeclaration)decl)->initial_value, str, rstack, id); str += ";\n"; } else if (decl->is(IR_VARIABLE_DECLARATION)) { // Next, handle variable declarations without explicit initial // value id_type id = get_default_id_type(rstack); if (is_scalar_type(pIIR_VariableDeclaration(decl)->subtype)) { // Variable is scalar! // Get range of scalar subtype vector range_desc = get_discrete_range(pIIR_VariableDeclaration(decl)->subtype, rstack, IR_NOT_STATIC); // Print line and file info last_pos_info = emit_posinfo(decl->pos, str, last_pos_info, l); range_desc[0].constant_fold_rangedes(rstack); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, id); if (range.valid[0]) // If left bound is locally static then determine left // bound at compile time str += spaces(l) + qid(decl, rstack, id_type()) + "=" + range.left + ";\n"; else // If range is not locally static then use info pointer to // determine intial value. str += spaces(l) + qid(decl, rstack, id_type()) + "=" + info_str + "->left_bound;\n"; } else if (pIIR_VariableDeclaration(decl)->subtype->is(IR_ACCESS_TYPE)) { // Variable is of an access type str += spaces(l) + qid(decl, rstack, id_type()) + "=NULL;\n"; } } // Emit code to register constant/variable if (codegen_options.get_emit_register_code () && !decl->declarative_region->is(IR_SUBPROGRAM_DECLARATION)) { pIIR_ObjectDeclaration odecl = pIIR_ObjectDeclaration(decl); // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += spaces(l); if (odecl->is(IR_VARIABLE_DECLARATION)) str += "register_variable(&"; else if (odecl->is(IR_CONSTANT_DECLARATION)) str += "register_constant(&"; // Get type_info pointer for object. If the object is scalar or // an access type then the pointer is retrieved from the // corresponding type. Otherwise the type_info pointer can be // extracted from the object itself (e.g., if the object is an // array then the type_info pointer is stored in the array // object). string info_str = is_scalar_type(odecl->subtype) || get_base_type (odecl->subtype)->is (IR_ACCESS_TYPE) ? get_type_info_obj(odecl->subtype, rstack, false) : qid(odecl, rstack, id_type()) + ".info"; string sref = "this"; if (is_PackageDeclarativeRegion(odecl->declarative_region)) sref = "sref"; else if (static_declarative_region(odecl) == RootDeclarativeRegion(rstack)) sref = "NULL"; str += qid(odecl, rstack, id_type()) + ",\"" + get_long_name(odecl->declarative_region) + "\",\":" + nid(odecl, BARE) + "\"," + info_str + "," + sref + ");\n"; } } else if (decl->is(IR_FILE_DECLARATION)) { // ****************************************************************** // initialize file object // ****************************************************************** pIIR_FileDeclaration file_decl = pIIR_FileDeclaration(decl); // Print line and file info last_pos_info = emit_posinfo(file_decl->pos, str, last_pos_info, l); // File name given? if (file_decl->file_logical_name == NULL) return; // Add an corresponding call to file open str += spaces(l) + "file_open(" + qid(file_decl, rstack, id_type()) + ","; emit_expr(file_decl->file_logical_name, str, rstack, id_type(READER, DEREF)); str += ","; if (file_decl->file_open_expression != NULL) emit_expr(file_decl->file_open_expression, str, rstack, id_type(READER, DEREF)); else // If no open expression is present then set file mode to READ_MODE str += "enumeration(0)"; str += ");\n"; } else if (decl->is(V2CC_INTERNAL_OBJECT_DECLARATION)) { // ****************************************************************** // initialize internal variables // ****************************************************************** // Note that the process code must be emitted first because some // internal variables are not created before code emission! pV2CC_InternalObjectDeclaration obj = pV2CC_InternalObjectDeclaration(decl); // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(obj->pos != NULL? obj->pos : NO_SOURCE_LINE, str, last_pos_info, l); // Skip initialization if no inital value is given if (obj->cpp_initial_string == "" && obj->initial_value == NULL) return; init_str = get_internal_object_initial_string(obj, rstack); str += spaces(l) + obj->declarator->text.to_chars() + init_str + ";\n"; } else if (decl->is(IR_TYPE_DECLARATION)) { // ****************************************************************** // Declare a new type/subtype // ****************************************************************** pIIR_TypeDeclaration tdecl = pIIR_TypeDeclaration(decl); pIIR_Type type = tdecl->type; string hdr, impl, info_init; emit_hdr(type, hdr, rstack, 0); emit_impl(type, impl, rstack, 0); // add internal code object to top region pIIR_DeclarativeRegion root_region = RootDeclarativeRegion(rstack); // emit type info emit_info_init(type, info_init, rstack, true, 0); if (static_declarative_region(decl) == root_region) { pIIR_DeclarationList *insert_pos = root_region == ActiveDeclarativeRegion(rstack) ? &dl->rest : NULL; insert_internal_code(insert_pos, root_region, decl->declarator->text.to_chars(), hdr, impl, DECLARE_GLOBALLY); // The new type is static. Hence, the type info object can be // globally defined. string register_str = ".register_type(\"" + get_long_name(tdecl->declarative_region) + "\"," + "\"" + get_long_name(tdecl) + "\",\":" + decl->declarator->text.to_chars() + "\",NULL)"; // If the info instance is constant then declare it globally insert_internal_object_declaration(insert_pos, root_region, type->pos, qid(type, rstack, INFO) + "_INFO", qid(type, rstack, INFO), info_init + register_str, DECLARE_GLOBALLY); } else { insert_internal_code(NULL, root_region, decl->declarator->text.to_chars(), hdr, impl, DECLARE_GLOBALLY); // emit code to register type if the type is not strictly bound // to a subprogram region. I.e., types which are only static // with respect to a subprogram are not registered. string register_str; if (static_declarative_region(decl) == NULL || !static_declarative_region(decl)->is(IR_SUBPROGRAM_DECLARATION)) register_str = ".register_type(\"" + get_long_name(tdecl->declarative_region) + "\"," + "\"" + get_long_name(tdecl) + "\",\":" + decl->declarator->text.to_chars() + "\",NULL)"; // The new type is not static. Hence, the type info instance // is created locally. Note that non static type info // instances are not registered. insert_internal_object_declaration(&dl->rest, ActiveDeclarativeRegion(rstack), type->pos, qid(type, rstack, INFO) + "_INFO", qid(type, rstack, INFO), info_init + register_str, DECLARE_LOCALLY); } } else if (decl->is(IR_SUBPROGRAM_DECLARATION)) { // ************************************************************************** // Subprogram // ************************************************************************** if (decl->is(IR_PREDEFINED_FUNCTION_DECLARATION)) { pIIR_PredefinedFunctionDeclaration pfunc = pIIR_PredefinedFunctionDeclaration(decl); if (get_operator_type(pfunc) == STD_OP) // Predefined VHDL operators are implicitly defined. Hence, // there is nothing to do here. return; } string hdr, impl; // plot complete subprogram declaration into string emit_impl(decl, impl, rstack, 0); // plot subprogram prototype into string emit_hdr(decl, hdr, rstack, 0); // append internal code object to top region. This code is then // emitted globally. I.e., code for subprograms is collected in // internal code objects. pIIR_DeclarativeRegion root_region = RootDeclarativeRegion(rstack); insert_internal_code(NULL, root_region, decl->declarator->text.to_chars(), hdr, impl, DECLARE_GLOBALLY); } } // create code to initialize VHDL objects void emit_decls_init (pIIR_DeclarationList decl_list, string &str, RegionStack &rstack, int l) { //*********************************************************************** // Analyze each item on the declaration list //*********************************************************************** for (pIIR_DeclarationList dl = decl_list; dl; dl = dl->rest) { emit_decls_init_item (dl, str, rstack, l); } } /* * Simulation Object Implementation */ void m_emit_impl (pIIR_ArrayType at, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } IR_StaticLevel m_emit_info_init (pIIR_ArrayType at, string &str, RegionStack &rstack, bool static_info, int l) { // Count number of dimensions int counter = 0; for (pIIR_TypeList tl = at->index_types; tl; tl = tl->rest) counter++; // If the array has more than a single dimension then first declare // a separate internal array type for each dimension. Note that // e.g. a two-dimensional array "type mytype array(integer range <>, // positive range <>) of bit" is transformed into two one // dimentional arrays similar to: "type internal_array is // array(positive range <>) of bit" and "type mytype is // array(integer range <>) of internal_array". string array_info_str = get_type_info_obj(at->element_type, rstack, static_info); for (int i = counter; i >= 1; i--) { pIIR_TypeList tl = at->index_types; for (int j = 1; j < i; j++) tl = tl->rest; if (i == 1) array_info_str = ".set(" + array_info_str + "," + get_type_info_obj(get_basic_type(tl->first), rstack, static_info) + "," + (static_info?"-1":"0") + ")"; else array_info_str = "(new array_info(" + array_info_str + "," + get_type_info_obj(get_basic_type(tl->first), rstack, static_info) + "," + (static_info?"-1":"0") + "))"; } str += array_info_str; return IR_LOCALLY_STATIC; } void m_emit_impl (pIIR_ArraySubtype ast, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } IR_StaticLevel m_emit_info_init (pIIR_ArraySubtype ast, string &str, RegionStack &rstack, bool static_info, int l) { pIIR_TypeDeclaration decl = ast->declaration; IR_StaticLevel slevel = IR_LOCALLY_STATIC; string array_info_str; // Check whether the array subtype introduces some new constraints if (ast->constraint == NULL) { // No, no new constraints! Hence, get array info from immediate // base type array_info_str = get_type_info_obj(ast->immediate_base, rstack, static_info); // Determine static level of type by analyzing static level of // ranges and element type. slevel = get_static_level(ast, rstack); } else { // Ok, this there are some new constraints. Get base type of array // subtype. assert(ast->base->is(IR_ARRAY_TYPE)); pIIR_ArrayType base_type = pIIR_ArrayType(ast->base); pIIR_Type basic_type = pIIR_ArrayType(get_basic_type(ast->immediate_base)); // Count number of dimensions int counter = 0; for (pIIR_TypeList tl = ast->constraint; tl; tl = tl->rest) counter++; // Determine whether the base type of the array is named (i.e., // whether there is an explicit type declaration for the base // type) bool named_basic_type = (decl == NULL) && (basic_type->declaration != NULL); // If the array hase more than a single dimension then first // declare a separate internal array type for each dimension. Note // that e.g. a two-dimensional array "type mytype array(integer // range <>, positive range <>) of bit" is transformed into two // one dimentional arrays similar to: "type internal_array is // array(positive range <>) of bit" and "type mytype is // array(integer range <>) of internal_array". Get element type if (named_basic_type) { // If the base type is named then the element type is derived // from the base array type array_info_str = get_type_info_obj(basic_type, rstack, static_info) + "->element_type"; for (int i = counter; i > 1; i--) array_info_str = "parray_info(" + array_info_str + ")->element_type"; } else // Otherwise, the element type is determined directly from the // corresponding element subtype array_info_str = get_type_info_obj(base_type->element_type, rstack, static_info); // Step through each dimension of the array starting with the last // dimension. for (int i = counter; i >= 1; i--) { string base_info_str; pIIR_TypeList tl = ast->constraint; for (int j = 1; j < i; j++) tl = tl->rest; // Get index range vector range_desc = get_discrete_range(tl->first, rstack, IR_NOT_STATIC); slevel = merge_level(range_desc[0].static_level, slevel); // Bail out if more than a single range descriptor is returned assert(range_desc.size() <= 1); // Next convert range descriptor to int strings StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // Get index info instance for the corresponding array index string index_info_str; if (named_basic_type) { // If the base type of the current array subtype is named then // the corresponding index subtype is derived from this type index_info_str = get_type_info_obj(basic_type, rstack, static_info); for (int k = i; k > 1; k--) index_info_str = "parray_info(" + index_info_str + ")->element_type"; index_info_str = "parray_info(" + index_info_str + ")->index_type"; } else // Otherwise, the index info is directly derived from the // corresponding index subtype index_info_str = get_type_info_obj(get_base_type(tl->first), rstack, static_info); string left_checked_str = range.left, right_checked_str = range.right; // Shall we perform runtime range checks? if ((do_runtime_checks & CG_CHECK_COMPOSITE_TYPE_RANGE)) { // Could the left bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(ast) & RT_CHECK_LEFT_ARRAY_BOUND) left_checked_str = index_info_str + "->check(" + range.left + ")"; // Could the right bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(ast) & RT_CHECK_RIGHT_ARRAY_BOUND) right_checked_str = index_info_str + "->check(" + range.right + ")"; } // setup init value for array info instance if (i == 1) array_info_str = ".set(" + array_info_str + "," + index_info_str + "," + left_checked_str + "," + range.dir + "," + right_checked_str + "," + (static_info?"-1":"0") + ")"; else array_info_str = "(new array_info(" + array_info_str + "," + index_info_str + "," + left_checked_str + "," + range.dir + "," + right_checked_str + "," + (static_info?"-1":"0") + "))"; } } str += array_info_str; return slevel; // return compound static level of ranges } void m_emit_impl (pIIR_ScalarSubtype sst, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = sst->declaration; // Is the subtype constrained or at least a resolution function hase // been added? if (sst->range == NULL && sst->resolution_function == NULL) { // No, the subtype is not constrained (e.g., "subtype color2 is // color;"). Hence, do nothing. } else if (sst->base->is(IR_ENUMERATION_TYPE)) { // **************************************************************************** // Enumeration subtype // **************************************************************************** // The subtype is constrained. Hence, left pos of new // enumeration subtype. vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction are static StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); if (and_reduce(range.valid)) { // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += "/* Implementation of enumeration type " + get_long_name(decl) + " */\n"; str += "const char **" + qid(decl, rstack, INFO) + "::values=" + "((enum_info_base&)" + qid(decl, rstack, INFO) + "_INFO).values=" + "&" + qid(sst->base->declaration, rstack, INFO) + "_INFO.get_values()[" + range.left + "];\n"; } } else if (sst->base->is(IR_PHYSICAL_TYPE)) { pIIR_PhysicalType pt = pIIR_PhysicalType (sst->base); // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += ("/* Implementation of physical base type " + get_long_name(decl) + " */\n"); string pt_qid = qid (pt, rstack, INFO); str += "const char *" + pt_qid + "::units[] = {\n"; int unit_count = 0; for (pIIR_UnitList ul = pt->units; ul; ul = ul->rest) { str += " \"" + nid (ul->first, BARE) + "\""; if (ul->rest) str += ",\n"; unit_count++; } str += "\n};\n"; str += "const lint " + pt_qid + "::scale[] = {\n"; string scale_string = "1LL"; str += " " + scale_string; for (pIIR_UnitList ul = pt->units->rest; ul; ul = ul->rest) { pIIR_PhysicalUnit u = ul->first; string this_scale = ""; emit_expr (u->multiplier, this_scale, rstack, DEFAULT); scale_string = this_scale + "*(" + scale_string + ")"; str += ",\n " + scale_string; } str += "\n};\n"; str += ("const int " + pt_qid + "::unit_count = " + to_string (unit_count) + ";\n"); } else if (sst->base->is(IR_INTEGER_TYPE) || sst->base->is(IR_FLOATING_TYPE)) { // **************************************************************************** // Integer, physical or floating point subtype // **************************************************************************** } else codegen_error.error("%:error: sorry, this subtype declaration is currently not supported", sst); } IR_StaticLevel m_emit_info_init(pIIR_ScalarSubtype sst, string &str, RegionStack &rstack, bool static_info, int l) { // First, check out whether an resolution function is associated // with this type string add_resolver; if (sst->resolution_function != NULL) { vector libunit = get_library_and_unit_name(sst->resolution_function); // Continue if the current declaration is predefined in // library std but not std.textio. string ideal_str = "false"; if (libunit[0] == "ieee" && libunit[1] == "std_logic_1164") ideal_str = "true"; // If a resolution function has been added then add code to // register the reolver handle add_resolver += ".add_resolver(resolver_handler<" + qid(sst, rstack, TYPE) + "," + qid(sst->resolution_function, rstack, DEFAULT) + ">," + get_type_info_obj(sst->resolution_function->interface_declarations->first->subtype, rstack, INFO) + "," + ideal_str + ")"; } // Is the subtype constrained? if (sst->range == NULL) { // If not then the info instance is equal to the info instance of // the immedate base type str += ".set(" + get_type_info_obj(sst->immediate_base, rstack, false) + ")" + add_resolver; return get_static_level(sst, rstack); } else if (sst->base->is(IR_INTEGER_TYPE) || sst->base->is(IR_PHYSICAL_TYPE) || sst->base->is(IR_FLOATING_TYPE) || sst->base->is(IR_ENUMERATION_TYPE)) { // **************************************************************************** // Integer, enumeration, physical or floating point subtype // **************************************************************************** vector range_desc = get_discrete_range(sst, rstack, IR_NOT_STATIC); // Check whether bounds and range direction must be determined at // runtime StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); if (!and_reduce(range.valid)) { // Ok, bounds are not static. Hence, they must be set at runtime // via the "set" method of integer_info_base. string left_checked_str = range.left, right_checked_str = range.right; // Shall we perform runtime range checks? if ((do_runtime_checks & CG_CHECK_SCALAR_TYPE_RANGE)) { string base_info_str = get_type_info_obj(get_basic_type(sst->immediate_base), rstack, false); // Could the left bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(sst) & RT_CHECK_LEFT_BOUND) left_checked_str = base_info_str + "->check(" + range.left + ")"; // Could the right bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(sst) & RT_CHECK_RIGHT_BOUND) right_checked_str = base_info_str + "->check(" + range.right + ")"; } if (sst->base->is(IR_PHYSICAL_TYPE)) { string info_base_str = get_type_info_obj(sst->base, rstack, false); str += ".set(" + left_checked_str + "," + right_checked_str + "," + "min(" + range.left + "," + range.right + ")," + "max(" + range.left + "," + range.right + ")," + info_base_str + "->units," + info_base_str + "->scale," + info_base_str + "->unit_count)" + add_resolver; } else if (sst->base->is(IR_ENUMERATION_TYPE)) { string info_base_str = get_type_info_obj(sst->base, rstack, false); str += ".set(" + left_checked_str + "," + right_checked_str + "," + info_base_str + "->get_values()[" + range.left + "])" + add_resolver; } else str += ".set(" + left_checked_str + "," + right_checked_str + "," + "min(" + range.left + "," + range.right + ")," + "max(" + range.left + "," + range.right + "))" + add_resolver; } return range_desc[0].static_level; } else codegen_error.error("%:error: sorry, this subtype declaration is currently not supported", sst); return IR_LOCALLY_STATIC; } void m_emit_impl (pIIR_EnumerationType et, string &str, RegionStack &rstack, int l) { pIIR_TypeDeclaration decl = et->declaration; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += "/* Implementation of enumeration type " + get_long_name(decl) + " */\n"; str += "const char *" + qid(decl, rstack, INFO) + "::values[" +/* + to_string(enum_item_number(et))+*/ "]={"; const char *separator = ""; for (pIIR_EnumerationLiteralList ell = et->enumeration_literals; ell; ell = ell->rest) { str += string(separator) + "\"" + string(ell->first->declarator->text.to_chars()) + "\""; separator = ","; } str += "};\n"; } IR_StaticLevel m_emit_info_init (pIIR_EnumerationType et, string &str, RegionStack &rstack, bool static_info, int l) { pIIR_TypeDeclaration decl = et->declaration; //str += "new " + qid(decl, rstack, INFO); return get_static_level(et, rstack); } void m_emit_impl (pIIR_AccessType at, string &str, RegionStack &rstack, int l) { } IR_StaticLevel m_emit_info_init (pIIR_FileType ft, string &str, RegionStack &rstack, bool static_info, int l) { str += ".set(" + get_type_info_obj(ft->type_mark, rstack, false) + ")"; return get_static_level(ft, rstack); } void m_emit_impl (pIIR_FileType ft, string &str, RegionStack &rstack, int l) { } void m_emit_impl (pIIR_RecordType rt, string &str, RegionStack &rstack, int l) { int ec = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) ec += 1; string qid_t = qid(rt, rstack, TYPE); str += "const char *" + qid(rt, rstack, TYPE) + "_NAMES[] = {\n"; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) { str += " \"" + nid (edl->first, BARE) + "\""; if (edl->rest) str += ","; str += "\n"; } str += "};\n"; str += "void *" + qid(rt, rstack, TYPE) + "_ELEM_ADDR(void *p, int i)\n"; str += "{\n"; str += " " + qid(rt, rstack, TYPE) + "_DATA &obj=*(" + qid(rt, rstack, TYPE) + "_DATA*)p;\n"; str += " switch (i) {\n"; int i = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest, i++) { str += " case " + to_string (i) + ": return (void*)&obj." + nid (edl->first, DEFAULT) + ";\n"; } str += " };\n"; str += "};\n"; } void m_emit_impl (pIIR_RecordSubtype ast, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } IR_StaticLevel m_emit_info_init (pIIR_RecordType rt, string &str, RegionStack &rstack, bool static_info, int l) { int ec = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) ec += 1; // First, initialize record info instance with basic information string tqid = qid(rt, rstack, TYPE); str += ".set(" + to_string(ec) + ",sizeof(" + tqid + "_DATA)," + tqid + "_NAMES," + tqid + "_ELEM_ADDR," + (static_info? "-1" : "0") + ")"; // Finally, set info pointer of the various record elements. For // each record element method "set(int,type_info_interface*)" is // called. int i = 0; for (pIIR_ElementDeclarationList edl = rt->element_declarations; edl; edl = edl->rest) str += ".set(" + to_string(i++) + "," + get_type_info_obj(edl->first->subtype, rstack, static_info) + ")"; } IR_StaticLevel m_emit_info_init (pIIR_RecordSubtype rst, string &str, RegionStack &rstack, bool static_info, int l) { pIIR_TypeDeclaration decl = rst->declaration; IR_StaticLevel slevel = IR_LOCALLY_STATIC; // base type string record_info_str = get_type_info_obj(rst->immediate_base, rstack, static_info); // Determine static level of type by analyzing static level of // record elements slevel = get_static_level(rst, rstack); str += ".set(" + record_info_str + "," + (static_info? "-1" : "0") + ")"; return slevel; // return compound static level of ranges } IR_StaticLevel m_emit_info_init (pIIR_AccessType at, string &str, RegionStack &rstack, bool static_info, int l) { str += ".set(" + get_type_info_obj(at->designated_type, rstack, false) + ")"; return get_static_level(at, rstack); } void m_emit_impl (pIIR_EntityDeclaration e, string &str, RegionStack &rstack, int l) { // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += "/* Implementation of entity methods */\n"; str += qid(e, rstack, id_type()); str += "::\n"; str += qid(e, rstack, id_type()); str += "(name_stack &iname, map_list *mlist, void *father) {\n"; str += " father_component = father;\n"; str += " iname.push(\"\");\n"; // Generics if (extended_generic_clause(e) != NULL) emit_decls_init(extended_generic_clause(e), str, rstack, 4); for (pIIR_DeclarationList dl = extended_generic_clause(e); dl; dl = dl->rest) if (dl->first->is(IR_CONSTANT_INTERFACE_DECLARATION)) emit_generic_interfacecon(pIIR_ConstantInterfaceDeclaration(dl->first), str, rstack, 4); // Ports if (extended_port_clause(e) != NULL) emit_decls_init(extended_port_clause(e), str, rstack, 4); for (pIIR_DeclarationList dl = extended_port_clause(e); dl; dl = dl->rest) if (dl->first->is(IR_SIGNAL_INTERFACE_DECLARATION)) emit_sig_interfacecon(pIIR_SignalInterfaceDeclaration(dl->first), str, rstack, 4); str += " iname.pop();\n"; str += "};\n"; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += "\n"; } void emit_handle (pIIR_ArchitectureDeclaration a ,string &str, RegionStack &rstack) { // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, 0); str += "/* handle for simulator to find architecture */\n"; // handle func str += "void*\n"; str += qid (a, rstack, id_type()); str += "_handle(name_stack &iname, map_list *mlist, void *father, int level) {\n"; str += " REPORT(cout << \"Starting constructor "; str += qid (a, rstack, id_type()); str += " ...\" << endl);\n"; str += " return new " + qid (a, rstack, id_type()); str += "(iname, mlist, father, level);\n"; str += "};\n"; str += "extern int " + qid (a, rstack, id_type()) + "_init ();\n"; str += "handle_info *"; // dummy var str += qid (a, rstack, id_type()); str += "_hinfo =\n"; str += " add_handle(\""; str += string(a->entity->library_name->text.to_chars()) + "\",\"" + nid(a->entity, BARE) + "\",\"" + nid(a, BARE); str += "\",&"; str += qid (a, rstack, id_type()); str += "_handle,&"; str += qid (a, rstack, id_type()) + "_init);\n"; } void m_emit_impl (pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack, int l) { emit_impl (a->architecture_statement_part, str, rstack, 2); // process impls emit_handle (a, str, rstack); // handle for sim emit_constructor(a, str, rstack); // arch constructor } void m_emit_impl (pIIR_PackageBodyDeclaration pb, string &str, RegionStack &rstack, int l) { if (extended_declarations(pb)) emit_decls_init (extended_declarations(pb), str, rstack, l); } void m_emit_impl (pIIR_PackageDeclaration p, string &str, RegionStack &rstack, int l) { if (extended_declarations(p)) emit_decls_init(extended_declarations(p), str, rstack, l); } void emit_generic_map (pIIR_AssociationElement ae, string &str, RegionStack &rstack) { list > formal_acl_list; get_acl(ae->formal, formal_acl_list, rstack, IR_NOT_STATIC, true); string formal_acl_str = formal_acl_list.size() == 0? "NULL" : (sprint_acl(formal_acl_list, "&(tmpacl1->clear()", rstack, id_type(SIGNAL, ARCHREF)) + ")"); str += "tmpml.generic_map(\":" + convert_string(string(ae->formal_declaration->declarator->text.to_chars()), tolower) + "\"," + formal_acl_str + ","; str += "const_pointer("; if (ae->actual != NULL) emit_expr(ae->actual, str, rstack, id_type(READER, DEREF)); else emit_expr(ae->formal_declaration->initial_value, str, rstack, id_type(READER, DEREF)); str += "),&" + qid(get_base_type(ae->formal->subtype), rstack, INFO) + "_INFO"; str += "); "; } void emit_signal_map (pIIR_AssociationElement ae, string &str, RegionStack &rstack) { // Determine mode of formal signal string formal_mode; switch (ae->formal_declaration->mode) { case IR_IN_MODE: formal_mode = "vIN"; break; case IR_OUT_MODE: formal_mode = "vOUT"; break; case IR_INOUT_MODE: formal_mode = "vINOUT"; break; case IR_BUFFER_MODE: formal_mode = "vBUFFER"; break; case IR_LINKAGE_MODE: formal_mode = "vLINKAGE"; break; default: assert(false); }; list > formal_acl_list; get_acl(ae->formal, formal_acl_list, rstack, IR_NOT_STATIC, true); string formal_acl_str = formal_acl_list.size() == 0? "NULL" : (sprint_acl(formal_acl_list, "&(tmpacl1->clear()", rstack, id_type(SIGNAL, ARCHREF)) + ")"); // Store pointer to signal decalration if actual references a // signal. Otherwise set pointer to NULL. pIIR_ObjectDeclaration actual_sig = NULL; if (ae->actual->is(IR_OBJECT_REFERENCE)) { ContextInfo tmp_ctxt; actual_sig = pIIR_ObjectDeclaration(get_context(ae->actual, tmp_ctxt, rstack, false, 0)->declaration); if (!(actual_sig->is(IR_SIGNAL_DECLARATION) || actual_sig->is(IR_SIGNAL_INTERFACE_DECLARATION))) actual_sig = NULL; } string arg_str; if (ae->actual == NULL || ae->actual->is (IR_OPEN_EXPRESSION)) { /* Association with `open'. */ arg_str = formal_acl_str + "," + formal_mode; } else if (actual_sig != NULL) { /* Association with a single signal object. */ arg_str = formal_acl_str + "," + formal_mode + ","; arg_str += qid (actual_sig, rstack, id_type(SIGNAL, ARCHREF)) + ","; // Append acl for actual. If the entire actuak is mapped then // only a NULL pointer is passed over to signal_map. Otherwise, // a termporary will store the corresponding acl sequence. list > actual_acl_list; get_acl (ae->actual, actual_acl_list, rstack, IR_GLOBALLY_STATIC, true); string actual_acl = actual_acl_list.size() == 0? "NULL" : ("&(" + sprint_acl(actual_acl_list, "tmpacl2->clear()", rstack, id_type(SIGNAL, ARCHREF)) + ")"); arg_str += actual_acl; } else { // The formal is associated with an expression arg_str = formal_acl_str + "," + formal_mode + ",const_pointer("; emit_expr (ae->actual, arg_str, rstack, id_type(READER, DEREF)); arg_str += ")," + get_type_info_obj(ae->actual->subtype, rstack, false); } const string formal_name = convert_string(string(ae->formal_declaration->declarator->text.to_chars()), tolower); str += "tmpml.signal_map(\":" + formal_name + "\"," + arg_str + "); "; } // emit component instantiation code void emit_component_instantiation(pIIR_ComponentInstantiationStatement cs, string &str, RegionStack &rstack, int l) { // First, get generic and port clause which is used as interface // definition of the design to be instantiated pIIR_InterfaceList generic_clause, port_clause; if (cs->binding->unit->is(IR_ARCHITECTURE_REF)) { // An architecture is directly instantiated. Hence, get the port // and generic clause of the corresponding entity declaration. pIIR_EntityDeclaration entity_decl = pIIR_ArchitectureRef(cs->binding->unit)->entity; generic_clause = entity_decl->generic_clause; port_clause = entity_decl->port_clause; } else if (cs->binding->unit->is(IR_COMPONENT_DECLARATION)) { // An *component* is instantiated. Hence, get port and generic // clause of the component declaration. generic_clause = pIIR_ComponentDeclaration(cs->binding->unit)->local_generic_clause; port_clause = pIIR_ComponentDeclaration(cs->binding->unit)->local_port_clause; } // Print line and file info last_pos_info = emit_posinfo(cs->pos, str, last_pos_info, l); str += spaces(l) + "tmpml.reset(); "; // Process generic map for (pIIR_AssociationList al = cs->binding->generic_map_list; al; al = al->rest) emit_generic_map (al->first, str, rstack); // Process port map for (pIIR_AssociationList al = cs->binding->port_map_list; al; al = al->rest) emit_signal_map (al->first, str, rstack); string comp_label = "\":" + convert_string(cs->declarator->text.to_chars(), tolower) + "\""; if (cs->binding->unit->is(IR_ARCHITECTURE_REF)) { //**************************************************************************** // Entity/architecture pair shall be instantiated //**************************************************************************** pIIR_ArchitectureRef aref = (pIIR_ArchitectureRef)cs->binding->unit; string library_name = convert_string(aref->entity->library_name->text.to_chars(), tolower); string entity_name = convert_string(aref->entity->declarator->text.to_chars(), tolower); string architecture_name = aref->architecture_name != NULL? convert_string(aref->architecture_name->text.to_chars(), tolower) : ""; str += "kernel.elaborate_architecture(\"" + library_name + "\","; str += "\"" + entity_name + "\",\"" + architecture_name + "\",iname,"; str += comp_label + ",&tmpml,this,level);\n"; } else if (cs->binding->unit->is(IR_CONFIGURATION_DECLARATION)) { //****************************************************************** // Configuration shall be instantiated //****************************************************************** pIIR_ConfigurationDeclaration conf = pIIR_ConfigurationDeclaration (cs->binding->unit); string library_name = "\"" + convert_string (conf->library_name->text.to_chars (), tolower) + "\""; string conf_name = "\"" + convert_string (conf->declarator->text.to_chars (), tolower) + "\""; str += "kernel.elaborate_configuration (" + library_name + ", " + conf_name + ", iname, " + comp_label + ", " + ", &tmpml, this, level);\n"; } else if (cs->binding->unit->is(IR_COMPONENT_DECLARATION)) { //***************************************************************** // Component shall be instantiated //***************************************************************** pIIR_ComponentDeclaration comp_decl = pIIR_ComponentDeclaration(cs->binding->unit); // Currently, only default binding to an entity is supported. // Anything else will be emited anyway, and will fail at compile // or run-time. string default_library; string default_unit; string unit; unit = "\"" + convert_string(comp_decl->declarator->text.to_chars(), tolower) + "\""; if (cs->configuration) { codegen_error.info("%:unit %n (%s)", cs, cs->configuration->unit, cs->configuration->unit->kind_name ()); assert (cs->configuration->unit->is (IR_LIBRARY_UNIT)); pIIR_LibraryUnit unit = pIIR_LibraryUnit (cs->configuration->unit); default_library = "\"" + convert_string (unit->library_name->text.to_chars (), tolower) + "\""; default_unit = "\"" + convert_string (unit->declarator->text.to_chars (), tolower) + "\""; } else default_library = default_unit = "NULL"; str += "kernel.elaborate_component (" + unit + "," + default_library + ", " + default_unit + ", iname, " + comp_label + ", &tmpml, this, level);\n"; } else assert(false); } // Emit code to instantiate concurrent statements (processes, // component instantiations, generate statements, block statements) void emit_concurrent_statement_constructors(pIIR_ConcurrentStatementList cl, string &str, RegionStack &rstack, pIIR_DeclarativeRegion region, int l) { for (pIIR_ConcurrentStatementList s = cl; s != NULL; s = s->rest) { if (s->first->is(IR_PROCESS_STATEMENT)) { // *************************************************************** // Add process // *************************************************************** pIIR_ProcessStatement p = pIIR_ProcessStatement(s->first); // !!! // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); string constructor_pars = "this"; for (pIIR_DeclarationList dl = extended_interface_declarations(p)->rest; dl; dl = dl->rest) { if (!dl->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) continue; pV2CC_InternalObjectDeclaration iobj = pV2CC_InternalObjectDeclaration(dl->first); constructor_pars += "," + string(iobj->declarator->text.to_chars()); } constructor_pars += ",iname.set(\":" + nid(p,BARE) + "\")"; // Add process constructor call str += " kernel.add_process(new " + qid(p, rstack, id_type()) + "(" + constructor_pars + "),\"" + get_long_name(p->declarative_region) + "\",\":" + nid(p,BARE) + "\",this);\n"; } else if (s->first->is(IR_COMPONENT_INSTANTIATION_STATEMENT)) { // *************************************************************** // Add component // *************************************************************** emit_component_instantiation((pIIR_ComponentInstantiationStatement)s->first, str, rstack, 4); } else if (s->first->is(IR_CONCURRENT_GENERATE_FOR_STATEMENT)) { // *************************************************************** // Add for generate statement // *************************************************************** pIIR_ConcurrentGenerateForStatement for_gen = pIIR_ConcurrentGenerateForStatement(s->first); // generate a internal variable for the loop variable, the // start value and the end value string loop_var_name = qid(for_gen->generate_parameter_specification, rstack, id_type (DEFAULT, NO_PREFIX)); string loop_counter_name = loop_var_name + "_lc"; string loop_step_name = loop_var_name + "_st"; string loop_var_type = qid(get_declaration(for_gen->generate_parameter_specification->subtype), rstack, TYPE); // Print line and file info last_pos_info = emit_posinfo(for_gen->pos, str, last_pos_info, 0); // Get iteration range vector range_desc = get_discrete_range (pIIR_ScalarSubtype(for_gen->generate_parameter_specification->subtype)->range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); str += spaces(l) + "iname.set(\":" + convert_string(for_gen->declarator->text.to_chars(), tolower) + "\");\n"; str += spaces(l) + "iname.push(\"\");\n"; if (range_desc[0].is_explicit_range()) { str += spaces (l) + "for (" + loop_var_type + " " + loop_var_name + "=" + range.left + "," + loop_counter_name + "=" + string (range.dir == "to"? "up_range_to_length" : "down_range_to_length") + "<" + loop_var_type + ">(" + range.left + "," + range.right + "); "; str += loop_counter_name + "!=0; "; str += loop_var_name + string (range.dir=="to"? "++" : "--") + "," + loop_counter_name + "--)"; } else { str += "for (" + loop_var_type + " " + loop_var_name + "=" + range.left + "," + loop_step_name + "=" + range.dir + "==to?+1:-1," + loop_counter_name + "=range_to_length<" + loop_var_type + ">(" + range.left + "," + range.dir + "," + range.right + ");"; str += loop_counter_name + "!=0" + "; "; str += loop_var_name + "+=" + loop_step_name + "," + loop_counter_name + "--)"; } str += "{\n"; // Build parameter for constructor call string constructor_pars = "this"; for (pIIR_DeclarationList dl = extended_interface_declarations(for_gen)->rest; dl; dl = dl->rest) { if (!dl->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) continue; pV2CC_InternalObjectDeclaration iobj = pV2CC_InternalObjectDeclaration(dl->first); constructor_pars += "," + string(iobj->declarator->text.to_chars()); } constructor_pars += ",iname.set(" + loop_var_name + "),level"; // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); // Emit constructor call str += spaces(l + 2) + "new " + qid(for_gen, rstack, id_type()) + "(" + constructor_pars + ");\n"; str += spaces(l) + "}\n"; str += spaces(l) + "iname.pop();\n"; } else if (s->first->is(IR_CONCURRENT_GENERATE_IF_STATEMENT)) { // *************************************************************** // Add if generate statement // *************************************************************** pIIR_ConcurrentGenerateIfStatement if_gen = pIIR_ConcurrentGenerateIfStatement(s->first); // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); string constructor_pars = "this"; for (pIIR_DeclarationList dl = extended_interface_declarations(if_gen)->rest; dl; dl = dl->rest) { if (!dl->first->is(V2CC_INTERNAL_OBJECT_DECLARATION)) continue; pV2CC_InternalObjectDeclaration iobj = pV2CC_InternalObjectDeclaration(dl->first); constructor_pars += "," + string(iobj->declarator->text.to_chars()); } constructor_pars += ",iname,level"; // Print line and file info last_pos_info = emit_posinfo(if_gen->condition->pos, str, last_pos_info, 0); str += spaces(l) + "if ("; emit_expr(if_gen->condition, str, rstack, id_type(READER, DEREF)); str += ") {\n"; str += spaces(l + 2) + "iname.set(\":" + convert_string(if_gen->declarator->text.to_chars(), tolower) + "\");\n"; // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); // Emit constructor call str += spaces(l + 2) + "new " + qid(if_gen, rstack, id_type()) + "(" + constructor_pars + ");\n"; str += spaces(l) + "}\n"; } else assert(false); } } // emit architecture constructor code void emit_constructor(pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack) { rstack.push(a->entity); rstack.push(a); pIIR_EntityDeclaration e = a->entity; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, 0); str += "/* Architecture Constructor */\n"; // handle func str += qid (a, rstack, id_type()); str += "::\n"; str += qid (a, rstack, id_type()); str += "(name_stack &iname, map_list *mlist, void *father, int level) :\n "; str += qid (e, rstack, id_type()); str += "(iname, mlist, father) {\n"; str += " iname.push(\":"; emit_noqual_id(a, str, rstack, BARE); str += "\");\n"; str += " iname.push(\"\");\n"; int i=0; if (extended_declarations(a)) // emit code to init object declared within the architecture emit_decls_init (extended_declarations(a), str, rstack, 4); // emit code to create all processes and components directly // instantiated within the architecture body if (a->architecture_statement_part != NULL) emit_concurrent_statement_constructors(a->architecture_statement_part, str, rstack, a, 4); // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); str += spaces(4) + string("iname.pop(); /* pop last declaration from name stack */ ") + string("iname.pop(); /* pop architecture from name stack */\n"); // Print line and file info last_pos_info = emit_posinfo(last_pos_info, str, last_pos_info, 0); str += string("};\n"); rstack.pop(); rstack.pop(); } // emit port signal constructor part void emit_sig_interfacecon (pIIR_SignalInterfaceDeclaration s, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(s->pos, str, last_pos_info, 5); pIIR_TypeDeclaration type_declaration = get_declaration(get_basic_type(s->subtype)); // determine info instance string info_str = get_type_info_obj(s->subtype, rstack, true); // determine mode of the port signal string mode_str; if (s->mode == IR_IN_MODE) mode_str = "vIN"; else if (s->mode == IR_OUT_MODE) mode_str = "vOUT"; else if (s->mode == IR_INOUT_MODE) mode_str = "vINOUT"; else if (s->mode == IR_BUFFER_MODE) mode_str = "vBUFFER"; // If the current signal is declared within a package then the scope // reference pointer from the package is passed over to the sig_info // constructor. Otherwise, the pointer to the current architecture // (or other declarative region) is used. string sref = is_PackageDeclarativeRegion(s->declarative_region)? "sref" : "this"; // Create a new sig_info instance str += spaces(l) + qid(s, rstack, id_type()) + string("=new sig_info<"); str += qid(type_declaration, rstack, TYPE); str += ">(iname,"; str += "\":" + nid(s,BARE) + "\",\"" + get_long_name(s->declarative_region) + "\",mlist," + info_str + "," + mode_str + "," + sref + ");\n"; if (s->initial_value) { str += " " + qid(s, rstack, id_type()) + "->init(" ; emit_expr (s->initial_value, str, rstack, DEFAULT); str += ");\n"; } } // emit port signal constructor part void emit_generic_interfacecon (pIIR_ConstantInterfaceDeclaration g, string &str, RegionStack &rstack, int l) { // determine info instance string info_str = get_type_info_obj(get_basic_type(g->subtype), rstack, true); // Print line and file info last_pos_info = emit_posinfo(g->pos, str, last_pos_info, 5); string default_value_p_str = "NULL"; if (g->initial_value != NULL) { default_value_p_str = "const_pointer("; emit_expr (g->initial_value, default_value_p_str, rstack, id_type(READER, DEREF)); default_value_p_str += ")"; } str += spaces(l) + "kernel.init_generic(&" + qid(g, rstack, id_type()) + "," + info_str + ","; str += "iname,"; str += "\":" + nid(g,BARE) + "\",\"" + get_long_name(g->declarative_region) + "\",mlist," + default_value_p_str + ",this);\n"; } void m_emit_impl (pIIR_ConcurrentStatementList s, string &str, RegionStack &rstack, int l) { while (s) { str += spaces(l); emit_impl (s->first, str, rstack, l); s = s->rest; } } void m_emit_impl (pIIR_ProcessStatement p, string &str, RegionStack &rstack, int l) { rstack.push(p); ContextInfo &ctxt = *ActiveContext(rstack); // Create a list of declarative region pointers beginning from the // target region up to the root region list RegionList = create_region_list(p); RegionList.pop_front(); // For each generate region as well as the enclosing architecture // region a corresponding pointer is declared and added as a // parameter to the constructor. string constructor_pars, separator; for (list::iterator iter = RegionList.begin(); iter != RegionList.end(); iter++) if ((*iter)->is(IR_ARCHITECTURE_DECLARATION) || (*iter)->is(IR_CONCURRENT_GENERATE_STATEMENT) || (*iter)->is(IR_BLOCK_STATEMENT)) { constructor_pars += separator + qid(*iter, rstack, id_type()) + " *" + qid(*iter, rstack, id_type()) + "_AP_PAR"; insert_internal_object_declaration(get_last_rest_address(&extended_interface_declarations(p)), p, p->pos, qid(*iter, rstack, id_type()) + "_AP", qid(*iter, rstack, id_type()) + "*", "=" + qid(*iter, rstack, id_type()) + "_AP_PAR", DECLARE_LOCALLY); separator = ","; } // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); // ****************************************************************** // append prolog // ****************************************************************** str += "/* Implementation of process " + get_long_name(p) + " methods */\n" + qid(p, rstack, id_type()) + "::\n" + qid(p, rstack, id_type()) + "(" + constructor_pars + ",name_stack &iname) : process_base(iname) {\n"; // Emit code to initialize some interal process members if (extended_interface_declarations(p)!= NULL) emit_decls_init(extended_interface_declarations(p), str, rstack, 4); // ****************************************************************** // map signals which are read within the process // ****************************************************************** string reader_code_str, implicit_sig_reader_code_str; list sig_read = filter_unique(ctxt.accessed_objects, READ, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (list::iterator i = sig_read.begin(); i != sig_read.end(); i++) if ((*i).declaration->is(V2CC_IMPLICIT_SIGNAL_DECLARATION)) implicit_sig_reader_code_str += " " + qid((*i).declaration, rstack, READER) + "=&" + qid((*i).declaration, rstack, id_type(SIGNAL, ARCHREF)) + "->reader();\n"; else reader_code_str += " " + qid((*i).declaration, rstack, READER) + "=&" + qid((*i).declaration, rstack, id_type(SIGNAL, ARCHREF)) + "->reader();\n"; // ****************************************************************** // map sig_info pointer for signals which are prefix of a signal // function kind attribute. // ****************************************************************** string sig_info_code_str; list sig_attr = filter_unique(ctxt.accessed_objects, SIGNAL_FUNCTION_ATTRIBUTE, tree_kind_list(IR_SIGNAL_DECLARATION,IR_SIGNAL_INTERFACE_DECLARATION)); for (list::iterator i = sig_attr.begin(); i != sig_attr.end(); i++) sig_info_code_str += " " + qid((*i).declaration, rstack, DEFAULT) + "=" + qid((*i).declaration, rstack, id_type(SIGNAL, ARCHREF)) + ";\n"; // ****************************************************************** // create the driver for the signals that are written by the process. // ****************************************************************** // First extract written signals from ctxt.accessed_objects list. list written_signals = filter(ctxt.accessed_objects, WRITE, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); string driver_code_str; while (written_signals.size()) { set acls_for_signal; // get first signal in written_signal list and remove it from the // list AccessDescriptor current_signal = written_signals.front(); written_signals.erase(written_signals.begin()); while (true) { // get acl for the signal target expression and convert it into a // string. Append the string to the other acl strings for that // signal. list > acl_list; if (current_signal.access_expr != NULL) { get_acl(current_signal.access_expr, acl_list, rstack, IR_GLOBALLY_STATIC, true); acls_for_signal.insert(sprint_acl(acl_list, "tmpacl->clear()", rstack, id_type(SIGNAL, ARCHREF))); } else acls_for_signal.insert(""); // search for the next assignment to the same signal list::iterator iter = written_signals.begin(); for (; iter != written_signals.end(); iter++) if ((*iter).declaration == current_signal.declaration) break; // exit loop if no more assignment to the same signal were // found. Otherwise, copy found signal to current_sig and remove // the corresponding entry from written_signals. if (iter == written_signals.end()) break; current_signal = (*iter); written_signals.erase(iter); } // acls_for_signal contains all different acl values which were // created from the signal target expressions (wihtin a process) // for a specific signal. Now, build the driver creation code. string start_str = " " + qid(current_signal.declaration, rstack, DRIVER) + string("=kernel.get_driver(this,") + qid(current_signal.declaration, rstack, id_type(SIGNAL, ARCHREF)); string next_start_str = " " + string("kernel.get_driver(") + qid(current_signal.declaration, rstack, DRIVER) + ",this"; for (set::iterator aiter = acls_for_signal.begin(); aiter != acls_for_signal.end(); aiter++) { driver_code_str += start_str; if ((*aiter) != "") // add acl driver_code_str += ",&(" + (*aiter) + ")"; driver_code_str += string(");\n"); start_str = next_start_str; } } // ****************************************************************** // create the wait_info objects // ****************************************************************** string wait_info_code_str; int windex = 0; for (list::iterator witer = ctxt.wait_statements.begin(); witer != ctxt.wait_statements.end(); witer++) { if (! (*witer)->is (IR_WAIT_STATEMENT)) continue; pIIR_WaitStatement ws = pIIR_WaitStatement (*witer); // collect all signals the wait statement is sensitive on ContextInfo wctxt; get_context(ws, wctxt, rstack, false, 0); // Analyze each signal which was referenced in the corresponding // wait expression list sal_add_arg_list; string codestr; int length = 0; for (access_list::iterator iter = wctxt.accessed_objects.begin(); iter != wctxt.accessed_objects.end(); iter++) { if (!((*iter).access_type & SENSITIVE)) continue; list > acl_list; // convert each signal expression into an acl list get_acl((*iter).access_expr, acl_list, rstack, IR_GLOBALLY_STATIC, true); string sal_add_arg = qid((*iter).declaration, rstack, id_type(SIGNAL, ARCHREF)); if (acl_list.size()) sal_add_arg += ",&(" + sprint_acl(acl_list, "tmpacl->clear()", rstack, id_type(SIGNAL, ARCHREF)) + ")"; // if the current signal (including acl) already has been // added to the sal list then do nothing if (find(sal_add_arg_list.begin(), sal_add_arg_list.end(), sal_add_arg) != sal_add_arg_list.end()) continue; // add argument string (sal_add_arg) to list in order to // remove dublicate calls sal_add_arg_list.push_back(sal_add_arg); codestr += string(" sal.add(") + sal_add_arg + ");\n"; length++; } // If the wait statment has an timeout clause then make it // sensitiv to a implicit signal associated with the current // process. This implicit signal is used to implement the wait // for condition. if (ws->timeout_clause != NULL) { // Determine declaration of implicit signal. Becuases there is // only a signle implicit signal for each process which uses a // timeout clause simply access the first element of the list // returned from filter_unique. pV2CC_ImplicitSignalDeclaration_WaitFor implicit_signal_decl = pV2CC_ImplicitSignalDeclaration_WaitFor(filter_unique(extended_declarations(p), V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR).front()); codestr += string(" sal.add(") + qid(implicit_signal_decl, rstack, id_type(SIGNAL, ARCHREF)) + ");\n"; // Increment length as the implicit wait for signal is also // added to the sensitivity list! length++; } // prolog wait_info_code_str += string(" {\n") + string(" sigacl_list sal(") + to_string (length) + string(");\n"); // add code wait_info_code_str += codestr; // epilog wait_info_index(ws) = windex++; wait_info_code_str += string(" winfo[") + to_string (wait_info_index (ws)) + string("]=kernel.setup_wait_info(sal,this);\n") + string(" }\n"); } // Next, check out whether the process calls procedures that // contain at least one wait statement. First, get get all // procedure that are called from this process. For each bool calls_delayed_procedures = false; for (list::iterator witer = ctxt.wait_statements.begin(); witer != ctxt.wait_statements.end(); witer++) { if (! (*witer)->is (IR_PROCEDURE_CALL_STATEMENT)) continue; pIIR_ProcedureCallStatement pc = pIIR_ProcedureCallStatement (*witer); wait_info_index(pc) = windex++; wait_info_code_str += string(" winfo[") + to_string (wait_info_index (pc)) + string("]=(winfo_item*)NULL;\n"); calls_delayed_procedures = true; } // If the procedure calls other procedures that contain wait // statements then create an internal pointer variable that will be // used to store pointers to the corresponding procedure class // instances. if (calls_delayed_procedures) insert_internal_object_declaration(get_last_rest_address(&extended_declarations(p)), p, p->pos, "pdelayed_procedure", "delayed_procedure_base*", "", DECLARE_LOCALLY); // ****************************************************************** // append epilog code // ****************************************************************** string code_str; // Print line and file info last_pos_info = emit_posinfo(p->pos, code_str, NULL, l); code_str += string("bool ") + qid(p, rstack, id_type()) + string("::execute() {\n"); emit_process_body (p, code_str, rstack, l+2); // SeqStatList // Print line and file info last_pos_info = emit_posinfo(p->pos, code_str, last_pos_info, l); code_str += "}\n\n"; // Add code to setup singal info pointers and signal readers str += sig_info_code_str; str += reader_code_str; // ***************************************************************************** // init variables and constants. Note that the process code is // emitted first as due to the operations some internal variables // may be generated which must be initialized now!!!! // ***************************************************************************** if (extended_declarations(p)) // Emit declarations emit_decls_init(extended_declarations(p), str, rstack, 4); // Add code to setup implicit signal reader, driver and wait info objects. str += implicit_sig_reader_code_str; str += driver_code_str; str += wait_info_code_str; str += "}\n"; // Now, append process code! str += code_str; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); // Remove context from context stack rstack.pop(); } void emit_process_body (pIIR_ProcessStatement p, string &str, RegionStack &rstack, int l) { pIIR_SequentialStatementList sl = p->process_statement_part; ContextInfo &ctxt = *ActiveContext(rstack); if (ctxt.wait_statements.size() && ! p->is(IR_SENSITIZED_PROCESS_STATEMENT) && ! p->is(IR_IMPLICIT_PROCESS_STATEMENT)) { str += " switch (jmp) {\n"; // create jump tbl for(unsigned int i=1 ; i <= ctxt.wait_statements.size(); i++) str += " case " + to_string(i) + ": goto lab" + to_string(i) + ";\n"; str += " };\n\n lab0:\n"; } // emit sequential statements if (sl != NULL) emit_impl(sl, str, rstack, l); // the last statement of a process loops back to the beginning if (ctxt.wait_statements.size() && ! p->is(IR_SENSITIZED_PROCESS_STATEMENT) && ! p->is(IR_IMPLICIT_PROCESS_STATEMENT)) { // Print line and file info last_pos_info = emit_posinfo(p->pos, str, last_pos_info, l); str += spaces(l) + " goto lab0;\n"; } else { // Else add return value to process code in order to prevent // warnings emitted by the c++ compiler. str += spaces(l) + "return true;\n"; } } // Print subprogram implementation void emit_plain_subprogram_impl (pIIR_SubprogramDeclaration sbp, string &str, RegionStack &rstack, int l) { // emit_subprogram_prototype is defined in v2cc-decl.cc extern string emit_subprogram_prototype(pIIR_SubprogramDeclaration, RegionStack &k, bool, int); // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += "/* Implementation of subprogram " + get_long_name(sbp) + " */\n"; string return_type_str; string copy_back_code = spaces(4) + "rlabel:\n", parameter_setup_code; string separator = ""; // Emit subprogram prototype str += emit_subprogram_prototype(sbp, rstack, true, 0); // Check whether sbp is a function or a procedure bool is_function = sbp->is(IR_FUNCTION_DECLARATION); // **************************************************************************** // Analyze normal subprogram parameter // **************************************************************************** for (pIIR_DeclarationList il = extended_interface_declarations(sbp); il; il = il->rest) { if (!il->first->is(IR_INTERFACE_DECLARATION)) continue; pIIR_InterfaceDeclaration par = pIIR_InterfaceDeclaration(il->first); // Determine whether the parameter must be copied back bool copy_back = (is_scalar_type(par->subtype) || is_constrained_array_type (get_basic_type (par->subtype))) && (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter must be copied in bool copy_in = copy_back && (par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter can be used directly used or a // temporary must be created. It cannot be used directly if the // parameter value must be copied back or the parameter type is a // constrained array type. bool direct_use = il->first->is(IR_SIGNAL_INTERFACE_DECLARATION) || !(copy_back || is_constrained_array_type(par->subtype)); // If the paramter is not used directly create another variable // which is actually used within the subprogram body if (!direct_use) { // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, parameter_setup_code, last_pos_info, l); string par_name = qid(par, rstack, DEFAULT) + "_PAR"; // If the parameter is passed back by copy then add the // corresponding code if (copy_back) copy_back_code += spaces(4) + par_name + "=" + qid(par, rstack, DEFAULT) + ";\n"; // Check type of parameter. If it is an implicit array subtype // then append code to setup the array_info instance of the // parameter if (is_implicit_array_subtype(par->subtype)) { string info_str = get_type_info_obj(par->subtype, rstack, false); parameter_setup_code += spaces(4) + qid(get_declaration(par->subtype), rstack, id_type(TYPE | ALIAS, DEFAULT)) + " " + qid(par, rstack, DEFAULT) + "(" + info_str + "," + par_name + ".data)"; parameter_setup_code += ";\n"; } else if (is_constrained_array_type (par->subtype)) { string info_str = get_type_info_obj(par->subtype, rstack, false); parameter_setup_code += spaces(4) + qid(get_declaration(par->subtype), rstack, id_type(TYPE, DEFAULT)) + " " + qid(par, rstack, DEFAULT) + "(" + info_str + ",(" + qid(par->subtype, rstack, id_type(TYPE)) + "::E_type*)" + par_name + ".data)"; parameter_setup_code += ";\n"; } else { parameter_setup_code += spaces(4) + qid(get_declaration(par->subtype), rstack, TYPE) + " " + qid(par, rstack, DEFAULT); // If the parameter is passed in by copy then add the // corresponding code if (copy_in) parameter_setup_code += "=" + par_name + ";\n"; else parameter_setup_code += ";\n"; } } // Set separator for next parameter separator = ","; } // ******************************************************** // The subprogram body starts here! // ******************************************************** str += "\n{\n"; // Add parameter setup code str += parameter_setup_code; // Emit any internal declarations required by the subprogram // parameters if (extended_interface_declarations(sbp) != NULL) emit_decls_init(extended_interface_declarations(sbp), str, rstack, 4); // emit sequential statements string body_code; emit_impl(sbp->subprogram_body, body_code, rstack, 4); if (extended_declarations(sbp) != NULL) { string decl_init_str, decl_str; // Emit initialization code of local declarations emit_decls_init(extended_declarations(sbp), decl_init_str, rstack, 4); // Emit local declarations of the subprogram emit_decls(extended_declarations(sbp), decl_str, rstack, 4); str += decl_str + decl_init_str; } // Now, append subprogram body code. Note that the subprogram body // is emitted first before the declarations are printed. str += body_code; // If subprogram is not a function then add copy back code and // return subprogram. The copy back code is executed when the // subprogram returns. if (!is_function) str += copy_back_code; if (!is_function) str += spaces(4) + "return;\n"; str += "}\n"; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); } // Print subprogram implementation void emit_delayed_subprogram_impl (pIIR_ProcedureDeclaration sbp, string &str, RegionStack &rstack, int l) { // emit_subprogram_prototype is defined in v2cc-decl.cc string emit_delayed_procedure_constructor (pIIR_ProcedureDeclaration, RegionStack &, bool, int); // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); const string separator = ",\n" + spaces(l + 2); str += "/* Class impl. for subprogram " + get_long_name(sbp) + " (contains waits) */\n"; // Emit subprogram prototype string constructor_str, constructor_init_str, copy_back_code_str; constructor_str += " /* Class constructor for subprogram " + get_long_name(sbp) + " */\n"; constructor_str += qid(sbp, rstack, DEFAULT) + "::" + emit_delayed_procedure_constructor (sbp, rstack, true, 0) + " :\n" + spaces (l + 2) + "delayed_procedure_base (process_PAR)"; // **************************************************************************** // Analyze normal subprogram parameter // **************************************************************************** for (pIIR_DeclarationList il = extended_interface_declarations(sbp); il; il = il->rest) { if (!il->first->is(IR_INTERFACE_DECLARATION)) continue; pIIR_InterfaceDeclaration par = pIIR_InterfaceDeclaration(il->first); // The parameter is passed in by reference if it is a non scalar // type or if the parameter is of mode OUT, INOUT or BUFFER. bool call_by_reference = !is_scalar_type(par->subtype) || par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE; // Determine whether the parameter must be copied back bool copy_back = (is_scalar_type(par->subtype) || is_constrained_array_type (par->subtype)) && (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter must be copied in bool copy_in = copy_back && (par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE); // Determine whether the parameter can be used directly or an // temporary must be created. It cannot be used directly if the // parameter value must be copied back or the parameter type is a // constrained array type. bool direct_use = !(copy_back || is_constrained_array_type (get_basic_type (par->subtype))); if (par->is(IR_VARIABLE_INTERFACE_DECLARATION)) { constructor_str += separator + qid(par, rstack, DEFAULT) + string (copy_back ? "_REF" : "") + "(" + qid(par, rstack, DEFAULT) + "_PAR)"; if (copy_back) { // If the parameter is passed over via copy back, there are // actually two local variables required. One variable which // is used to store a reference to the original parameter // (ends with _REF; it is used to copy back the value if // the subprogram returns) and another variable which is // used by the procedure body to read/write this parameter. if (is_constrained_array_type (get_basic_type (par->subtype))) { string info_str = get_type_info_obj(par->subtype, rstack, false); constructor_init_str += spaces(l + 2) + qid(par, rstack, DEFAULT) + ".init(" + info_str + ",const_pointer(" + qid(par, rstack, DEFAULT) + "_PAR))"; constructor_init_str += ";\n"; } else { constructor_init_str += spaces (l + 2) + qid(par, rstack, DEFAULT) + "=" + qid(par, rstack, DEFAULT) + "_PAR;\n"; } copy_back_code_str += spaces (l + 2) + qid(par, rstack, DEFAULT) + "_REF" + "=" + qid(par, rstack, DEFAULT) + ";\n"; } } else if (par->is(IR_CONSTANT_INTERFACE_DECLARATION)) { constructor_str += separator + qid(par, rstack, DEFAULT) + "(" + qid(par, rstack, DEFAULT) + "_PAR)"; } else if (par->is(IR_FILE_INTERFACE_DECLARATION)) { constructor_str += separator + qid(par, rstack, DEFAULT) + "(" + qid(par, rstack, DEFAULT) + "_PAR)"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // Signal values are NOT copied back! Instead, any operations // are directly applied on the corresponding reader/driver... copy_back = false; direct_use = true; // First, append sig_info pointer constructor_str += separator + qid(par, rstack, SIGNAL) + "(" + qid(par, rstack, SIGNAL) + "_PAR)"; // Next, append reader if signal is of mode in or inout or buffer if (par->mode == IR_IN_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { constructor_str += separator + qid(par, rstack, READER) + "(" + qid(par, rstack, READER) + "_PAR)"; } // Finally, append driver if mode is of out or inout or buffer if (par->mode == IR_OUT_MODE || par->mode == IR_INOUT_MODE || par->mode == IR_BUFFER_MODE) { constructor_str += separator + qid(par, rstack, DRIVER) + "(" + qid(par, rstack, DRIVER) + "_PAR)"; } } } // **************************************************************************** // Analyze extra subprogram parameter // **************************************************************************** list &extra_parameter = context(sbp).extra_interface_objects; for (list::iterator iter = extra_parameter.begin(); iter != extra_parameter.end(); iter++) { pIIR_Declaration par = (*iter).declaration; if (par->is(IR_VARIABLE_INTERFACE_DECLARATION) || par->is(IR_VARIABLE_DECLARATION) || par->is(IR_CONSTANT_INTERFACE_DECLARATION) || par->is(IR_CONSTANT_DECLARATION) || par->is(IR_FILE_DECLARATION) || par->is(IR_FILE_INTERFACE_DECLARATION)) { constructor_str += separator + qid(par, rstack, DEFAULT) + "(" + qid(par, rstack, DEFAULT) + "_PAR)"; } else if (par->is(IR_SIGNAL_INTERFACE_DECLARATION) || par->is(IR_SIGNAL_DECLARATION)) { pIIR_ObjectDeclaration opar = pIIR_ObjectDeclaration(par); AccessFlags &aflags = (*iter).access_type; // Add sig_info pointer if a signal function kind attribute has // been applied on the parameter if ((aflags & SIGNAL_FUNCTION_ATTRIBUTE) || (aflags & SENSITIVE)) { constructor_str += separator + qid(par, rstack, SIGNAL) + "(" + qid(par, rstack, SIGNAL) + "_PAR)"; } // Next, append reader if signal is read if (aflags & READ) { constructor_str += separator + qid(par, rstack, READER) + "(" + qid(par, rstack, READER) + "_PAR)"; } // Finally, append driver if signal is written if (aflags & WRITE) { constructor_str += separator + qid(par, rstack, DRIVER) + "(" + qid(par, rstack, DRIVER)+ "_PAR)"; } } else if (par->is(IR_TYPE_DECLARATION) || par->is(IR_SUBTYPE_DECLARATION)) { // A type has been used and we need to pass over the type info // pointer of that type! constructor_str += separator + qid(par, rstack, INFO) + "_INFO(" + qid(par, rstack, INFO) + "_INFO_PAR)"; } } // ****************************************************************** // create the wait_info objects // ****************************************************************** ContextInfo &ctxt = *ActiveContext(rstack); string wait_info_code_str; int windex = 0; for (list::iterator witer = ctxt.wait_statements.begin(); witer != ctxt.wait_statements.end(); witer++) { if (! (*witer)->is (IR_WAIT_STATEMENT)) continue; pIIR_WaitStatement ws = pIIR_WaitStatement (*witer); // collect all signals the wait statement is sensitive on ContextInfo wctxt; get_context(ws, wctxt, rstack, false, 0); // Analyze each signal which was referenced in the corresponding // wait expression list sal_add_arg_list; string codestr; int length = 0; for (access_list::iterator iter = wctxt.accessed_objects.begin(); iter != wctxt.accessed_objects.end(); iter++) { if (!((*iter).access_type & SENSITIVE)) continue; list > acl_list; // convert each signal expression into an acl list get_acl((*iter).access_expr, acl_list, rstack, IR_GLOBALLY_STATIC, true); string sal_add_arg = qid((*iter).declaration, rstack, id_type(SIGNAL, ARCHREF)); if (acl_list.size()) sal_add_arg += ",&(" + sprint_acl(acl_list, "tmpacl->clear()", rstack, id_type(SIGNAL, ARCHREF)) + ")"; // if the current signal (including acl) already has been // added to the sal list then do nothing if (find(sal_add_arg_list.begin(), sal_add_arg_list.end(), sal_add_arg) != sal_add_arg_list.end()) continue; // add argument string (sal_add_arg) to list in order to // remove dublicate calls sal_add_arg_list.push_back(sal_add_arg); codestr += string(" sal.add(") + sal_add_arg + ");\n"; length++; } // If the wait statment has an timeout clause then make it // sensitiv to a implicit signal associated with the current // process. This implicit signal is used to implement the wait // for condition. if (ws->timeout_clause != NULL) { // Determine declaration of implicit signal. Because there is // only a single implicit signal for each process which uses a // timeout clause, simply access the first element of the list // returned from filter_unique. list implicit_signal_access_list = filter_unique(ctxt.extra_interface_objects, ACCESS, V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR); assert (implicit_signal_access_list.size () >= 1); pV2CC_ImplicitSignalDeclaration_WaitFor implicit_signal_decl = pV2CC_ImplicitSignalDeclaration_WaitFor (implicit_signal_access_list.front ().declaration); assert (implicit_signal_decl != NULL); codestr += string(" sal.add(") + qid (implicit_signal_decl, rstack, id_type (SIGNAL, ARCHREF)) + ");\n"; // Increment length as the implicit wait for signal is also // added to the sensitivity list! length++; } // prolog wait_info_code_str += string(" {\n") + string(" sigacl_list sal(") + to_string (length) + string(");\n"); // add code wait_info_code_str += codestr; // epilog wait_info_index(ws) = windex++; wait_info_code_str += string(" winfo[") + to_string (wait_info_index (ws)) + string("]=kernel.setup_wait_info(sal,process);\n") + string(" }\n"); } // Next, check out whether the process calls procedures that // contain at least one wait statement. First, get get all // procedure that are called from this process. bool calls_delayed_procedures = false; for (list::iterator witer = ctxt.wait_statements.begin(); witer != ctxt.wait_statements.end(); witer++) { if (! (*witer)->is (IR_PROCEDURE_CALL_STATEMENT)) continue; pIIR_ProcedureCallStatement pc = pIIR_ProcedureCallStatement (*witer); wait_info_index(pc) = windex++; wait_info_code_str += string(" winfo[") + to_string (wait_info_index (pc)) + string("]=(winfo_item*)NULL;\n"); calls_delayed_procedures = true; } // If the procedure calls other procedures that contain wait // statements then create an internal pointer variable that will be // used to store pointers to the corresponding procedure class // instances. if (calls_delayed_procedures) insert_internal_object_declaration(get_last_rest_address(&extended_declarations(sbp)), sbp, sbp->pos, "pdelayed_procedure", "delayed_procedure_base*", "", DECLARE_LOCALLY); // ****************************************************************** // Build constructor code // ****************************************************************** constructor_str += spaces (l) + string ("\n{\n") + spaces (l + 2) + "winfo=(winfo_item*)winfo_PAR;\n" + spaces (l + 2) + "if (winfo == NULL) {\n" + spaces (l + 2) + " winfo=new winfo_item[" + to_string (windex) + "];\n" + wait_info_code_str + spaces (l + 2) + " winfo_PAR=winfo;\n" + spaces (l + 2) + "}\n" + constructor_init_str + spaces (l) + "}\n"; str += constructor_str; str += " /* Class destructor for subprogram " + get_long_name(sbp) + " */\n"; str += spaces(l) + qid(sbp, rstack, DEFAULT) + "::~" + qid(sbp, rstack, DEFAULT) + "()\n" + spaces (l) + "{\n" + copy_back_code_str + spaces (l) + "}\n"; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); string code_str; code_str += " /* Execute method for subprogram " + get_long_name(sbp) + " */\n"; code_str += spaces(l) + "bool " + qid(sbp, rstack, DEFAULT) + "::execute()\n"; code_str += spaces(l) + "{\n"; code_str += spaces(l) + " switch (jmp) {\n"; for(unsigned int i = 1; i <= ctxt.wait_statements.size(); i++) code_str += " case " + to_string(i) + ": goto lab" + to_string(i) + ";\n"; code_str += spaces(l) + " };\n\n lab0:\n"; // emit sequential statements pIIR_SequentialStatementList sl = sbp->subprogram_body; if (sl != NULL) emit_impl(sl, code_str, rstack, l + 2); // Print line and file info last_pos_info = emit_posinfo(sbp->pos, code_str, last_pos_info, l); code_str += spaces(l) + " rlabel: return false;\n"; code_str += spaces(l) + "}\n"; str += code_str; } // Print subprogram implementation void m_emit_impl (pIIR_SubprogramDeclaration sbp, string &str, RegionStack &rstack, int l) { // If no subprogram body is defined then do nothing! if (sbp->subprogram_body == NULL) return; rstack.push(sbp); // Procedures that includes wait statements (or call procedure that // contain waits) must be handled different from plain subprograms. if (sbp->is (IR_PROCEDURE_DECLARATION) && (has_wait (pIIR_ProcedureDeclaration (sbp)) || has_wait_for (pIIR_ProcedureDeclaration (sbp)))) { emit_delayed_subprogram_impl (pIIR_ProcedureDeclaration (sbp), str, rstack, l); } else { emit_plain_subprogram_impl (sbp, str, rstack, l); } rstack.pop(); } // Print subprogram implementation void m_emit_impl (pIIR_PredefinedFunctionDeclaration sbp, string &str, RegionStack &rstack, int l) { // Nothing to do. } // Print subprogram implementation void m_emit_impl (pIIR_PredefinedProcedureDeclaration sbp, string &str, RegionStack &rstack, int l) { // Nothing to do. } void // SeqStatList impl m_emit_impl (pIIR_SequentialStatementList sl, string &str, RegionStack &rstack, int l) { while (sl) { pIIR_SequentialStatement s = sl->first; //if (s->label) //{ // emit_id (s->label->declarator, str, rstack); // str += ": "; //} emit_impl (s, str, rstack, l); sl = sl->rest; } } void m_emit_impl (pIIR_NullStatement, string &str, RegionStack &rstack, int l) { str += "/* NullStat impl */;\n"; } void m_emit_impl (pIIR_ReturnStatement r, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(r->pos, str, last_pos_info, l); if (r->return_expression != NULL) { // Ok, this return statement belongs to a function pIIR_FunctionDeclaration func = pIIR_FunctionDeclaration(r->enclosing_subprogram); string return_expr; emit_expr (r->return_expression, return_expr, rstack, DEFAULT); if (is_array_type(func->return_type)) // Return value is an array if (is_constrained_array_type(func->return_type)) { string alias_expr = "array_alias<" + qid(get_declaration(get_base_type(func->return_type)), rstack, id_type()) + " >(" + get_type_info_obj(func->return_type, rstack, false); return_expr = alias_expr + ",(" + return_expr + ").data)"; } else { string alias_expr = "array_alias<" + qid(get_declaration(get_base_type(func->return_type)), rstack, id_type()) + " >(" + get_type_info_obj(func->return_type, rstack, false); return_expr = alias_expr + "," + return_expr + ")"; } str += spaces(l) + "return " + return_expr + ";\n"; } else // Ok, this return statement belongs to a procedure str += spaces(l) + "goto rlabel;\n"; } void m_emit_impl (pIIR_VariableAssignmentStatement a, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(a->pos, str, last_pos_info, l); str += spaces(l); emit_expr (a->target, str, rstack, id_type(READER, DEREF)); str += "="; emit_expr (a->expression, str, rstack, id_type(READER, DEREF)); str += ";\n"; } void m_emit_impl (pIIR_IfStatement is, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(is->pos, str, last_pos_info, l); str += spaces(l) + "if("; emit_expr (is->condition, str, rstack, DEFAULT); str += ") {\n"; if (is->then_sequence != NULL) emit_impl (is->then_sequence, str, rstack, l+2); if (is->else_sequence != NULL) { str += spaces(l) + "} else {\n"; emit_impl (is->else_sequence, str, rstack, l+2); } str += spaces(l) + "}\n"; } // Emit code for a case statement where the selection expression is // scalar void emit_impl_scalar_case_statement (pIIR_CaseStatement cs, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(cs->pos, str, last_pos_info, l); str += spaces(l) + "switch("; emit_expr (cs->expression, str, rstack, id_type(READER, DEREF)); str += ") {\n"; for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest) { pIIR_CaseStatementAlternative a = al->first; string case_str = spaces(l); for (pIIR_ChoiceList cl = a->choices; cl; cl = cl->rest) if (cl->first->is(IR_CHOICE_BY_RANGE)) { //*************************************** // Choice by range //*************************************** pIIR_ChoiceByRange cbr = pIIR_ChoiceByRange(cl->first); // Get range. vector range_desc = get_discrete_range(cbr->range, rstack, IR_LOCALLY_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (range.left == range.right) case_str += "case " + to_string(range.left) + ": "; else if (range.left < range.right && range.dir == IR_DIRECTION_UP) case_str += "case " + to_string(range.left) + " ... " + to_string(range.right) + ": "; else if (range.left > range.right && range.dir != IR_DIRECTION_UP) case_str += "case " + to_string(range.right) + " ... " + to_string(range.left) + ": "; } else if (cl->first->is(IR_CHOICE_BY_EXPRESSION)) { //*************************************** // Choice by expression //*************************************** pIIR_ChoiceByExpression cbe = pIIR_ChoiceByExpression(cl->first); int value = int(folded_value(cbe->value).long_value()); case_str += "case " + to_string(value) + ": "; } else if (cl->first->is(IR_CHOICE_BY_OTHERS)) { //*************************************** // Choice by others //*************************************** case_str += "default: "; } str += case_str + "{\n"; if (a->sequence_of_statements != NULL) // Analyze sequential statements associated with alternative emit_impl(a->sequence_of_statements, str, rstack, l + 2); str += spaces(l + 1) + "} break;\n"; } str += spaces(l) + "}\n"; } template struct bitwise_and : public binary_function { bool operator()(const T& x, const T& y) const { return x & y; } }; template struct bitwise_or : public binary_function { bool operator()(const T& x, const T& y) const { return x | y; } }; template struct bitwise_xor : public binary_function { bool operator()(const T& x, const T& y) const { return x ^ y; } }; inline unsigned int rotate_left(unsigned int value, int count) { return (value << count) | (value >> (sizeof(unsigned int) * 8 - count)); } // Count bit set in value. The algorithm is not very smart... inline int bit_count(unsigned int value) { int result = 0; while (value) { if (value & 0x1) result++; value >>= 1; } return result; } // Find an bit shift width for pattern "bits" so that after shifting // most of the bits set in "bits" are also set in free_bits. int find_best_shift(unsigned int free_bits, int bits) { const int max_shift = sizeof(int) * 8 - 1; int best_shift = -1, best_result = -1; for (int i = 0; i < max_shift; i++) { int result = bit_count(free_bits & rotate_left((unsigned int)bits, i)); if (result > best_result) { best_result = result; best_shift = i; } } return best_shift; } // Emit code for a case statement where the selection expression is // an one dimensional array void emit_impl_array_case_statement (pIIR_CaseStatement cs, string &str, RegionStack &rstack, int l) { // We generate hash numbers from each selection expression to // speedup the slection process. A case statement like: // case var is // when "000" => ... // when "001" => ... // when others => ... // end case; // is translated to (the hash numbers are chosen arbitrarily): // enumeration int1_lit[] = { 0, 0, 0 }; // enumeration int2_lit[] = { 0, 0, 1 }; // unsigned int int3_keys[] = { 12, 34 }; /* two hash numbers */ // unsigned int int4_key_to_lit[] = { 0, 2 }; // enumeration *int5_lit_tab[] = { int1_lit, 0, int2_lit, 0}; // int int6_action[] = { 0, -1, 1 , -1}; // memcpy(int7_selection, slection_expression.data, 3); // switch (do_case_select(3, 2, int7_selesction[0]^rot_left(int7_selection[1], 1), // int7_selection, int3_keys, int4_key_to_lit, int5_lit_tab, // int6_action)) { // case 0: ... // case 1: ... // default: ... // } // int1_lit and int2_lit are literal values translated into // enumeration array constant. int3_keys stores for each literal the // corresponding hash number while int4_key_to_lit is an index table // which points to the corresponding entry in int5_lit_tab. E.g., if // hash number 34 is calculated from the selection expression then // the *second* element of the key tables matches. Hence, we select // the *second* element of the int4_key_to_lit table which gives us // index number 1. This index is used to address the lit_tab table // which holds pointers to the corresponding array literal // constant(s). We need this constants to re-check whether the // selection expression really matches the array literal. Note that // more than one choice pattern my have the same hash value. Hence, // we compare all literal constants until the number 0 is reached in // the int5_lit_tab table. When we have a match (or a 0 is reached) // then the *corresponding* entry in the action table (int6_action) // is chosen as action number. This action number is finally used in // the case statement to select the appropriate alternative. Note // that do_case_select is an inlined function which performs most of // the described processing. // Note further that the hash number is generated by packing four // consecutive elements of the enumeration value into a int and then // processing the int values as shown below. // First, collect all pattern into a single list typedef vector int_vec; vector all_pattern; int_vec alternative_number; int current_alternative_number = 0; for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest, current_alternative_number++) { pIIR_CaseStatementAlternative a = al->first; for (pIIR_ChoiceList cl = a->choices; cl; cl = cl->rest) if (cl->first->is(IR_CHOICE_BY_EXPRESSION)) { pIIR_ChoiceByExpression cbe = pIIR_ChoiceByExpression(cl->first); all_pattern.push_back(folded_value(cbe->value).array_literal_value()); alternative_number.push_back(current_alternative_number); } } // Next, determine pairwise difference of all pattern pairs and or // together these differences. This is done in order so detect // whether there are some bits that have the SAME value among all // choice pattern. After execution of the main loop diff_pattern // will consist of a sequence of integer values where each bit set // to 1 indicates that there are at least two pattern which are // having different bit values at the corresponding bit position // (the reason where are doing this here is: bits that are always // the same among all pattern are ingnored when generating the hash // values from the pattern). const int pattern_length = all_pattern.size() == 0? 0 : all_pattern[0].size(); int_vec diff_pattern(pattern_length); fill(diff_pattern.begin(), diff_pattern.end(), 0); for (vector::iterator iter1 = all_pattern.begin(); iter1 != all_pattern.end(); iter1++) { vector::iterator iter1_next = iter1; for (vector::iterator iter2 = ++iter1_next; iter2 != all_pattern.end(); iter2++) { // First, xor pattern pair int_vec diff(pattern_length); transform((*iter1).begin(), (*iter1).end(), (*iter2).begin(), diff.begin(), bitwise_xor()); // Then, or result into diff_pattern transform(diff.begin(), diff.end(), diff_pattern.begin(), diff_pattern.begin(), bitwise_or()); } } const int sizeof_uint = sizeof(unsigned int); // Now find for each group of four (or less in case of the last // elements) elements of the difference vector a shift value so that // the set bits of all elements do not overlap. This is not possible // for the general case. Hence, try to minimize overlapping. int_vec shift_vector((pattern_length + sizeof_uint - 1)/sizeof_uint); fill(shift_vector.begin(), shift_vector.end(), 0); unsigned int free_bits = 0; for (int i = 0, word = 0; i < pattern_length; i += sizeof_uint, word++) { // If there are no more free bits to use then set all bits of // free_bits if (free_bits == 0) free_bits = (unsigned)0 - (unsigned)1; unsigned int diff_group = 0; for (int byte = i; (byte < pattern_length) && (byte < i + sizeof_uint); byte++) { #ifndef WORDS_BIGENDIAN // This is a little endian machine diff_group |= (unsigned int)diff_pattern[byte] << (8 * (byte - i)); #else // This is a big endian machine diff_group |= (unsigned int)diff_pattern[byte] << (8 * (sizeof_uint - 1 - (byte - i))); #endif } // If all elements of all choice vectors are the same then we // simply store a -1 as shift value to indicate that this // particular group should not be used. if (diff_group == 0) { shift_vector[word] = -1; continue; } shift_vector[word] = find_best_shift(free_bits, diff_group); // Remove used bits from free_bits free_bits &= ~rotate_left(diff_group, shift_vector[word]); } // Calculate hash number for each pattern. The hash number is // stored in key_vector. vector key_vector(all_pattern.size()); for (unsigned int i = 0; i < all_pattern.size(); i++) { unsigned int key = 0; int_vec &pattern = all_pattern[i]; for (int j = 0, word = 0; j < pattern_length; j += sizeof_uint, word++) { if (shift_vector[word] == -1) continue; unsigned int pattern_group = 0; for (int byte = j; (byte < pattern_length) && (byte < j + sizeof_uint); byte++) { #ifndef WORDS_BIGENDIAN // This is a little endian machine pattern_group |= (unsigned int)pattern[byte] << (8 * (byte - j)); #else // This is a big endian machine pattern_group |= (unsigned int)pattern[byte] << (8 * (sizeof_uint - 1 - (byte - j))); #endif } key ^= rotate_left(pattern_group, shift_vector[word]); } key_vector[i] = key; } // Create internal array constants which store the literal // values. Note that this constants will be declared globally. pIIR_DeclarativeRegion root_region = RootDeclarativeRegion(rstack); vector literal_names(all_pattern.size()); for (unsigned int i = 0; i < all_pattern.size(); i++) { // Generate internal constant name literal_names[i] = get_new_internal_var_prefix() + "_lit"; // The initial value of the constant is the concatenation of all // integer values separated by "," string init_str = "[]={" + concat_to_string(all_pattern[i].begin(), all_pattern[i].end(), ",") + "}"; // Declare the internal variable as a global constant insert_internal_object_declaration(NULL, root_region, NULL, literal_names[i], "enumeration", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); } // Calculate the various tables shown in the following example: // unsigned int int3_keys[] = { 12, 34 }; /* two hash numbers */ // unsigned int int4_key_to_lit[] = { 0, 2 }; // enumeration *int5_lit_tab[] = { int1_lit, 0, int2_lit, 0}; // int int6_action[] = { 0, -1, 1 , -1}; vector done(all_pattern.size()); fill(done.begin(), done.end(), false); list key_list, key_to_lit_list; list action_list; list lit_tab_list; int current_key_to_lit_index = 0; for (unsigned int i = 0; i < all_pattern.size(); i++ ) { if (done[i]) continue; done[i] = true; key_list.push_back(key_vector[i]); key_to_lit_list.push_back(current_key_to_lit_index); lit_tab_list.push_back(literal_names[i]); action_list.push_back(alternative_number[i]); for (unsigned int j = i + 1; j < all_pattern.size(); j++) if (key_vector[i] == key_vector[j]) { lit_tab_list.push_back(literal_names[j]); action_list.push_back(alternative_number[j]); done[j] = true; } lit_tab_list.push_back(string("0")); action_list.push_back(-1); current_key_to_lit_index = lit_tab_list.size(); } // Create and init key constant array string key_list_name = get_new_internal_var_prefix() + "_keys"; string init_str = "[]={" + concat_to_string(key_list.begin(), key_list.end(), ",") + "}"; insert_internal_object_declaration(NULL, root_region, NULL, key_list_name, "const unsigned int", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); // Create and init key_to_lit constant array string key_to_lit_name = get_new_internal_var_prefix() + "_key_to_lit"; init_str = "[]={" + concat_to_string(key_to_lit_list.begin(), key_to_lit_list.end(), ",") + "}"; insert_internal_object_declaration(NULL, root_region, NULL, key_to_lit_name, "const int", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); // Create and init lit_tab constant array string lit_tab_name = get_new_internal_var_prefix() + "_lit_tab"; init_str = "[]={" + concat_to_string(lit_tab_list.begin(), lit_tab_list.end(), ",") + "}"; insert_internal_object_declaration(NULL, root_region, NULL, lit_tab_name, "const enumeration *", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); // Create and init action constant array string action_name = get_new_internal_var_prefix() + "_action"; init_str = "[]={" + concat_to_string(action_list.begin(), action_list.end(), ",") + "}"; insert_internal_object_declaration(NULL, root_region, NULL, action_name, "const int", init_str, DECLARE_GLOBALLY | DECLARE_AND_INIT); // Create an global variable which stores the data part of the // selection array. Note that this variable does not have a real // initial value as it will be initialised each time the case // statement is executed. string selection_var_name = get_new_internal_var_prefix() + "_selection"; insert_internal_object_declaration(NULL, root_region, NULL, selection_var_name, "unsigned int", "[" + to_string((pattern_length + sizeof_uint - 1) / sizeof_uint) + "]", DECLARE_GLOBALLY | DECLARE_AND_INIT); // Generate the code which calculates the hash number from an // selection value list hash_number_code_items; for (int i = 0, word = 0; i < pattern_length; i += sizeof_uint, word++) if (shift_vector[word] != -1) { unsigned int mask = (unsigned int)0 - (unsigned int)1; #ifndef WORDS_BIGENDIAN // This is a little endian machine mask = (i + sizeof_uint - 1 < pattern_length)? mask : (mask >> (sizeof_uint - i % sizeof_uint) * 8); #else // This is a big endian machine mask = (i + sizeof_uint - 1 < pattern_length)? mask : (mask >> ((i % sizeof_uint) * 8)); #endif // Create code which fetches the next four bytes of the // selection array. Note that usually four enumeration values // are fetched concurrently this way. string code_item = selection_var_name + "[" + to_string(word) + "]"; if (~mask != 0) // If not all bits in mask are set then use mask to remove // unused bytes in the fetched word code_item = "(" + code_item + "&" + to_string(mask) + ")"; // If the shift value for the current word is not equal to zero // than add code to perform the rotate operations. if (shift_vector[word] != 0) code_item = "rotate_left(" + code_item + "," + to_string(shift_vector[word]) + ")"; // Finally, add code_item to list hash_number_code_items.push_back(code_item); } // Print line and file info last_pos_info = emit_posinfo(cs->pos, str, last_pos_info, l); str += spaces(l) + "memcpy(" + selection_var_name + ","; emit_expr (cs->expression, str, rstack, id_type(READER, DEREF)); str += ".data," + to_string(pattern_length) + "*sizeof(enumeration)); "; // Add the code to calculate the selection expression for the // transformed case statement string hash_number_code = hash_number_code_items.size() != 0? concat_to_string(hash_number_code_items.begin(), hash_number_code_items.end(), "^") : "0"; str += "switch (do_case_select(" + to_string(pattern_length) + "," + to_string(key_list.size()) + "," + hash_number_code + "," + selection_var_name + "," + key_list_name + "," + key_to_lit_name + "," + lit_tab_name + "," + action_name + ")) {\n"; // Now, add the code for the alternatives of the case statement int case_counter = 0; for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest, case_counter++) { pIIR_CaseStatementAlternative a = al->first; str += spaces(l); if (a->choices->first->is(IR_CHOICE_BY_OTHERS)) //*************************************** // Choice by others //*************************************** str += "default: "; else str += "case " + to_string(case_counter) + ":"; str += "{\n"; // Emit sequential statements associated with alternative if (a->sequence_of_statements != NULL) emit_impl(a->sequence_of_statements, str, rstack, l + 2); str += spaces(l + 1) + "} break;\n"; } str += spaces(l) + "}\n"; } void m_emit_impl (pIIR_CaseStatement cs, string &str, RegionStack &rstack, int l) { // A case statement. This is probably too complicated. We should // somehow unify ranges and subtypes if (is_scalar_type(cs->expression->subtype)) //**************************************************** // Expression is scalar //**************************************************** emit_impl_scalar_case_statement(cs, str, rstack, l); else //**************************************************** // Expression is an array //**************************************************** emit_impl_array_case_statement(cs, str, rstack, l); } void m_emit_impl (pIIR_LoopStatement ls, string &str, RegionStack &rstack, int l) { ContextInfo &ctxt = *ActiveContext(rstack); pIIR_DeclarativeRegion active_region = ActiveDeclarativeRegion(rstack); // Check whether a name has been associated with the loop statement if (ls->declarative_region->declarator == NULL) { // If the loop statement has no name then create a default name string loop_name = to_string(ls->declarative_region->seqno) + loop_default_postfix; ls->declarative_region->declarator = new IIR_TextLiteral(0, loop_name.c_str()); } // Print line and file info last_pos_info = emit_posinfo(ls->pos, str, last_pos_info, l); if (ls->is(IR_WHILE_LOOP_STATEMENT)) { str += spaces(l) + "while("; emit_expr (pIIR_WhileLoopStatement(ls)->condition, str, rstack, DEFAULT); str += ")"; } else if (ls->is(IR_FOR_LOOP_STATEMENT)) { pIIR_ForLoopStatement fl = pIIR_ForLoopStatement (ls); // generate a internal variable for the loop variable, and the // loop counter which stores the number of iterations. string loop_var_name = qid(fl->iterator, rstack, id_type()); string loop_counter_name = loop_var_name + "_lc"; string loop_step_name = loop_var_name + "_ls"; string loop_var_type = qid(get_declaration(fl->iterator->subtype), rstack, TYPE); // Get iteration range vector range_desc = get_discrete_range (pIIR_ScalarSubtype(fl->iterator->subtype)->range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // Create internal variables which will hold the iteration // bounds insert_internal_object_declaration(NULL, active_region, NULL, loop_var_name, loop_var_type, "", 0); insert_internal_object_declaration(NULL, active_region, NULL, loop_counter_name, loop_var_type, "", 0); if (!range_desc[0].is_explicit_range()) insert_internal_object_declaration(NULL, active_region, NULL, loop_step_name, loop_var_type, "", 0); if (range_desc[0].is_explicit_range()) { str += spaces (l) + "for (" + loop_var_name + "=" + range.left + "," + loop_counter_name + "=" + string (range.dir == "to"? "up_range_to_length" : "down_range_to_length") + "<" + loop_var_type + ">(" + range.left + "," + range.right + "); "; str += loop_counter_name + "!=0; "; str += loop_var_name + string(range.dir=="to"? "++" : "--") + "," + loop_counter_name + "--)"; } else { str += spaces (l) + "for (" + loop_var_name + "=" + range.left + "," + loop_step_name + "=" + range.dir + "==to?+1:-1," + loop_counter_name + "=range_to_length<" + loop_var_type + ">(" + range.left + "," + range.dir + "," + range.right + ");"; str += loop_counter_name + "!=0" + "; "; str += loop_var_name + "+=" + loop_step_name + "," + loop_counter_name + "--)"; } } else str += spaces(l) + "while(1)"; str += " {\n"; if (ls->sequence_of_statements != NULL) emit_impl (ls->sequence_of_statements, str, rstack, l+2); str += spaces(l); // If a next statement has been used for this loop then add an // appropriate label if (next_statement_used(ls)) str += "next_" + to_string(loop_id(ls)) + ":; "; str += "}"; // If a exit statement has been used for this loop then add an // appropriate label if (exit_statement_used(ls)) str += " exit_" + to_string(loop_id(ls)) + ":; "; str += "\n"; } void m_emit_impl (pIIR_NextStatement ns, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(ns->pos, str, last_pos_info, l); string jump_code = "goto next_" + to_string(loop_id(ns->loop)) + ";\n"; if (ns->condition) { str += spaces(l) + "if ("; emit_expr (ns->condition, str, rstack, id_type(READER, DEREF)); str += ") " + jump_code; } else str += spaces(l) + jump_code; } void m_emit_impl (pIIR_ExitStatement es, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(es->pos, str, last_pos_info, l); string jump_code = "goto exit_" + to_string(loop_id(es->loop)) + ";\n"; if (es->condition) { str += spaces(l) + "if ("; emit_expr (es->condition, str, rstack, id_type(READER, DEREF)); str += ") " + jump_code; } else str += spaces(l) + jump_code; } void m_emit_impl (pIIR_ProcedureCallStatement pcs, string &str, RegionStack &rstack, int l) { // A procedure call. // Print line and file info last_pos_info = emit_posinfo(pcs->pos, str, last_pos_info, l); pIIR_ProcedureDeclaration p = pcs->procedure; // Check whether the procedure contains wait statements if (has_wait (pIIR_ProcedureDeclaration (p)) || has_wait_for (pIIR_ProcedureDeclaration (p))) { // This procedure contains wait statements. Hence, a // corresponding instance of the procedure object is // created and called. // If the caller is a process, then the this pointer is passed // over to the procedure class constructor. Otherwise (i.e., if // the caller is also a procedure), variable "process" must be // passed over. Note that this variable points to the // corresponding process this procedure is called from. The // constructor needs this information in order to idnetify the // "source" process. pIIR_DeclarativeRegion base_region = BaseDeclarativeRegion(rstack); string caller_str = base_region->is (IR_PROCESS_STATEMENT)? "this" : "process"; int windex = wait_info_index (pcs); str += spaces (l) + "pdelayed_procedure=new " + qid (p, rstack, DEFAULT) + "(" + caller_str + ",winfo[" + to_string (windex) + "]"; string assoc_str; emit_subprogram_associations (assoc_str, rstack, pcs->actual_parameter_part, p->interface_declarations, context(p).extra_interface_objects); str += (assoc_str != ""? "," : "" ) + assoc_str; str += "); "; str += "jmp=" + to_string (windex + 1) + "; lab" + to_string (windex + 1) + ":" + " if (((" + qid (p, rstack, DEFAULT) + "*)pdelayed_procedure)->execute()) return true; " + "delete (" + qid (p, rstack, DEFAULT) + "*)pdelayed_procedure;\n"; } else { // Ok, this is a plain procedure without wait statements str += spaces(l) + qid(p, rstack, DEFAULT); str += " ("; emit_subprogram_associations (str, rstack, pcs->actual_parameter_part, p->interface_declarations, context(p).extra_interface_objects); str += ");\n"; } } void m_emit_impl (pIIR_WaitStatement ws, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(ws->pos, str, last_pos_info, l); pIIR_DeclarativeRegion region = BaseDeclarativeRegion (rstack); if (region->is (IR_SENSITIZED_PROCESS_STATEMENT) || region->is (IR_IMPLICIT_PROCESS_STATEMENT)) { /* If the wait is in an implicit process (concurrent signal * assignment) then any code to activate the wait statement can * be skipped, because only a single wait will be active all the * time. */ return; } else if (ws->condition_clause == NULL && ws->timeout_clause == NULL && ws->sensitivity_list == NULL) { // If there is no condition clause and no timeout clause and no // sensitivity_list then this wait statements shall stop the // process for the rest of the simulation time. str += spaces(l) + "wait(PROCESS_STOP); return true;\n"; } else { int windex = wait_info_index(ws); str += spaces(l) + "wait(winfo[" + to_string(windex) + "]); "; str += "jmp = " + to_string(windex + 1) + "; "; pV2CC_ImplicitSignalDeclaration_WaitFor implicit_signal_decl = NULL; if (ws->timeout_clause != NULL) { // Determine declaration of implicit signal. Because there is // only a single implicit signal for each process which uses a // timeout clause simply access the first element of the list // returned from filter_unique. list l = filter_unique(extended_declarations(BaseDeclarativeRegion(rstack)), V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR); // Check whether an appropriate implicit signal could be // found. If not, then we are probably in a subprogram. In this // case, search the extra interface objects for an appropriate // signal. Note that in case of an "wait for" executed within a // subprogram, an appropriate implicit signal is declared within // the corresponding process and this signal is passed over to // the subprogram via its interface. if (l.size () == 0 && BaseDeclarativeRegion (rstack)->is (IR_SUBPROGRAM_DECLARATION)) { // Search extra interface objects for an appropriate // implicit signal. list < AccessDescriptor > al = filter_unique(BaseContext (rstack)->extra_interface_objects, ACCESS, V2CC_IMPLICIT_SIGNAL_DECLARATION_WAIT_FOR); // Ok, if we found one, then extract the signal declaration // and push it on the result list l. if (al.size () > 0) l.push_back (al.front ().declaration); } assert (l.size() > 0); implicit_signal_decl = pV2CC_ImplicitSignalDeclaration_WaitFor(l.front()); // Generate a signal assignment to a special implicit signal // which activates the process in case of a timeout. The // assignment is a special signal assignment as it removes all // pending transactions from the driver and also immediately // sets the reader value to '0'. str += qid(implicit_signal_decl, rstack, id_type(DRIVER)) + "->reset_assign(0,1,"; emit_expr(ws->timeout_clause, str, rstack, id_type(READER, DEREF)); str += "); "; } str += "return true; "; str += "lab" + to_string(windex + 1) + ":; "; // Emit code to test condition if (ws->condition_clause != NULL) { if (ws->timeout_clause != NULL) str += "if ((!" + qid(implicit_signal_decl, rstack, id_type(READER, DEREF)) + ")&&("; else str += "if (!("; emit_expr(ws->condition_clause, str, rstack, id_type(READER, DEREF)); str += ")) return false;"; } str += "\n"; } } void m_emit_impl (pIIR_AssertionStatement as, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(as->pos, str, last_pos_info, l); str += spaces(l) + "if(!"; emit_expr (as->assertion_condition, str, rstack, DEFAULT); str += ")\n"; str += spaces(l + 2) + "report("; if (as->report_expression != NULL) { emit_expr (as->report_expression, str, rstack, DEFAULT); str += ","; } if (as->severity_expression != NULL) emit_expr (as->severity_expression, str, rstack, DEFAULT); else str += "0"; str += ");\n"; } void m_emit_impl (pIIR_ReportStatement rs, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(rs->pos, str, last_pos_info, l); str += spaces(l) + "report("; if (rs->report_expression != NULL) { emit_expr (rs->report_expression, str, rstack, DEFAULT); str += ","; } if (rs->severity_expression != NULL) emit_expr (rs->severity_expression, str, rstack, DEFAULT); else str += "0"; str += ");\n"; } void m_emit_impl (pIIR_SignalAssignmentStatement sa, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(sa->pos, str, last_pos_info, l); // determine the signals that are written! ContextInfo &ctxt = *ActiveContext(rstack); // Determine target signals. ContextInfo local_ctxt; get_context(sa->target, local_ctxt, rstack, true, 0); list sig_written = filter(local_ctxt.accessed_objects, WRITE, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); // bail out if more than one signal is written. Only simple signal // assignment targets are supported yet. if (sig_written.size() > 1) codegen_error.error("%:error: sorry, no resolved signals are supproted yet", sa); // Get decelration of target signal pIIR_SignalDeclaration target_sig_decl = (pIIR_SignalDeclaration)sig_written.front().declaration; // Determine the first part of the synthesized signal assignment statement string target_str, target_specifier; if (codegen_options.get_verbose ()) codegen_error.info ("%:target %n", sa, target_sig_decl); if (is_scalar_type(target_sig_decl->subtype)) { //****************************************************************** // if the target is a scalar signal then simply get the driver for // that signal //****************************************************************** target_str = qid(target_sig_decl, rstack, id_type(DRIVER)); } else if (is_scalar_type(sa->waveform->first->value->subtype)) { //****************************************************************** // if the target is a *scalar* element of a composite signal then // get the scalar driver for that element //****************************************************************** list >acl_list; get_acl(sig_written.front().access_expr, acl_list, rstack, IR_NOT_STATIC, true); // generate a name for a new acl object string internal_var_name = create_internal_acl(get_acl_size(acl_list), rstack, false); // Create signal assignment code target_str = qid(target_sig_decl, rstack, id_type(DRIVER)) + "->scalar_driver(&(" + sprint_acl(acl_list, internal_var_name + "->clear()", rstack, id_type(DEFAULT, DEREF)) + "))"; } else { //****************************************************************** // Several elements of a composite signal are target of the // assignment operation. First, get acl for assignment target //****************************************************************** list > acl_list; get_acl(sig_written.front().access_expr, acl_list, rstack, IR_NOT_STATIC, true); // Check whether the entrire signal or a only a part of the signal // is target of the assignement if (acl_list.size()) { // Only a part of the signal is targeted. First, generate a name // for a new acl object string internal_var_name = create_internal_acl(get_acl_size(acl_list), rstack, false); // Create signal assignment code target_str = qid(target_sig_decl, rstack, id_type(DRIVER)); target_specifier = ",&(" + sprint_acl(acl_list, internal_var_name + "->clear()", rstack, id_type(DEFAULT, DEREF)) + ")"; } else { // the *entire* signal is assignement target target_str = qid(target_sig_decl, rstack, id_type(DRIVER)); target_specifier = ",0"; } } bool first = true; for (pIIR_WaveformList wl = sa->waveform; wl; wl = wl->rest) { if (!first) str += spaces(1); str += spaces(l) + target_str; if (sa->delay_mechanism==IR_INERTIAL_DELAY && first) str += "->inertial_assign("; else str += "->transport_assign("; pIIR_WaveformElement we = wl->first; string value_str; emit_expr (we->value, value_str, rstack, id_type(READER, DEREF)); value_str += target_specifier; if (we->time) { value_str += ",vtime("; emit_expr (we->time, value_str, rstack, id_type(READER)); } else value_str += ",vtime(0"; str += value_str + "));\n"; first = false; } } void m_emit_impl (pIIR_SequentialStatement s, string &str, RegionStack &rstack, int l) { str += string("/* emit statement ") + s->kind_name () + string(" */\n"); } void m_emit_impl (pIIR_ComponentInstantiationStatement ci, string &str, RegionStack &rstack, int l) { } void m_emit_impl (pIIR_BlockStatement bs, string &str, RegionStack &rstack, int l) { // Print line and file info last_pos_info = emit_posinfo(bs->pos, str, last_pos_info, l); str += "block "; str += string("\n") + spaces(l) + string("{\n"); emit_decls (extended_declarations(bs), str, rstack, l+2); if (extended_declarations(bs)) str += "\n"; // emit (bs->block_statement_part, str, rstack, l+2); str += spaces(l) + string("}\n\n"); } void m_emit_impl (pIIR_ConcurrentGenerateStatement gs, string &str, RegionStack &rstack, int l) { rstack.push(gs); // First, emit concurrent statement code emit_impl(gs->concurrent_statement_part, str, rstack, l); // Create a list of declarative region pointers beginning from the // target region up to the root region list RegionList = create_region_list(gs); RegionList.pop_front(); // For each generate region as well as the enclosing architecture // region a corresponding pointer is declared and added as a // parameter to the constructor. string constructor_pars, separator; for (list::iterator iter = RegionList.begin(); iter != RegionList.end(); iter++) if ((*iter)->is(IR_ARCHITECTURE_DECLARATION) || (*iter)->is(IR_CONCURRENT_GENERATE_STATEMENT) || (*iter)->is(IR_BLOCK_STATEMENT)) { constructor_pars += separator + qid(*iter, rstack, id_type()) + " *" + qid(*iter, rstack, id_type()) + "_AP_PAR"; insert_internal_object_declaration(get_last_rest_address(&extended_interface_declarations(gs)), gs, gs->pos, qid(*iter, rstack, id_type()) + "_AP", qid(*iter, rstack, id_type()) + "*", "=" + qid(*iter, rstack, id_type()) + "_AP_PAR", DECLARE_LOCALLY); separator = ","; } // If this is a "for" generate statement then an additional class // member is created which stores the value of the iterator // variable. Note that this member is actually set only once during // elaboration. Note further that for each iteration a new instance // of this class is generated! if (gs->is(IR_CONCURRENT_GENERATE_FOR_STATEMENT)) { pIIR_ConcurrentGenerateForStatement for_gs = pIIR_ConcurrentGenerateForStatement(gs); // First, remove the iteration variable from the normal // decalaration list. pIIR_DeclarationList *prev_rest_pointer = &extended_declarations(gs); for (pIIR_DeclarationList dl = *prev_rest_pointer; dl; prev_rest_pointer = &dl->rest, dl = dl->rest) if (dl->first == for_gs->generate_parameter_specification) { // If iteration variable is found then remove it from the list *prev_rest_pointer = dl->rest; break; } // Next, add a corresponding parameter to the constructor constructor_pars += separator + qid(for_gs->generate_parameter_specification->subtype, rstack, TYPE) + " " + qid(for_gs->generate_parameter_specification, rstack, id_type()) + "_AP_PAR"; separator = ","; // Finally, add the iteration variable as an internal object. insert_internal_object_declaration(get_last_rest_address(&extended_interface_declarations(gs)), gs, gs->pos, qid(for_gs->generate_parameter_specification, rstack, id_type()), qid(for_gs->generate_parameter_specification->subtype, rstack, TYPE), "=" + qid(for_gs->generate_parameter_specification, rstack, id_type()) + "_AP_PAR", DECLARE_LOCALLY); } // ****************************************************************** // Constructor // ****************************************************************** str += "/* Implementation of generate class " + get_long_name(gs) + " methods */\n" + qid(gs, rstack, id_type()) + "::\n" + qid(gs, rstack, id_type()) + "(" + constructor_pars + ",name_stack &iname,int level) {\n"; // The current C++ source code is not associated with any real // VHDL source line last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_info, l); str += spaces(l + 4) + "iname.push(\"\");\n"; // Emit code to initialize some interal process members if (extended_interface_declarations(gs)!= NULL) emit_decls_init(extended_interface_declarations(gs), str, rstack, 4); // Emit code to initialize remaining declarations if (extended_declarations(gs)!= NULL) emit_decls_init(extended_declarations(gs), str, rstack, 4); if (gs->concurrent_statement_part != NULL) emit_concurrent_statement_constructors(gs->concurrent_statement_part, str, rstack, gs, 4); str += spaces(l + 4) + "iname.pop();\n"; str += "}\n"; rstack.pop(); } void m_emit_impl (pIIR_ConcurrentStatement cs, string &str, RegionStack &rstack, int l) { str += string("/* ") + string(cs->kind_name()) + string(" */\n"); } freehdl-0.0.7/v2cc/v2cc-acl.cc0000644000175000017500000003062110361406655012616 00000000000000#include #include "v2cc-chunk.h" #include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include "mapping.h" #include "v2cc-util.h" // ****************************************************************************************** // Name: m_get_acl , generic function // // Description: Extracts ACL list from an expression. Depending on the // parameter slevel only the locally static, globally static or all // parts of the expression are converted and added to the list. The // resulting list elements are made of pair where the second element of the pair denotes the // appropriate expression. In most cases the first element is // NULL. However, if an element of an array or record shall be // addressed, then the first element points to the corresponding array // or record expression. start is true if the entire expression e // shall be converted into an ACL object. // // Parameter: acl_expr_list = output list // rstack = region stack // slevel = only expressions that match static level slevel // are appended to the output list // start = false if the ENTIRE expression shall be converted into an ACL // // Return value: returns true if e matches the static level slevel // // ****************************************************************************************** string sprint_object_reference(pIIR_ObjectDeclaration obj, vector > &static_range_vec, RegionStack &rstack) { // First, print object name to string string str = obj->declarator->text.to_chars (); pIIR_Type type = get_basic_type (obj->subtype); vector >::iterator iter = static_range_vec.begin (); while (iter != static_range_vec.end ()) { if (type->is (IR_ARRAY_TYPE) || type->is (IR_ARRAY_SUBTYPE)) { // Element is an array pIIR_TypeList type_list = type->is (IR_ARRAY_TYPE)? pIIR_ArrayType (type)->index_types : pIIR_ArraySubtype (type)->constraint; str += "("; string separator; // Iterate over dims or until end of static_range_vec is // reached for (; type_list != NULL && iter != static_range_vec.end (); type_list = type_list->rest, iter++) { if (! and_reduce (iter->valid)) // Range is not static or element could not be // statically determined. Hence, print ??? instead, str += separator + "???"; else if (range_to_length (iter->left, iter->dir, iter->right) == 0) { // Range is 0 (i.e., null range specified) str += separator + "*null range*"; } else if (range_to_length (iter->left, iter->dir, iter->right) == 1) // Only a single element of the dimension is addressed str += separator + to_string (pIIR_ScalarType (get_base_type (type_list->first)), StaticDataType (iter->left)); else { // A range is specified. First, determine range // direction from the index type. vector range_desc = get_discrete_range(type_list->first, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint (rstack); // If the range direction is not static then get // range direction from base type... if (!range.valid [1]) { range_desc = get_discrete_range (get_base_type (type_list->first), rstack, IR_NOT_STATIC); range = range_desc[0].rangedes_to_lint (rstack); } // Finally, print range str += to_string (iter->left) + (range.dir == IR_DIRECTION_UP || !range.valid [1] ? " to " : " downto ") + to_string (iter->right); } separator = ", "; } str += type_list == NULL ? ")" : ",...)"; type = pIIR_ArrayType (get_base_type (type))->element_type; } else if (type->is (IR_RECORD_TYPE) || type->is (IR_RECORD_SUBTYPE)) { assert (iter->left == iter->right); pIIR_RecordType record_type = pIIR_RecordType (get_basic_type (type)); pIIR_ElementDeclaration elem_decl = get_nth_element (record_type->element_declarations, iter->left)->first; str += elem_decl->declarator->text.to_chars (); type = elem_decl->subtype; } else assert (false); } return str; } string sprint_acl(list > &acl_expr_list, const string acl_object, RegionStack &rstack, id_type t) { if (acl_expr_list.size() == 0) return string(""); string result = acl_object; for (list >::iterator it = acl_expr_list.begin(); it != acl_expr_list.end(); it++) { const bool emit_directly = (*it).first == NULL; pIIR_Root ex = (*it).second; result += "<<"; if (!emit_directly && ex->is(IR_RECORD_REFERENCE)) { // if the prefix is static then determine the declaration number // of the record element (the first element is associated with // number 0, the next element is associated with 1, ...) result += to_string(pIIR_RecordReference(ex)->element->declaration_pos); } else if (!emit_directly && ex->is(IR_EXPLICIT_RANGE)) { // Determine range vector range_desc = get_discrete_range (pIIR_ExplicitRange(ex), rstack, IR_NOT_STATIC); // Convert to integer strings StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, t); result += "ACL_RANGE<<" + range.left + "<<" + range.dir + "<<" + range.right; } else { emit_expr(ex, result, rstack, t); } } return result; } // Returns types that are associated with the corresponding // expressions on the acl list. In detail, the function returns a list // of type pairs, where each pair is associated with a entry on the // list. The first element of a pair denotes the main type (which is // either a record or array (sub)type) and the second element is the // actual index type (in case of an array type) or record element type // (in case of an record type). Note that in case of an // multi-dimensional array more than one index type may be listed. vector > get_types(list > &acl_expr_list, const pIIR_Type type) { vector > result; pIIR_Type basic_type = type; // Loop through all acl elements. Note that for each element an // appropriate entry is generated on the result list. list >::iterator it = acl_expr_list.begin(); while (it != acl_expr_list.end ()) { // Remove an subtypes that only add resolution functions. basic_type = get_basic_type (basic_type); if (basic_type->is (IR_ARRAY_TYPE) || basic_type->is (IR_ARRAY_SUBTYPE)) { // Ok, the current acl element is an array index (or perhaps // a array range) pIIR_TypeList type_list = basic_type->is (IR_ARRAY_TYPE)? pIIR_ArrayType (basic_type)->index_types : pIIR_ArraySubtype (basic_type)->constraint; // Add as many pairs to the list as index values are stored // in acl_expr_list. However, stop if all dimensions of the // current array are processed. for (pIIR_TypeList tl = type_list; tl && (it != acl_expr_list.end ()); tl = tl->rest, it ++) result.push_back (pair (basic_type, tl->first)); } else if (basic_type->is (IR_RECORD_TYPE) || basic_type->is (IR_RECORD_SUBTYPE)) { // Ok, the current acl element is an record type. First, get // base type (i.e., remove any resolution function subtypes) // of type. basic_type = get_base_type (basic_type); result.push_back (pair (basic_type, basic_type)); } else // Should never happen! assert (false); } return result; } // Determine length of acl from an acl expression list int get_acl_size(list > &acl_expr_list) { int count = 0; for (list >::iterator it = acl_expr_list.begin(); it != acl_expr_list.end(); it++) { const bool emit_directly = (*it).first == NULL; pIIR_Root ex = (*it).second; if (!emit_directly && ex->is(IR_RECORD_REFERENCE)) count++; else if (!emit_directly && ex->is(IR_EXPLICIT_RANGE)) count += 4; else count++; } return count; } bool m_get_acl(pIIR_Expression e, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { bool match = level_match(e->static_level, slevel); if (start) return match; // first check whether slevel matches the static level of the // expression e if (! match) return false; acl_expr_list.push_back(pair(NULL, e)); return true; // e matches the static level slevel } bool m_get_acl (pIIR_SimpleReference sor, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { return start ? true : level_match(sor->static_level, slevel); } bool m_get_acl (pIIR_ArrayReference aor, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { if (start) { // if start is true then first calculate the ACL for the prefix bool match = get_acl(aor->array, acl_expr_list, rstack, slevel, true); // Now test whether each index value matches the static level // slevel. Further, convert the index values into ACL objects. for (pIIR_ExpressionList il = aor->indices; match && il; il = il->rest) { // Stop creating ACL objects as soon as the first index is // found which does not match the static level slevel if (! level_match(il->first->static_level, slevel)) { match = false; break; } acl_expr_list.push_back(pair(aor, il->first)); } return match; } else { // if start is false then convert the entire expression into an // ACL object if the slevel matches the static level of the // expression aor. if (! level_match(aor->static_level, slevel)) return false; acl_expr_list.push_back(pair(NULL, aor)); return true; } } bool m_get_acl (pIIR_RecordReference ror, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { if (start) { // if start is true then calculate the ACL for the prefix if (get_acl(ror->record, acl_expr_list, rstack, slevel, start)) { acl_expr_list.push_back(pair(ror, ror)); return true; } else // if the prefix is not static then return false. Do not append // the declaration number! return false; } else { // if start is false then convert the entire expression into an // ACL object if the slevel matches the static level of the // expression ror if (! level_match(ror->static_level, slevel)) return false; acl_expr_list.push_back(pair(NULL, ror)); return true; } } bool m_get_acl (pIIR_ExplicitRange er, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { // bail out if start is true assert(!start); // check whether left and right border match the static level if (! level_match(er->left->static_level, slevel) || ! level_match(er->right->static_level, slevel)) return false; acl_expr_list.push_back(pair(NULL, er)); return true; } bool m_get_acl (pIIR_SliceReference sr, list > &acl_expr_list, RegionStack &rstack, IR_StaticLevel slevel, bool start = false) { if (start) { // if start is true then calculate the ACL for the prefix as well // as the ACL for the range if (get_acl(sr->array, acl_expr_list, rstack, slevel, true)) { bool match = get_acl(sr->range, acl_expr_list, rstack, slevel, false); if (match) { acl_expr_list.back().first = sr; return true; } } return false; } else { // if start is false then convert the entire expression into an // ACL object if the slevel matches the static level of the // expression sr if (! level_match(sr->static_level, slevel)) return false; acl_expr_list.push_back(pair(NULL, sr)); return true; } } freehdl-0.0.7/v2cc/v2cc-qid.cc0000644000175000017500000002652410375037066012644 00000000000000 #include #include "v2cc-chunk.h" #include "v2cc-util.h" // ****************************************************************************************** // Name: m_qid , generic function // // Description: Returns get a fully qualified identifier name plus an // appropriate prefix. I.e., if a identifier is used at a location in // the code where it is not directly visible then some prefix code is // needed in order to access it. E.g., if a generic parameter is used // within process then it is accessed using a architecture pointer as // the parameter is not directly visible within the process. parameter // rstack determines the code region where the identifier is to be // used. Parameter obj_access defines how the identifier is accessed. // // Return value: returns fully qualified string // // ****************************************************************************************** // Prepends \ before special characters \ : ( ) ". string get_fully_escaped_string(const string &str) { string result; for (unsigned int i = 0; i < str.length(); i++) { if (str[i] == '\\' || str[i] == ':' || str[i] == '"' || str[i] == '(' || str[i] == ')') result += '\\'; result += str[i]; } return result; } string get_access_prefix(pIIR_Declaration d, RegionStack &rstack, id_type obj_access) { if (obj_access.access() & NO_PREFIX) return ""; string prefix; // If the object has been declared within a package or package body // then no prefix is needed as the corresponding C++ objects are // declared globally. if (d->declarative_region->is(IR_PACKAGE_DECLARATION) || d->declarative_region->is(IR_PACKAGE_BODY_DECLARATION)) return ""; // If the identifier is globally declared then no prefix is required if (static_declarative_region(d) == RootDeclarativeRegion(rstack)) return ""; // Determine the "home" region where the object has been // declared. Note that this is not necessarily the original // declarative region but may have been modified during // optimization. E.g., if a constant is declared within a process // then the declarative region of the constant is the process // itself. Usually, the corresponding C++ constant will be declared // within the C++ process code. However, if the constant is locally // static then it is declared globally in the C++ source. pIIR_DeclarativeRegion ident_home_region = static_declarative_region(d) != NULL? static_declarative_region(d) : d->declarative_region; while (true) { // Search for the next concurrent statement, package, package // body, subprogram, architecture or entity. if (ident_home_region->is(IR_CONCURRENT_STATEMENT) || ident_home_region->is(IR_PACKAGE_DECLARATION) || ident_home_region->is(IR_PACKAGE_BODY_DECLARATION) || ident_home_region->is(IR_SUBPROGRAM_DECLARATION) || ident_home_region->is(IR_ARCHITECTURE_DECLARATION) || ident_home_region->is(IR_ENTITY_DECLARATION)) break; ident_home_region = ident_home_region->declarative_region; } // If the home region is equal to the current region then the // object is directly visible. Hence, no prefix is needed. Further, // all objects within an architecture or entity region are directly // visible as well. RegionStack::iterator r_iter = --rstack.end(); if (ident_home_region == (*r_iter) || (*r_iter)->is(IR_ENTITY_DECLARATION) || (*r_iter)->is(IR_ARCHITECTURE_DECLARATION)) return prefix; // Analyze each region beginning with the current region an // proceeding to the very first region. while (true) { // If the identifier is used within a subprogram then we do not // need any additional prefix. Note that any identifier not // global to a subprogram is passed into the corresponding C++ // function (generated from the VHDL subprogram code) as a // parameter. if ((*r_iter)->is(IR_SUBPROGRAM_DECLARATION)) return prefix; // If the current region pointer points to an entity then the // object is accessed via the entity/architecture pointer. // Further, if the object is declared within an generate // statement, then it is accessed vi a special pointer. if ((*r_iter)->is(IR_ENTITY_DECLARATION) || (*r_iter)->is(IR_ARCHITECTURE_DECLARATION) || ((*r_iter)->is(IR_CONCURRENT_GENERATE_STATEMENT) && ident_home_region == (*r_iter))) return qid(*r_iter, rstack, id_type()) + "_AP->" + prefix; // If the current region pointer is equal to the "home" region of // the object then we are done and the prefix is returned. if (ident_home_region == (*r_iter)) return prefix; if (r_iter == rstack.begin()) { // This should never happen cout << "Internal problem: Could not determine access prefix for " << d->declarator->text.to_chars() << endl; cout << "Tested regions: "; r_iter = --rstack.end(); while (r_iter != rstack.begin ()) { if ((*r_iter)->declarator != NULL) cout << " " << (*r_iter)->declarator->text.to_chars(); else cout << " ???"; r_iter--; } cout << endl; cout << "static_declarative_region: " << (long)static_declarative_region(d); if (static_declarative_region(d) != NULL && static_declarative_region(d)->declarator != NULL) cout << " = " << static_declarative_region(d)->declarator->text.to_chars(); cout << endl; cout << "RootDeclarativeRegion: " << (long)RootDeclarativeRegion(rstack) << endl; assert (false); } r_iter--; }; return prefix; } string m_qid(pIIR_LibraryUnit d, RegionStack &rstack, id_type obj_access) { string id; if (d->is (IR_ARCHITECTURE_DECLARATION)) // Ent_Arch id = qid(pIIR_ArchitectureDeclaration(d)->entity, rstack, obj_access); else if (!(obj_access.object() == BARE)) id = nid(pIIR_LibraryUnit(d),LIBRARY); else id = pIIR_LibraryUnit(d)->library_name->text.to_chars(); id += "_" + nid(d, obj_access); return id; } string m_qid(pIIR_SubprogramDeclaration d, RegionStack &rstack, id_type obj_access) { string id; if (d->prototype != NULL) // If a subprogram shall be printed and if this subprogram has a // prototype then print the name of the prototype delcaration! id = qid(d->prototype, rstack, obj_access); else id = qid(d->declarative_region, rstack, obj_access) + "_" + nid(d, obj_access); return id; } string m_qid(pIIR_Declaration d, RegionStack &rstack, id_type obj_access) { return qid(d->declarative_region, rstack, obj_access) + "_" + nid(d, obj_access); } string m_qid(pIIR_InterfaceDeclaration d, RegionStack &rstack, id_type obj_access) { string id = get_access_prefix(d, rstack, obj_access) + qid(d->declarative_region, rstack, obj_access) + "_" + nid(d, obj_access); if (d->alias_base != NULL && !is_array_type(d->subtype) && (obj_access.access() & DEREF)) // If an object alias (other than an array alias) shall be // printed and the DEREF flag is set then the entire string is // prepended with "*" id = "(*" + id + ")"; return id; } string m_qid(pIIR_SignalInterfaceDeclaration d, RegionStack &rstack, id_type obj_access) { string id = qid(d->declarative_region, rstack, obj_access) + "_"; // if the reader is requested and ARCHREF is set then the reader is // accessed via the sig_info instance. if ((obj_access.object() == READER) && (obj_access.access() & ARCHREF)) { id += nid(d, id_type(DEFAULT, obj_access.access())); id = get_access_prefix(d, rstack, obj_access) + id; if (!(obj_access.access() & DEREF)) id = "&" + id; else id += "->reader()"; } else { // Reader and driver are delclared locally. Hence, no access prefix // is required. id += nid(d, obj_access); if ((obj_access.object() != READER) && (obj_access.object() != DRIVER) && (obj_access.access() & ARCHREF)) id = get_access_prefix(d, rstack, obj_access) + id; if (obj_access.access() & DEREF) // If a signal shall be printed and the DEREF flag is set then the // entire string is prepended with "*" id = "(*" + id + ")"; } return id; } string m_qid(pIIR_SignalDeclaration d, RegionStack &rstack, id_type obj_access) { string id = qid(d->declarative_region, rstack, obj_access) + "_"; // if the reader is requested and ARCHREF is set then the reader is // accessed via the sig_info instance. if ((obj_access.object() == READER) && (obj_access.access() & ARCHREF)) { id += nid(d, id_type(DEFAULT, obj_access.access())); id = get_access_prefix(d, rstack, obj_access) + id; if (!(obj_access.access() & DEREF)) id = "&" + id; else id += "->reader()"; } else { // Reader and driver are delclared locally. Hence, no access prefix // is required. id += nid(d, obj_access); if ((obj_access.object() != READER) && (obj_access.object() != DRIVER) && (obj_access.access() & ARCHREF)) id = get_access_prefix(d, rstack, obj_access) + id; if (obj_access.access() & DEREF) // If a signal shall be printed and the DEREF flag is set then the // entire string is prepended with "*" id = "(*" + id + ")"; } return id; } string m_qid(pIIR_ObjectDeclaration d, RegionStack &rstack, id_type obj_access) { string id = get_access_prefix(d, rstack, obj_access) + qid(d->declarative_region, rstack, obj_access) + "_" + nid(d, obj_access); if (d->alias_base != NULL && !is_array_type(d->subtype) && (obj_access.access() & DEREF)) // If an object alias (other than an array alias) shall be printed // and the DEREF flag is set then the entire string is prepended // with "*" id = "(*" + id + ")"; return id; } string m_qid(pV2CC_ImplicitSignalDeclaration_WaitFor d, RegionStack &rstack, id_type obj_access) { string id = nid(d, obj_access); if (obj_access.access() & DEREF) // If a signal shall be printed and the DEREF flag is set then the // entire string is prepended with "*" id = "(*" + id + ")"; return id; } string m_qid(pIIR_TypeDeclaration d, RegionStack &rstack, id_type obj_access) { string id; if ((obj_access.object() == TYPE) && is_scalar_type(d->type)) { pIIR_Type base_type = get_base_type(d->type); if (base_type->is(IR_INTEGER_TYPE)) return "integer"; else if (base_type->is(IR_ENUMERATION_TYPE)) return "enumeration"; else if (base_type->is(IR_PHYSICAL_TYPE)) return "physical"; else if (base_type->is(IR_FLOATING_TYPE)) return "floatingpoint"; else assert(false); } else if ((obj_access.object() == TYPE) && d->type->is(IR_ACCESS_TYPE)) { return "vhdlaccess"; } else if ((obj_access.object() == TYPE) && d->type->is(IR_FILE_TYPE)) { return "vhdlfile"; } else id = qid(d->declarative_region, rstack, obj_access) + "_" + nid(d, obj_access); if (obj_access.object() == INFO) id = get_access_prefix (d, rstack, obj_access) + id; if ((obj_access.object() == (ALIAS | TYPE)) && (d->type->is(IR_ARRAY_SUBTYPE) || (d->type->is(IR_ARRAY_TYPE)))) // Create an array alias type name id = "array_alias<" + id + " >"; return id; } string m_qid(pIIR_Type t, RegionStack &rstack, id_type obj_access) { return qid(get_declaration(t), rstack, obj_access); } string m_qid(pIIR_Subtype t, RegionStack &rstack, id_type obj_access) { if (implicit_subtype_declaration(t) != NULL) return qid(implicit_subtype_declaration(t), rstack, obj_access); else return qid(get_declaration(t), rstack, obj_access); } freehdl-0.0.7/v2cc/v2cc-get-type-info.cc0000644000175000017500000002267610051161766014556 00000000000000 #include #include "v2cc-chunk.h" #include "v2cc-util.h" // ****************************************************************************************** // Name: m_get_type_info_obj , generic function // // Description: Returns type info object for a type or subtype. If the // (sub)type is anonymous then code which generates a new type info // objects is returned. static_object controls whether a new created // info object shall be static (i.e., it is never removed) or not. // // Return value: string // // ****************************************************************************************** string m_get_type_info_obj(pIIR_AccessType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_EnumerationType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_FileType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_IntegerType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_PhysicalType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_FloatingType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_RecordSubtype t, RegionStack &rstack, bool static_info) { if (t->declaration != NULL || implicit_subtype_declaration(t) != NULL) return "(&" + qid(t, rstack, INFO) + "_INFO)"; else return "(&" + qid(get_base_type(t), rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_Subtype t, RegionStack &rstack, bool static_info) { if (t->declaration != NULL || implicit_subtype_declaration(t) != NULL) return "(&" + qid(t, rstack, INFO) + "_INFO)"; else return "(&" + qid(get_base_type(t), rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_ScalarSubtype t, RegionStack &rstack, bool static_info) { string str; // If subtype has an explicit declaration then return the // corresponding info pointer. if (t->declaration != NULL || implicit_subtype_declaration(t) != NULL) return "(&" + qid(t, rstack, INFO) + "_INFO)"; // If the subtype is not constrained then analyze its immediate base if (t->range == NULL) return get_type_info_obj(t->immediate_base, rstack, static_info); vector range_desc = get_discrete_range(t, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); string left_checked_str = range.left, right_checked_str = range.right; string base_info_str = get_type_info_obj(t->base, rstack, false); // Ok, the subtype is constrained but has no explicit declaration if (t->base->is(IR_ENUMERATION_TYPE)) { // **************************************************************************** // Enumeration subtype // **************************************************************************** // Shall we perform runtime range checks? if ((do_runtime_checks & CG_CHECK_SCALAR_TYPE_RANGE)) { string base_info_str = get_type_info_obj(get_basic_type(t->immediate_base), rstack, false); // Could the left bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(t) & RT_CHECK_LEFT_BOUND) left_checked_str = base_info_str + "->check(" + range.left + ")"; // Could the right bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(t) & RT_CHECK_RIGHT_BOUND) right_checked_str = base_info_str + "->check(" + range.right + ")"; } str = "new enum_info_base(" + left_checked_str + "," + right_checked_str + "," + base_info_str + "->values)"; } else if (t->base->is(IR_INTEGER_TYPE) || t->base->is(IR_PHYSICAL_TYPE) || t->base->is(IR_FLOATING_TYPE)) { // **************************************************************************** // integer, physical or floating point subtype // **************************************************************************** // Shall we perform runtime range checks? if ((do_runtime_checks & CG_CHECK_SCALAR_TYPE_RANGE)) { string base_info_str = get_type_info_obj(get_basic_type(t->immediate_base), rstack, false); // Could the left bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(t) & RT_CHECK_LEFT_BOUND) left_checked_str = base_info_str + "->check(" + range.left + ")"; // Could the right bound be checked at compile time or do we // have to do this at runtime? if (runtime_checks(t) & RT_CHECK_RIGHT_BOUND) right_checked_str = base_info_str + "->check(" + range.right + ")"; } if (t->base->is(IR_INTEGER_TYPE)) str = "new integer_info_base(" + left_checked_str + "," + right_checked_str + "," + "min(" + range.left + "," + range.right + ")," + "max(" + range.left + "," + range.right + "))"; else if (t->base->is(IR_FLOATING_TYPE)) str = "new floating_info_base(" + left_checked_str + "," + right_checked_str + "," + "min(" + range.left + "," + range.right + ")," + "max(" + range.left + "," + range.right + "))"; else if (t->base->is(IR_PHYSICAL_TYPE)) str = "new physical_info_base(" + left_checked_str + "," + right_checked_str + "," + "min(" + range.left + "," + range.right + ")," + "max(" + range.left + "," + range.right + ")," + base_info_str + "->units," + base_info_str + "->scale," + base_info_str + "->unit_count)"; } return str; } /* Creates an array info object for an array subtype */ string m_get_type_info_obj(pIIR_ArraySubtype as, RegionStack &rstack, bool static_info) { // If the declaration is not anonymous then simply return the // corresponding array info pointer if (as->declaration != NULL || implicit_subtype_declaration(as) != NULL) return "(&" + qid(as, rstack, INFO) + "_INFO)"; // If no constraints are defined then get type info instance for // immediate base if (as->constraint == NULL) return get_type_info_obj(as->immediate_base, rstack, static_info); // Count number of dimensions pIIR_ArrayType array_type = pIIR_ArrayType(get_base_type(as)); int counter = 0; for (pIIR_TypeList tl = array_type->index_types; tl; tl = tl->rest) counter++; // Determine whether the base type of the array is named (i.e., // whether there is an explicit type declaration for the base // type) bool named_base_type = !is_implicit_subtype(array_type); // Determine type info instance for element type of the array string array_info_str; if (named_base_type) { // If the base type is named then the elment type is derived // from the base array type array_info_str = get_type_info_obj(array_type, rstack, static_info) + "->element_type"; for (int i = counter; i > 1; i--) array_info_str = "parray_info(" + array_info_str + ")->element_type"; } else // Otherwise, the element type is determined directly from the // corresponding element subtype array_info_str = get_type_info_obj(array_type->element_type, rstack, static_info); // Step through each dimension of the array starting with the last // dimension. for (int i = counter; i >= 1; i--) { string base_info_str; pIIR_TypeList tl = as->constraint; for (int j = 1; j < i; j++) tl = tl->rest; // Get index range vector range_desc = get_discrete_range(tl->first, rstack, IR_NOT_STATIC); // Bail out if more than a single range descriptor is returned assert(range_desc.size() <= 1); // Next convert range descriptor to int strings StaticRangeDescriptor range = range_desc[0].rangedes_to_string(rstack, get_default_id_type(rstack)); // Get index info instance for the corresponding array index string index_info_str; if (named_base_type) { // If the base type of the current array subtype is named then // the corresponding index subtype is derived from this type index_info_str = get_type_info_obj(array_type, rstack, static_info); for (int k = i; k > 1; k--) index_info_str = "parray_info(" + array_info_str + "->element_type)"; index_info_str = index_info_str + "->index_type"; } else // Otherwise, the index info is directly derived from the // corresponding index subtype index_info_str = get_type_info_obj(get_base_type(tl->first), rstack, static_info); // setup init value for array info instance array_info_str = "(new array_info(" + array_info_str + "," + index_info_str + "," + range.left + "," + range.dir + "," + range.right + "," + (static_info?"-1":"0") + "))"; } return array_info_str; } string m_get_type_info_obj(pIIR_ArrayType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } string m_get_type_info_obj(pIIR_RecordType t, RegionStack &rstack, bool static_info) { assert (t->declaration != NULL); return "(&" + qid(t->declaration, rstack, INFO) + "_INFO)"; } freehdl-0.0.7/v2cc/v2cc-cdfg-static-expr.cc0000644000175000017500000001234610361406655015227 00000000000000#include #include "v2cc-chunk.h" #include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include "mapping.h" #include "v2cc-util.h" // ****************************************************************************************** // Name: m_cdfg_get_static_expr , generic function // // Description: Returns static expression (with respect to slevel) in CDFG style // // Parameter: slevel = static level of the expression which shall be considered. // str = result string // t = Controls conversion of VHDL objects // start = false if the ENTIRE expression shall be converted into an ACL // // Return value: returns true if e matches the static level slevel // // ****************************************************************************************** bool m_cdfg_get_static_expr(pIIR_Expression e, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { bool match = level_match(e->static_level, slevel); if (start) return match; // first check whether slevel matches the static level of the // expression e if (! match) return false; cdfg_emit_expr(e, str, rstack, t); return true; // e matches the static level slevel } bool m_cdfg_get_static_expr (pIIR_SimpleReference sor, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { return start ? true : level_match(sor->static_level, slevel); } bool m_cdfg_get_static_expr (pIIR_ArrayReference aor, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { if (start) { string result = "(create-array-element-reference "; // if start is true then first calculate prefix bool match = cdfg_get_static_expr(aor->array, result, rstack, slevel, t, true); // Now test whether each index value matches the static level // slevel. Further, convert the index values. for (pIIR_ExpressionList il = aor->indices; match && il; il = il->rest) { // Stop creating ACL objects as soon as the first index is // found which does not match the static level slevel if (! level_match(il->first->static_level, slevel)) { match = false; break; } bool simple = cdfg_emit_expr (il->first, result, rstack, t); } result += ")"; str += result; return match; } else { // if start is false then convert the entire expression if the // slevel matches the static level of the expression aor. if (! level_match(aor->static_level, slevel)) return false; cdfg_emit_expr (aor, str, rstack, t); return true; } } bool m_cdfg_get_static_expr (pIIR_RecordReference ror, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { if (start) { string result = "(create-record-element-reference "; // if start is true then calculate the prefix if (cdfg_get_static_expr(ror->record, result, rstack, slevel, t, start)) { // if the prefix is static then determine the declaration number // of the record element (the first element is associated with // number 0, the next element is associated with 1, ...) result += " " + to_string(ror->element->declaration_pos) + ")"; str += result; return true; } else // if the prefix is not static then return false. Do not append // the declaration number! return false; } else { // if start is false then convert the entire expression if the // slevel matches the static level of the expression ror. if (! level_match(ror->static_level, slevel)) return false; cdfg_emit_expr(ror, str, rstack, t); return true; } } bool m_cdfg_get_static_expr (pIIR_ExplicitRange er, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { // bail out if start is true assert(!start); // check whether left and right border match the static level if (! level_match(er->left->static_level, slevel) || ! level_match(er->right->static_level, slevel)) return false; str += "(create-range "; // now add left border, direction and right border cdfg_emit_expr(er->left, str, rstack, t); str += " " + string(er->direction == IR_DIRECTION_UP ? "(int)to" : "(int)downto") + " "; cdfg_emit_expr(er->right, str, rstack, t); return true; } bool m_cdfg_get_static_expr (pIIR_SliceReference sr, string &str, RegionStack &rstack, IR_StaticLevel slevel, id_type t = id_type(), bool start = false) { if (start) { string result = "(create-array-slice "; // if start is true then calculate the ACL for the prefix as well // as the ACL for the range if (cdfg_get_static_expr(sr->array, result, rstack, slevel, t, true) && cdfg_get_static_expr(sr->range, result, rstack, slevel, t, false)) { str += result + ")"; return true; } else return false; } else { // if start is false then convert the entire expression into an // ACL object if the slevel matches the static level of the // expression ror if (! level_match(sr->static_level, slevel)) return false; cdfg_emit_expr(sr, str, rstack, t); return true; } } freehdl-0.0.7/v2cc/v2cc-cdfg-impl.cc0000644000175000017500000005113110361406655013720 00000000000000#include #include #include #if HAVE_MALLOC_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" void cdfg_emit_subprogram_associations (string &str, RegionStack &rstack, pIIR_AssociationList assocs, pIIR_InterfaceList formals) { string separator = ""; // **************************************************************************** // Add normal subprogram parameter // **************************************************************************** for (pIIR_InterfaceList fl = formals; fl; fl = fl->rest) { pIIR_InterfaceDeclaration par = fl->first; // select formal parameter /* Select association element from an association list which * corresponds with given formal */ list a_list = find_matching_actuals(assocs, par); assert (a_list.size() <= 1); // Only simple assoication is currently supported here! pIIR_AssociationElement a = a_list.size() == 0? NULL : a_list.front(); str += separator; if (a != NULL && !a->actual->is(IR_OPEN_EXPRESSION)) { // An actual is associated with the formal if (a->formal_conversion) { str += "/* converted by "; get_long_name(a->formal_conversion); str += " */"; } // ******************************************************* // Handle signal parameter // ******************************************************* if (par->is(IR_SIGNAL_INTERFACE_DECLARATION)) { // First, append sig_info pointer cdfg_emit_expr (a->actual, str, rstack, SIGNAL); } else // ******************************************************* // Handle normal parameter (non signal) // ******************************************************* cdfg_emit_expr (a->actual, str, rstack, id_type(READER, DEREF)); } else if (par->initial_value != NULL) // If the parameter was left open then insert the default // value if one is defined in the interface declaration cdfg_emit_expr (par->initial_value, str, rstack, DEFAULT); else // If no default value is defined for the formal then create a // dummy instance of the appropriate type str += cdfg_create_default_instance(par->subtype, rstack); separator = " "; } } /* * Simulation Object Implementation */ void m_cdfg_emit_impl (pIIR_ArrayType at, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_ArraySubtype ast, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_ScalarSubtype sst, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_EnumerationType et, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_AccessType at, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_FileType ft, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_EntityDeclaration e, string &str, RegionStack &rstack, int l) { rstack.push(e); list subprograms = filter_unique(extended_declarations(e), tree_kind_list() << IR_PROCEDURE_DECLARATION << IR_FUNCTION_DECLARATION ); for (list::iterator i = subprograms.begin(); i != subprograms.end(); i++) cdfg_emit_impl((*i), str, rstack, l); if (e->entity_statement_part != NULL) cdfg_emit_impl(e->entity_statement_part, str, rstack, l); rstack.pop(); } void m_cdfg_emit_impl (pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack, int l) { rstack.push(a); list subprograms = filter_unique(extended_declarations(a), tree_kind_list() << IR_PROCEDURE_DECLARATION << IR_FUNCTION_DECLARATION ); for (list::iterator i = subprograms.begin(); i != subprograms.end(); i++) cdfg_emit_impl((*i), str, rstack, l); if (a->architecture_statement_part != NULL) cdfg_emit_impl(a->architecture_statement_part, str, rstack, l); rstack.pop(); } void m_cdfg_emit_impl (pIIR_ConcurrentGenerateStatement gs, string &str, RegionStack &rstack, int l) { rstack.push(gs); list subprograms = filter_unique(extended_declarations(gs), tree_kind_list() << IR_PROCEDURE_DECLARATION << IR_FUNCTION_DECLARATION ); for (list::iterator i = subprograms.begin(); i != subprograms.end(); i++) cdfg_emit_impl((*i), str, rstack, l); if (gs->concurrent_statement_part != NULL) cdfg_emit_impl(gs->concurrent_statement_part, str, rstack, 2); rstack.pop(); } void m_cdfg_emit_impl (pIIR_PackageBodyDeclaration pb, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_PackageDeclaration p, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_ConcurrentStatementList s, string &str, RegionStack &rstack, int l) { while (s) { cdfg_emit_impl (s->first, str, rstack, l); s = s->rest; } } void m_cdfg_emit_impl (pIIR_ProcessStatement p, string &str, RegionStack &rstack, int l) { rstack.push(p); ContextInfo &ctxt = *ActiveContext(rstack); str += "(define-process " + get_escaped_string(get_long_name(p), ":\"\\()") + " (current-scope process-name)\n"; // Filter all signals, variables and constants that are accessed // (read, write or sensitive) within the process code list objects = filter_unique(ctxt.accessed_objects, ACCESS, tree_kind_list() << IR_SIGNAL_DECLARATION << IR_SIGNAL_INTERFACE_DECLARATION << IR_CONSTANT_DECLARATION << IR_CONSTANT_INTERFACE_DECLARATION << IR_VARIABLE_DECLARATION << IR_SHARED_VARIABLE_DECLARATION ); // Mapp all objects which are used within the process if (objects.begin() != objects.end()) { str += spaces(4) + "(let* (\n"; for (list::iterator i = objects.begin(); i != objects.end(); i++) str += spaces(7) + "(" + qid((*i).declaration, rstack, id_type(DEFAULT, NO_PREFIX)) + " (map-object current-scope process-name " + + "\"" + get_escaped_string(get_long_name((*i).declaration)) + "\"))\n"; str += spaces(7) + ")\n"; } str += spaces(6) + "(create-process-statements current-scope process-name)\n"; list subprograms = filter_unique(extended_declarations(p), tree_kind_list() << IR_PROCEDURE_DECLARATION << IR_FUNCTION_DECLARATION ); for (list::iterator i = subprograms.begin(); i != subprograms.end(); i++) cdfg_emit_impl((*i), str, rstack, 6); // emit sequential statements if (p->process_statement_part != NULL) cdfg_emit_impl(p->process_statement_part, str, rstack, 6); str += spaces(6) + "(create-end-process-statements)\n"; str += spaces(4) + ")\n"; str += ")\n"; // Remove context from context stack rstack.pop(); } // Print subprogram implementation void m_cdfg_emit_impl (pIIR_SubprogramDeclaration sbp, string &str, RegionStack &rstack, int l) { rstack.push(sbp); ContextInfo &ctxt = *ActiveContext(rstack); str += spaces(l) + "(define-procedure " + get_escaped_string(get_long_name(sbp), ":\"\\()") + " (current-scope procedure-name)\n"; // Filter all signals, variables and constants that are accessed // (read, write or sensitive) within the process code list objects = filter_unique(ctxt.accessed_objects, ACCESS, tree_kind_list() << IR_SIGNAL_DECLARATION << IR_SIGNAL_INTERFACE_DECLARATION << IR_CONSTANT_DECLARATION << IR_CONSTANT_INTERFACE_DECLARATION << IR_VARIABLE_DECLARATION << IR_SHARED_VARIABLE_DECLARATION); // Mapp all objects which are used within the process if (objects.begin() != objects.end()) { str += spaces(l+4) + "(let* (\n"; for (list::iterator i = objects.begin(); i != objects.end(); i++) str += spaces(l+7) + "(" + qid((*i).declaration, rstack, id_type(DEFAULT, NO_PREFIX)) + " (map-object current-scope procedure-name " + + "\"" + get_escaped_string(get_long_name((*i).declaration)) + "\"))\n"; str += spaces(l+7) + ")\n"; } str += spaces(l+6) + "(create-procedure-statements procedure-name)\n"; list subprograms = filter_unique(extended_declarations(sbp), tree_kind_list() << IR_PROCEDURE_DECLARATION << IR_FUNCTION_DECLARATION ); for (list::iterator i = subprograms.begin(); i != subprograms.end(); i++) cdfg_emit_impl((*i), str, rstack, 6); // emit sequential statements if (sbp->subprogram_body != NULL) cdfg_emit_impl(sbp->subprogram_body, str, rstack, l+6); str += spaces(l+6) + "(create-end-procedure-statements)\n"; str += spaces(l+4) + ")\n"; str += spaces(l) + ")\n"; // Remove context from context stack rstack.pop(); } // Print subprogram implementation void m_cdfg_emit_impl (pIIR_PredefinedFunctionDeclaration sbp, string &str, RegionStack &rstack, int l) { // Nothing to do. } // Print subprogram implementation void m_cdfg_emit_impl (pIIR_PredefinedProcedureDeclaration sbp, string &str, RegionStack &rstack, int l) { // Nothing to do. } void // SeqStatList impl m_cdfg_emit_impl (pIIR_SequentialStatementList sl, string &str, RegionStack &rstack, int l) { while (sl) { pIIR_SequentialStatement s = sl->first; cdfg_emit_impl (s, str, rstack, l); sl = sl->rest; } } void m_cdfg_emit_impl (pIIR_NullStatement, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-null-statement)\n"; } void m_cdfg_emit_impl (pIIR_ReturnStatement r, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-return-statement "; if (r->return_expression) cdfg_emit_expr (r->return_expression, str, rstack, DEFAULT); str += ")\n"; } void m_cdfg_emit_impl (pIIR_VariableAssignmentStatement a, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-variable-assignment "; cdfg_emit_expr (a->target, str, rstack, DEFAULT); str += " "; cdfg_emit_expr (a->expression, str, rstack, DEFAULT); str += ")\n"; } void m_cdfg_emit_impl (pIIR_IfStatement is, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-if-statement "; cdfg_emit_expr (is->condition, str, rstack, DEFAULT); str += ")\n"; str += spaces(l+2) + "(create-then-clause)\n"; cdfg_emit_impl (is->then_sequence, str, rstack, l+4); if (is->else_sequence) { str += spaces(l+2) + "(create-else-clause)\n"; cdfg_emit_impl (is->else_sequence, str, rstack, l+4); } str += spaces(l) + "(create-end-if)\n"; } void m_cdfg_emit_impl (pIIR_CaseStatement cs, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-case-statement "; cdfg_emit_expr (cs->expression, str, rstack, DEFAULT); str += " (list "; list choice_str_list; for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest) { string choice_str; pIIR_CaseStatementAlternative a = al->first; // If more than a single selection expression is given (i.e., more // than a single value, range or others then these expressions are // "ored" together. const bool single_choice = a->choices->rest == NULL; if (!single_choice) choice_str += "(list or "; for (pIIR_ChoiceList cl = a->choices; cl; cl = cl->rest) if (cl->first->is(IR_CHOICE_BY_RANGE)) { //*************************************** // Choice by range //*************************************** choice_str += " (list range "; pIIR_ChoiceByRange cbr = pIIR_ChoiceByRange(cl->first); // Get range. vector range_desc = get_discrete_range(cbr->range, rstack, IR_LOCALLY_STATIC); StaticRangeDescriptor range = range_desc[0].rangedes_to_lint(rstack); if (range.left <= range.right && range.dir == IR_DIRECTION_UP) choice_str += to_string(range.left) + " to " + to_string(range.right); else if (range.left > range.right && range.dir != IR_DIRECTION_UP) choice_str += to_string(range.right) + " downto " + to_string(range.left); choice_str += ") "; } else if (cl->first->is(IR_CHOICE_BY_EXPRESSION)) { //*************************************** // Choice by expression //*************************************** pIIR_ChoiceByExpression cbe = pIIR_ChoiceByExpression(cl->first); cdfg_emit_folded_value(folded_value(cbe->value), choice_str, rstack, cbe->value->subtype); choice_str += " "; } else if (cl->first->is(IR_CHOICE_BY_OTHERS)) { //*************************************** // Choice by others //*************************************** choice_str += "'others "; } if (!single_choice) choice_str += ")"; // Add string to choice string list choice_str_list.push_back(choice_str); } str += concat_to_string(choice_str_list.begin(), choice_str_list.end(), " ") + "))\n"; list::iterator choice_iter = choice_str_list.begin(); for (pIIR_CaseStatementAlternativeList al = cs->case_statement_alternatives; al; al = al->rest, choice_iter++) { pIIR_CaseStatementAlternative a = al->first; string case_str = spaces(l+2) + "(create-case-when-clause " + *choice_iter + ")\n"; // Analyze sequential statements associated with alternative if (a->sequence_of_statements != NULL) cdfg_emit_impl(a->sequence_of_statements, case_str, rstack, l + 4); str += case_str; } str += spaces(l) + "(create-end-case)\n"; } void m_cdfg_emit_impl (pIIR_LoopStatement ls, string &str, RegionStack &rstack, int l) { ContextInfo &ctxt = *ActiveContext(rstack); pIIR_DeclarativeRegion active_region = ActiveDeclarativeRegion(rstack); // Check whether a name has been associated with the loop statement if (ls->declarative_region->declarator == NULL) { // If the loop statement has no name then create a default name string loop_name = to_string(ls->declarative_region->seqno) + loop_default_postfix; ls->declarative_region->declarator = new IIR_TextLiteral(0, loop_name.c_str()); } if (ls->is(IR_WHILE_LOOP_STATEMENT)) { str += spaces(l) + "(create-while-loop-statement \""; qid(ls->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)); // Print loop name str += "\" "; cdfg_emit_expr (pIIR_WhileLoopStatement(ls)->condition, str, rstack, DEFAULT); str += ")\n"; } else if (ls->is(IR_FOR_LOOP_STATEMENT)) { pIIR_ForLoopStatement fl = pIIR_ForLoopStatement (ls); str += spaces(l) + "(create-for-loop-statement \"" + qid(ls->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)) + "\" "; // Print loop name str += qid(fl->iterator, rstack, id_type(DEFAULT, NO_PREFIX)) + " "; // Get iteration range vector range_desc = get_discrete_range (pIIR_ScalarSubtype(fl->iterator->subtype)->range, rstack, IR_NOT_STATIC); StaticRangeDescriptor range = range_desc[0].cdfg_rangedes_to_string(rstack, get_default_id_type(rstack)); str += "(list range " + range.left + " " + range.dir + " " + range.right + "))\n"; } else { str += spaces(l) + "(create-while-loop-statement \""; qid(ls->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)); // Print loop name str += "\" 1)\n"; } if (ls->sequence_of_statements != NULL) cdfg_emit_impl (ls->sequence_of_statements, str, rstack, l+4); str += spaces(l) + "(create-end-loop \"" + qid(ls->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)) + "\")\n"; } void m_cdfg_emit_impl (pIIR_NextStatement ns, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-next-statement \""; qid(ns->loop->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)); // Print loop name str += "\" "; if (ns->condition) { cdfg_emit_expr (ns->condition, str, rstack, DEFAULT); } str += ")"; } void m_cdfg_emit_impl (pIIR_ExitStatement es, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-exit-statement \""; qid(es->loop->declarative_region, rstack, id_type(DEFAULT, NO_PREFIX)); // Print loop name str += "\" "; if (es->condition) cdfg_emit_expr (es->condition, str, rstack, id_type(READER, DEREF)); str += ")"; } void m_cdfg_emit_impl (pIIR_ProcedureCallStatement pcs, string &str, RegionStack &rstack, int l) { } void m_cdfg_emit_impl (pIIR_WaitStatement ws, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-wait-statement "; if (ws->condition_clause == NULL && ws->timeout_clause == NULL && ws->sensitivity_list == NULL) { // If there is no condition clause and no timeout clause and no // sensitivity_list then this wait statements shall stop the // process for the rest of the simulation time. str += "'() '() '()"; } else { str += "(list"; if (ws->sensitivity_list != NULL) { // Wait statemen has an explicit sensitivity list for (pIIR_ExpressionList el = ws->sensitivity_list; el; el = el->rest) { str += " "; cdfg_emit_expr(el->first, str, rstack, DEFAULT); } } else if (ws->condition_clause) { ContextInfo tmp_ctxt; get_context(ws->condition_clause, tmp_ctxt, rstack, false, 0); list sense_sigs = filter(tmp_ctxt.accessed_objects, READ, tree_kind_list(IR_SIGNAL_DECLARATION, IR_SIGNAL_INTERFACE_DECLARATION)); for (access_list::iterator i = tmp_ctxt.accessed_objects.begin(); i != tmp_ctxt.accessed_objects.end(); i++) { str += " "; cdfg_get_static_expr((*i).access_expr, str, rstack, IR_GLOBALLY_STATIC, DEFAULT, true); } } str += ") "; if (ws->condition_clause) { cdfg_emit_expr(ws->condition_clause, str, rstack, DEFAULT); str += " "; } else str += "'() "; // Explore timeout expression if (ws->timeout_clause) { cdfg_emit_expr(ws->timeout_clause, str, rstack, DEFAULT); str += " "; } else str += "'() "; } str += ")\n"; } void m_cdfg_emit_impl (pIIR_AssertionStatement as, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-assertion-statement\n"; str += spaces(l+2); cdfg_emit_expr (as->assertion_condition, str, rstack, DEFAULT); str += "\n"; str += spaces(l + 2); emit_expr (as->report_expression, str, rstack, DEFAULT); str += "\n"; if (as->severity_expression != NULL) { str += spaces(l+2); emit_expr (as->severity_expression, str, rstack, DEFAULT); } str += ")\n"; } void m_cdfg_emit_impl (pIIR_ReportStatement rs, string &str, RegionStack &rstack, int l) { str += spaces(l) + "(create-report-statement\n"; str += spaces(l+2); emit_expr (rs->report_expression, str, rstack, DEFAULT); str += ")\n"; if (rs->severity_expression != NULL) { str += spaces(l+2); emit_expr (rs->severity_expression, str, rstack, DEFAULT); } str += ")\n"; } void m_cdfg_emit_impl (pIIR_SignalAssignmentStatement sa, string &str, RegionStack &rstack, int l) { // determine the signals that are written! ContextInfo &ctxt = *ActiveContext(rstack); // Target signal(s) str += spaces(l) + "(create-signal-assignment\n"; str += spaces(l+2); cdfg_emit_expr(sa->target, str, rstack, DEFAULT); str += "\n"; // Delay mechanism str += spaces(l+2); if (sa->delay_mechanism==IR_INERTIAL_DELAY) { if (sa->reject_time_expression != NULL) { str += "'(reject "; cdfg_emit_expr(sa->reject_time_expression, str, rstack, DEFAULT); str += ")\n"; } else str += "'(inertial)\n"; } else str += "(transport)\n"; str += spaces(l+2) + "(list\n"; for (pIIR_WaveformList wl = sa->waveform; wl; wl = wl->rest) { pIIR_WaveformElement we = wl->first; str += spaces(l+4) + "(list "; cdfg_emit_expr (we->value, str, rstack, DEFAULT); str += " "; if (we->time != NULL) cdfg_emit_expr (we->time, str, rstack, DEFAULT); else str += "0"; str += ")\n"; } str += spaces(l+2) + ")\n"; str += spaces(l) + ")\n"; } void m_cdfg_emit_impl (pIIR_SequentialStatement s, string &str, RegionStack &rstack, int l) { str += string(";; emit statement ") + s->kind_name (); } void m_cdfg_emit_impl (pIIR_ComponentInstantiationStatement ci, string &str, RegionStack &rstack, int l) { /* Nothing to do */ } void m_cdfg_emit_impl (pIIR_BlockStatement bs, string &str, RegionStack &rstack, int l) { rstack.push(bs); if (bs->block_statement_part != NULL) cdfg_emit_impl(bs->block_statement_part, str, rstack, l); rstack.pop(); } void m_cdfg_emit_impl (pIIR_ConcurrentStatement cs, string &str, RegionStack &rstack, int l) { str += string(";; ") + string(cs->kind_name()); } freehdl-0.0.7/v2cc/v2cc-optimize.cc0000644000175000017500000001456710020623403013712 00000000000000#include #include "v2cc-chunk.h" #include "mapping.h" #include "v2cc-util.h" // Used to generate error messages extern vaul_error_printer codegen_error; // This function moves an item within a declaration region to the // declarative region defined by static_declarative_region. E.g., if a // constant has been defined in an architechture then it will be // defined globally in the generated C++ code if the initialization // value is locally static. This is done in order to prevent the code // generator from generating an identical constant within each // instance of the architecture. void reschedule_declaration_region(RegionStack &rstack) { const bool is_architecture_top_region = TopDeclarativeRegion (rstack)->is (IR_ARCHITECTURE_DECLARATION); pIIR_DeclarativeRegion active_region = ActiveDeclarativeRegion (rstack); pIIR_DeclarativeRegion root_region = RootDeclarativeRegion (rstack); pIIR_DeclarationList *dlp = &extended_declarations (active_region); while ((*dlp) != NULL) { pIIR_DeclarativeRegion static_region = static_declarative_region ((*dlp)->first); if ((*dlp)->first->is(IR_SUBPROGRAM_DECLARATION)) optimize ((*dlp)->first, rstack); else if (static_region != NULL && active_region != root_region && static_region != active_region && ((*dlp)->first->is(IR_CONSTANT_DECLARATION) || (*dlp)->first->is(IR_TYPE_DECLARATION)) && // If we are processing architecture declarations and the // object is static with respect to the entity, then do // nothing as we cannot move declarations into entities. Same // for package and package body declarations. !(static_region->is (IR_ENTITY_DECLARATION) && active_region->is (IR_ARCHITECTURE_DECLARATION)) && !(static_region->is (IR_PACKAGE_DECLARATION) && active_region->is (IR_PACKAGE_BODY_DECLARATION))) { //cout << (*dlp)->first->declarator->text.to_chars() << " " // << static_region->kind_name () << endl; // Test whether we are currently processing an architecture // and the object is static with respect to the entity // region. As we cannot insert any declarations into the // entity declaration list, move it to the architecture // declaration. if (is_architecture_top_region && static_region->is (IR_ENTITY_DECLARATION)) static_region = TopDeclarativeRegion (rstack); pIIR_DeclarationList *listp = get_last_rest_address (&extended_declarations (static_region)); *listp = new IIR_DeclarationList ((*dlp)->first->pos, (*dlp)->first, *listp); *dlp = (*dlp)->rest; continue; } dlp = &(*dlp)->rest; } } // ****************************************************************************************** // Name: m_optimize, generic function // // Description: performs some optimizations on the node tree // // Return value: void // // ****************************************************************************************** void m_optimize (pIIR_PredefinedFunctionDeclaration sp, RegionStack &rstack) { rstack.push(sp); rstack.pop(); } void m_optimize (pIIR_SubprogramDeclaration sp, RegionStack &rstack) { rstack.push(sp); // Note that if the subprogram is declared in a package (or in // another subprogram that is declared in a package) then do not try // to move declaration as this might cause initialization races: // package race is // function func return integer; // constant const : integer := func; // end package; // package body race is // function func return integer is // constant const2 : integer := 1; // begin // return const2; // end func; // end package body; // In the C++ code the package body is elaborated AFTER the package // declaration. Hence, if const2 is initialized globally, if will // get its initial value too late! pIIR_DeclarativeRegion top_region = TopDeclarativeRegion(rstack); if (!top_region->is(IR_PACKAGE_BODY_DECLARATION)) { if (extended_declarations(sp) != NULL) reschedule_declaration_region (rstack); } rstack.pop(); } void m_optimize (pIIR_EntityDeclaration e, RegionStack &rstack) { rstack.push(e); reschedule_declaration_region (rstack); if (e->entity_statement_part != NULL) optimize(e->entity_statement_part, rstack); rstack.pop(); } void m_optimize (pIIR_Type st, RegionStack &rstack) { } void m_optimize (pIIR_ArchitectureDeclaration a, RegionStack &rstack) { rstack.push(a); if (extended_declarations(a) != NULL) reschedule_declaration_region (rstack); if (a->architecture_statement_part != NULL) optimize(a->architecture_statement_part, rstack); rstack.pop(); } void m_optimize (pIIR_ConcurrentStatementList csl, RegionStack &rstack) { for (pIIR_ConcurrentStatementList l = csl; l; l = l->rest) optimize(l->first, rstack); } void m_optimize (pIIR_ProcessStatement p, RegionStack &rstack) { rstack.push(p); if (extended_declarations(p) != NULL) reschedule_declaration_region (rstack); rstack.pop(); } // Do not re-order delcaration in packages as they will be already // emitted at a global level. Re-scheduling may break correct // initialization order! void m_optimize (pIIR_PackageDeclaration p, RegionStack &rstack) { rstack.push(p); rstack.pop(); } // Do not re-order delcaration in packages as they will be already // emitted at a global level. Re-scheduling may break correct // initialization order! void m_optimize (pIIR_PackageBodyDeclaration pb, RegionStack &rstack) { rstack.push(pb); rstack.pop(); } void m_optimize (pIIR_ConfigurationDeclaration c, RegionStack &rstack) { rstack.push(c); rstack.pop(); } void m_optimize (pIIR_ComponentInstantiationStatement cis, RegionStack &rstack) { rstack.push(cis); rstack.pop(); } void m_optimize (pIIR_ComponentDeclaration c, RegionStack &rstack) { rstack.push(c); rstack.pop(); } void m_optimize(pIIR_ConcurrentGenerateIfStatement gs, RegionStack &rstack) { rstack.push(gs); if (extended_declarations(gs) != NULL) reschedule_declaration_region (rstack); if (gs->concurrent_statement_part!= NULL) optimize(gs->concurrent_statement_part, rstack); rstack.pop(); } void m_optimize(pIIR_ConcurrentGenerateForStatement gs, RegionStack &rstack) { rstack.push(gs); if (extended_declarations(gs) != NULL) reschedule_declaration_region (rstack); if (gs->concurrent_statement_part != NULL) optimize(gs->concurrent_statement_part, rstack); rstack.pop(); } freehdl-0.0.7/v2cc/test-mapper.cc0000644000175000017500000000065107234062124013457 00000000000000#include #include #include "mapping.h" int main (int argc, const char **argv) { v2cc_mapper *m = make_v2cc_mapper (); m->add_default_libdirs (); if (argc == 3) { char *fn = m->find_design_file (argv[1], argv[2]); if (fn) { printf ("%s\n", fn); delete fn; } } else { fprintf (stderr, "usage: %s lib unit\n", argv[0]); exit (1); } exit (0); } freehdl-0.0.7/v2cc/v2cc-chunk.t0000644000175000017500000007633710147063243013055 00000000000000; -*- scheme -*- (include "freehdl/vaul-chunk.t") (define (format-v2cc-kind name) (upcase (concat-strings (cons "v2cc" (cdr (syllables name))) "_"))) (chunk v2cc (struct-fmt "~a") (pointer-fmt "p~a") (kind-fmt-func format-v2cc-kind) ) (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include ") (header-add "#include \"v2cc.h\"") ;; Returns kind of a VHDL operator: ;; NO_OP if the function does not denote an operator ;; STD_OP if the funcion denotes an predefined VHDL operator ;; BASIC_OP if the function denotes an operator defined in an ;; IEEE library (e.g. numeric_std) ;; USER_OP an user defined operator (header-add "enum op_type { NO_OP, STD_OP, BASIC_OP, USER_OP };") ;; (impl-add "#include \"v2cc-chunk.h\"") ;;(defctype int) (defctype set_string (cname "set")) (defctype list_string (cname "list")) (defctype list_expr_pair_ref (cname "list >&")) (defctype vector_string (cname "vector")) (defctype vector_string_ref (cname "vector&")) (defctype vector_bool (cname "vector")) (defctype vector_lint_ref (cname "vector&")) (defctype RegionStack (cname "RegionStack")) (defctype RegionStack_ref (cname "RegionStack &")) (defctype ContextInfo (cname "ContextInfo")) (defctype ContextInfo_ref (cname "ContextInfo &")) (defctype pContextInfo (cname "ContextInfo*")) (defctype pAccessDescriptor (cname "pAccessDescriptor")) (defctype lint (cname "long long int")) (defctype StaticDataType (cname "StaticDataType")) (defctype string (cname "string")) (defctype string_ref (cname "string&")) (defctype set_IIR_SimpleReference (name "set")) (defctype pIIR_ObjectDeclaration (cname "pIIR_ObjectDeclaration")) ;(defctype IR_StaticLevel (cname "IR_StaticLevel")) (defctype RangeDescriptor_vec (cname "vector")) (defctype RuntimeCheckFlags (cname "RuntimeCheckFlags")) (defctype id_type) ;;(defctype static_level_type) (defctype op_type) ;;(defgeneric emit_def ;; (args (string_ref str) (RegionStack_ref ctxt)) ;; (methods ;; IIR_Subtype IIR_IntegerType IIR_PhysicalType ;; IIR_FloatingType IIR_EnumerationType ;; IIR_ArrayType IIR_RecordType IIR_FileType IIR_Type)) (defgeneric emit_decl (args (string_ref str) (RegionStack_ref ctxt) (int l)) (methods IIR_Declaration IIR_SubprogramDeclaration IIR_VariableDeclaration IIR_ConstantDeclaration IIR_FileDeclaration IIR_SignalDeclaration IIR_TypeDeclaration IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_EntityDeclaration IIR_ArchitectureDeclaration IIR_ConfigurationDeclaration IIR_ComponentDeclaration)) (defgeneric emit_main (args (string_ref str) (RegionStack_ref ctxt) (int l)) (methods IIR_Declaration IIR_ArchitectureDeclaration IIR_ConfigurationDeclaration)) (defgeneric emit_expr (args (string_ref str) (RegionStack_ref ctxt) (id_type t)) (return bool) (methods IIR_FunctionCall IIR_SimpleReference IIR_AbstractLiteralExpression IIR_TypeConversion IIR_QualifiedExpression IIR_EnumLiteralReference IIR_ArrayReference IIR_ArrayLiteralExpression IIR_RecordReference IIR_RecordAggregate IIR_ArrayAggregate IIR_SliceReference IIR_AccessReference IIR_SignalAttr IIR_AttrSigFunc IIR_AttrArrayFunc IIR_AttrTypeFunc IIR_AttrTypeValue IIR_Expression IIR_EnumerationLiteral IIR_NullExpression IIR_Allocator )) (defgeneric cdfg_emit_expr (args (string_ref str) (RegionStack_ref ctxt) (id_type t)) (return bool) (methods IIR_FunctionCall IIR_SimpleReference IIR_AbstractLiteralExpression IIR_TypeConversion IIR_QualifiedExpression IIR_EnumLiteralReference IIR_ArrayReference IIR_ArrayLiteralExpression IIR_RecordReference IIR_RecordAggregate IIR_ArrayAggregate IIR_SliceReference IIR_AccessReference IIR_SignalAttr IIR_AttrSigFunc IIR_AttrArrayFunc IIR_AttrTypeFunc IIR_AttrTypeValue IIR_Expression IIR_EnumerationLiteral IIR_NullExpression IIR_Allocator )) ;; ;; emit class headers (AKA declarations) ;; (defgeneric emit_hdr (args (string_ref str) (RegionStack_ref ctxt) (int l)) (methods IIR_EntityDeclaration IIR_ArchitectureDeclaration IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_ProcessStatement IIR_ComponentInstantiationStatement IIR_BlockStatement IIR_ConcurrentGenerateStatement IIR_ConcurrentStatement IIR_ConcurrentStatementList IIR_SubprogramDeclaration IIR_PredefinedFunctionDeclaration IIR_PredefinedProcedureDeclaration IIR_EnumerationType IIR_AccessType IIR_FileType IIR_ScalarSubtype IIR_ArrayType IIR_ArraySubtype IIR_TypeDeclaration IIR_RecordType IIR_RecordSubtype IIR_Root )) ;; ;; emit class implementation (AKA definition) ;; (defgeneric emit_impl (args (string_ref str) (RegionStack_ref ctxt) (int l)) (methods IIR_NullStatement IIR_ReturnStatement IIR_VariableAssignmentStatement IIR_IfStatement IIR_CaseStatement IIR_LoopStatement IIR_NextStatement IIR_ExitStatement ;;IIR_LoopControlStatement IIR_ProcedureCallStatement IIR_WaitStatement IIR_AssertionStatement IIR_ReportStatement IIR_SignalAssignmentStatement IIR_SequentialStatement IIR_EntityDeclaration IIR_ArchitectureDeclaration IIR_ProcessStatement IIR_ComponentInstantiationStatement IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_BlockStatement IIR_ConcurrentGenerateStatement IIR_SequentialStatementList IIR_SequentialStatement IIR_ConcurrentStatement IIR_ConcurrentStatementList IIR_SubprogramDeclaration IIR_PredefinedFunctionDeclaration IIR_PredefinedProcedureDeclaration IIR_EnumerationType IIR_ScalarSubtype IIR_ArrayType IIR_ArraySubtype IIR_AccessType IIR_FileType IIR_RecordType IIR_RecordSubtype )) (defgeneric cdfg_emit_impl (args (string_ref str) (RegionStack_ref ctxt) (int l)) (methods IIR_NullStatement IIR_ReturnStatement IIR_VariableAssignmentStatement IIR_IfStatement IIR_CaseStatement IIR_LoopStatement IIR_NextStatement IIR_ExitStatement ;;IIR_LoopControlStatement IIR_ProcedureCallStatement IIR_WaitStatement IIR_AssertionStatement IIR_ReportStatement IIR_SignalAssignmentStatement IIR_SequentialStatement IIR_EntityDeclaration IIR_ArchitectureDeclaration IIR_ProcessStatement IIR_ComponentInstantiationStatement IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_BlockStatement IIR_ConcurrentGenerateStatement IIR_SequentialStatementList IIR_SequentialStatement IIR_ConcurrentStatement IIR_ConcurrentStatementList IIR_SubprogramDeclaration IIR_PredefinedFunctionDeclaration IIR_PredefinedProcedureDeclaration IIR_EnumerationType IIR_ScalarSubtype IIR_ArrayType IIR_ArraySubtype IIR_AccessType IIR_FileType )) ;; ****************************************************************************************** ;; Name: m_emit_info_init , generic function ;; ;; Description: emits initialization code of type info instances ;; ;; Return value: Static level of the array info instance ;; ;; ****************************************************************************************** (defgeneric emit_info_init (args (string_ref str) (RegionStack_ref ctxt) (bool static_info) (int l)) (return IR_StaticLevel) (methods IIR_EnumerationType IIR_ScalarSubtype IIR_ArrayType IIR_ArraySubtype IIR_AccessType IIR_FileType IIR_RecordType IIR_RecordSubtype )) ;;(defgeneric emit ;; (args (string_ref str) (RegionStack_ref ctxt) (int l)) ;; (methods ;; IIR_Declaration ;; IIR_Type ;; IIR_InterfaceDeclaration ;; IIR_TypeList ;; )) (defgeneric get_acl (args (list_expr_pair_ref alist) (RegionStack_ref ctxt) (IR_StaticLevel slevel) (bool start)) (return bool) (methods IIR_Expression IIR_SimpleReference IIR_ArrayReference IIR_RecordReference IIR_ExplicitRange IIR_SliceReference )) (defgeneric cdfg_get_static_expr (args (string_ref str) (RegionStack_ref ctxt) (IR_StaticLevel slevel) (id_type t) (bool start)) (return bool) (methods IIR_Expression IIR_SimpleReference IIR_ArrayReference IIR_ExplicitRange IIR_SliceReference )) ;; ****************************************************************************************** ;; Name: m_explore_and_check, generic function ;; ;; Description: explore (collect informations about node) and check ;; node for correctness ;; ;; Return value: returns number of errors found ;; ;; ****************************************************************************************** (defgeneric explore_and_check (args (RegionStack_ref rstack) (bool collect_access_info)) (return int) (methods IIR_EntityDeclaration IIR_DeclarationList IIR_InterfaceDeclaration IIR_ArchitectureDeclaration IIR_ConcurrentStatementList IIR_ProcessStatement IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_SubprogramDeclaration IIR_ConfigurationDeclaration IIR_ComponentDeclaration IIR_SequentialStatementList IIR_IfStatement IIR_ForLoopStatement IIR_WhileLoopStatement IIR_LoopStatement IIR_NextStatement IIR_ExitStatement IIR_CaseStatement IIR_WaitStatement IIR_AssociationElement IIR_SignalAssignmentStatement IIR_VariableAssignmentStatement IIR_ComponentInstantiationStatement IIR_AssertionStatement IIR_ReportStatement IIR_ProcedureCallStatement IIR_EnumerationType IIR_Type IIR_RecordType IIR_ArrayType IIR_ArraySubtype IIR_FileType IIR_ScalarSubtype IIR_Subtype IIR_NullStatement IIR_ReturnStatement IIR_ConcurrentGenerateIfStatement IIR_ConcurrentGenerateForStatement IIR_PredefinedFunctionDeclaration )) ;; ****************************************************************************************** ;; Name: m_get_context, generic function ;; ;; Description: Analyzes statements and collects all abjects which are ;; accessed. The information about the accessed objects are stored in ;; a ContextInfo instance. A ContextInfo instance stores three ;; different kinds of informations: ;; ;; 1. accessed_objects = all objects ;; which are accessed (read, written, sensitive). ;; ;; 2. wait_statements = pointer to the wait statements included in the ;; current context ;; ;; 3. signal_assignment_statements = list of pointers to all signal ;; assignment statements included in the current context ;; ;; 4. internal_vars = internal objects required by the generated code ;; ;; Parameter: ctxt = context info instance ;; target = is true if the expression is target of an assignment ;; level = level the object is located at. The entire statement ;; is assigned level 0. The level is increased each time an object is ;; included in an argument to a subroutine or an index value of an ;; array reference. ;; ;; Return value: returns a pointer to the corresponding access ;; descriptor if an expression is analyzed. Otherwise, NULL is ;; returned. ;; ;; ****************************************************************************************** (defgeneric get_context (args (ContextInfo_ref ctxt) (RegionStack_ref rstack) (bool target) (int level)) (return pAccessDescriptor) (methods IIR_FunctionCall IIR_SimpleReference IIR_ArrayReference IIR_AccessReference IIR_ArrayRange IIR_ExplicitRange IIR_OthersIndexedAssociation IIR_RangeIndexedAssociation IIR_SingleIndexedAssociation IIR_ElementAssociation IIR_SliceReference IIR_RecordReference IIR_Expression IIR_ExpressionList IIR_ArrayAggregate IIR_RecordAggregate IIR_WaitStatement IIR_AttrSigFunc IIR_TypeConversion IIR_Type IIR_QualifiedExpression IIR_Allocator IIR_AttrTypeFunc IIR_AttrTypeValue IIR_AttrArrayFunc )) ;; ****************************************************************************************** ;; Name: m_check_expression , generic function ;; ;; Description: checks whether expression is valid and contains no ;; errors. Any errors found are reportet. Parameter rstack is a ;; reference to the current regions stack ;; ;; Return value: returns number of errors which were found in the expression ;; ;; ****************************************************************************************** (defgeneric check_expression (args (RegionStack_ref rstack)) (return int) (methods IIR_FunctionCall IIR_SimpleReference IIR_AccessReference IIR_ArrayReference IIR_ArrayRange IIR_ExplicitRange IIR_OthersIndexedAssociation IIR_RangeIndexedAssociation IIR_SingleIndexedAssociation IIR_SliceReference IIR_RecordReference IIR_Expression IIR_ExpressionList IIR_ArrayAggregate IIR_RecordAggregate IIR_AttrSigFunc IIR_ArrayLiteralExpression IIR_TypeConversion IIR_QualifiedExpression )) ;; Returns kind of operator: ;; NO_OP if the function does not denote an operator ;; PREDEF_OP if the funcion denotes an predefined VHDL operator ;; BASIC_OP if the function denotes an operator defined in an ;; IEEE library (e.g. numeric_std) ;; OP else (defgeneric get_operator_type (return op_type) (methods IIR_FunctionDeclaration IIR_ProcedureDeclaration )) (defextension IIR_Declaration ( ;; Stores information about what must be checked at runtime (RuntimeCheckFlags runtime_checks) )) ;; Some additional informations for all kind of nodes (defextension IIR_Root ( ;; stores which kinds of optimization has been applied on node (int done (= "0")) ;; stores the uppermost declarative region to which the ;; object/declaration/expression is static. E.g., if a constant is ;; delcared within a process and initilized with a generic ;; parameter then static_declarative_region is set to the entity ;; declarative region (because the constant value is static with ;; respect to the entity). Note that the value is set to NULL if ;; the object/declaration/expression is not static at all! (IIR_DeclarativeRegion static_declarative_region (= "NULL")) )) ;; Some additional information for library units (e.g., entity, ;; architecture, configuration, package, package body) (defextension IIR_LibraryUnit ( ;; stores whether code shall be omitted for this library unit. In ;; some case (e.g., if an entity if overwritten by another entity) ;; no code is generated for a specific library unit. (bool generate_code (= "true")) )) ;; Some additional information about expressions and some literals nodes (defextension IIR_Expression ( (StaticDataType folded_value) ;; Stores long long int/double value of a plain contant (bool valid_folded_value (= "false")) ;; folded_value contains an valid value ;; Stores information about what must be checked at runtime (RuntimeCheckFlags runtime_checks) )) (defextension IIR_Literal ( (StaticDataType folded_value) ;; Stores long long int/double value of a plain contant (bool valid_folded_value (= "false")) ;; folded_value contains an valid value )) (defextension IIR_EnumerationLiteral ( (StaticDataType folded_value) ;; Stores long long int/double value of a plain contant (bool valid_folded_value (= "false")) ;; folded_value contains an valid value )) (defextension IIR_PhysicalUnit ( (StaticDataType folded_value) ;; Stores long long int/double value of a plain contant (bool valid_folded_value (= "false")) ;; folded_value contains an valid value )) (defextension IIR_Type ( ;; Stores information about what must be checked at runtime (RuntimeCheckFlags runtime_checks) )) (defextension IIR_Subtype ( ;; Anonymous types may be converted into a declared type via an ;; implicit type declaration. Then, this slots points to the ;; corresponding declaration. (V2CC_ImplicitSubtypeDeclaration implicit_subtype_declaration (="NULL")) )) ;; stores the index number of the corresponding wait_info object which ;; connected with the wait statement (defextension IIR_WaitStatement ((int wait_info_index))) ;; stores the index number of the corresponding wait_info object which ;; connected with a procedure call statement that contains a wait. (defextension IIR_ProcedureCallStatement ((int wait_info_index))) (defextension IIR_DeclarativeRegion ( ;; Stores context information about the declaration region (ContextInfo context) ;; Includes all "normal" declarations of the current declaration ;; list and additional implicit type declarations. (IIR_DeclarationList extended_declarations (="NULL")) )) (defextension IIR_EntityDeclaration ( ;; Includes all "normal" declarations of the current declaration ;; list and additional implicit type declarations. (IIR_DeclarationList extended_generic_clause (="NULL")) (IIR_DeclarationList extended_port_clause (="NULL")) )) (defextension IIR_SubprogramDeclaration ( ;; Includes all "normal" declarations of the current declaration ;; list and additional implicit type declarations. (IIR_DeclarationList extended_interface_declarations (="NULL")) )) (defextension IIR_ConcurrentStatement ( ;; Store all additional parameters required by the constructors of ;; the corresponding C++ classes. (IIR_DeclarationList extended_interface_declarations (="NULL")) )) (defextension IIR_BlockStatement ( ;; Includes all "normal" declarations of the current declaration ;; list and additional implicit type declarations. ;; Includes all "normal" declarations of the current declaration ;; list and additional implicit type declarations. (IIR_DeclarationList extended_generic_clause (="NULL")) (IIR_DeclarationList extended_port_clause (="NULL")) )) ;; Store some additional information about the array aggregat (defextension IIR_ArrayAggregate ((int dest_length) ;; length of the aggregate as determined form the aggregate subtype (int dest_left) ;; left bound of aggregate as determined from the agregate subtype (int dest_right) ;; right bound of aggregate as determined from the agregate subtype (IR_Direction dest_direction) ;; direction of aggregate as determined from the agregate subtype (bool named_association) ;; is true when the aggregate uses named association (bool known_subtype) ;; is true if subtype of aggregate is known from the context (bool has_others) ;; aggregat includes an others choice (bool locally_static_ranges) ;; true if all index ranges of the choices are locally static (int total_length) ;; total number of array elements (can be determined only if locally_static_ranges=true) (int min_index) ;; minimal index number among all choices (if determinable, i.e. locally_static_ranges=true) (int max_index))) ;; maximal index number among all choices (if determinable, i.e. locally_static_ranges=true) ;; Some additional information about a specific indexed association (defextension IIR_IndexedAssociation ((bool locally_static_range) ;; true if all choices are locally range (int length) ;; number of elements (can be determined only if locally_static_range=true) (int min_index) ;; minimal index number among all choices (if determinable, i.e. locally_static_range=true) (int max_index))) ;; maximal index number among all choices (if determinable, i.e. locally_static_range=true) (defextension IIR_EnumerationType ((int enum_item_number))) ;; number of enumeration items (defextension IIR_ObjectDeclaration ((bool alias_check_bounds) ;; bounds must be checked at runtime )) (defextension IIR_LoopStatement ((bool next_statement_used (= "false")) ;; stores whether a next statement was used for this loop (bool exit_statement_used (= "false")) ;; stores whether a exit statement was used for this loop (int loop_id (= "-1")) ;; number used to create unique labels for loops )) (defextension IIR_ProcessStatement ( ;; is true when the process includes (directly or indirectly) a ;; wait statement (bool has_wait (= "false")) ;; is true when the process includes (directly or indirectly) a ;; wait statement with an "for" clause (bool has_wait_for (= "false")) )) (defextension IIR_ProcedureDeclaration ( ;; is true when the process includes (directly or indirectly) a ;; wait statement (bool has_wait (= "false")) ;; is true when the procedure includes (directly or indirectly) a ;; wait statement with an "for" clause (bool has_wait_for (= "false")) )) ;; ****************************************************************************************** ;; Name: m_get_object_declaration , generic function ;; ;; Description: Returns the object declaration a reference expression ;; is based on. E.g. an expression "sig(3 downto 1)" will retrun the ;; object delcration pointer associated with "sig". Note that if the ;; prefix is a signal kind attribute then this signal attribute object ;; is returned! ;; ;; Return value: returns object declaration ;; ;; ****************************************************************************************** (defgeneric get_object_declaration (return pIIR_ObjectDeclaration) (methods IIR_ObjectReference IIR_SimpleReference IIR_SliceReference IIR_SignalAttr IIR_ArrayReference IIR_RecordReference )) ;; ****************************************************************************************** ;; Name: V2CC_InternalObjectDeclaration, node ;; ;; Description: A new declaration node type for internal objects which ;; are created by the code generator. Nothe that internal objects are ;; introduced by the code generation phase. They are needed by the ;; generated code in order to successfully map VHDL code to C++. ;; ;; ;; ;; ****************************************************************************************** (defnode V2CC_InternalObjectDeclaration (IIR_ObjectDeclaration) ( ;; C++ type of the object plotted into a string. Note that if this ;; string is empty then the type of the object is defined by the ;; subtype slot of the inherited IIR_ObjectDeclaration class. (string cpp_type_string) ;; Initial value of the object. If the string is empty then the ;; initial value may be specified by the corresponding expression ;; pointer of the base class. (string cpp_initial_string) ;; Some additional information may be stored here (int flags) )) ;; ****************************************************************************************** ;; Name: V2CC_ImplicitSignalDeclaration, node ;; ;; Description: A new declaration node type implicitly generated ;; signals. Servers as a base type for several derived implicit ;; signal types ;; ;; ****************************************************************************************** (defnode V2CC_ImplicitSignalDeclaration (IIR_SignalDeclaration) ()) ;; ****************************************************************************************** ;; Name: V2CC_ImplicitSignalDeclaration_WaitFor, node ;; ;; Description: An implicit signal which is used to implement wait ;; for clauses of wait statements ;; ;; ****************************************************************************************** (defnode V2CC_ImplicitSignalDeclaration_WaitFor (V2CC_ImplicitSignalDeclaration) ()) ;; ****************************************************************************************** ;; Name: V2CC_ImplicitSignalDeclaration_Transaction, node ;; ;; Description: An implicit signal which is used to implement the ;; 'transaction functionality of VHDL ;; ;; ****************************************************************************************** (defnode V2CC_ImplicitSignalDeclaration_Transaction (V2CC_ImplicitSignalDeclaration) ()) ;; ****************************************************************************************** ;; Name: V2CC_InternalCode, node ;; ;; Description: Stores generated C++ code sequences which shall be ;; printed to the output file. Usually, it is used to store code ;; generated from VHDL subprograms declarations. ;; ;; ;; ****************************************************************************************** (defnode V2CC_InternalCode (IIR_ObjectDeclaration) ( ;; Header code (string cpp_header_string) ;; Implementation code (string cpp_impl_string) ;; Some additional information may be stored here (int flags)) ) ;; ****************************************************************************************** ;; Name: V2CC_ImplicitSubtypeDeclaration ;; ;; Description: A subtype declaration which is created by the code ;; generator from a implicit type declaration. E.g., for a declaration ;; "variable v : bit_vector(0 to 7);" an anonymous type "subtype ;; anonymous_type is bit_vector(0 to 7)" is generated and used in the ;; subsequent variable declaration. ;; ;; ****************************************************************************************** (defnode V2CC_ImplicitSubtypeDeclaration (IIR_SubtypeDeclaration)()) ;; ****************************************************************************************** ;; Name: V2CC_ImplicitInterfaceSubtypeDeclaration ;; ;; Description: A subtype declaration which is created by the code ;; generator from a implicit type declaration. E.g., for a declaration ;; "variable v : bit_vector(0 to 7);" an anonymous type "subtype ;; anonymous_type is bit_vector(0 to 7)" is generated and used in the ;; subsequent variable declaration. ;; ;; ****************************************************************************************** ;;(defnode V2CC_ImplicitInterfaceSubtypeDeclaration (IIR_InterfaceDeclaration)()) ;; ****************************************************************************************** ;; Name: m_qid , generic function ;; ;; Description: Returns get a fully qualified identifier name plus an ;; appropriate prefix. I.e., if a identifier is used at a location in ;; the code where it is not directly visible then some prefix code is ;; needed in order to access it. E.g., if a generic parameter is used ;; within process then it is accessed using a architecture pointer as ;; the parameter is not directly visible within the process. parameter ;; rstack determines the code region where the identifier is to be ;; used. Parameter obj_access defines how the identifier is accessed. ;; ;; Return value: returns fully qualified string ;; ;; ****************************************************************************************** (defgeneric qid (args (RegionStack_ref rstack) (id_type obj_access)) (return string) (methods IIR_LibraryUnit IIR_Declaration IIR_SignalDeclaration IIR_InterfaceDeclaration IIR_SignalInterfaceDeclaration V2CC_ImplicitSignalDeclaration_WaitFor IIR_ObjectDeclaration IIR_SignalDeclaration IIR_SubprogramDeclaration IIR_TypeDeclaration IIR_Subtype IIR_Type )) ;; ****************************************************************************************** ;; Name: m_get_type_info_obj , generic function ;; ;; Description: Returns type info object for a type or subtype. If the ;; (sub)type is anonymous then code which generates a new type info ;; objects is returned. static_object controls whether a new created ;; info object shall be static (i.e., it is never removed) or not. ;; ;; Return value: string ;; ;; ****************************************************************************************** (defgeneric get_type_info_obj (args (RegionStack_ref rstack) (bool static_object)) (return string) (methods IIR_EnumerationType IIR_IntegerType IIR_PhysicalType IIR_FloatingType IIR_ScalarSubtype IIR_RecordSubtype IIR_Subtype IIR_ArrayType IIR_ArraySubtype IIR_AccessType IIR_FileType IIR_RecordType )) ;; ****************************************************************************************** ;; Name: m_get_discrete_range , generic function ;; ;; Description: Returns an array of RangeDescriptors derived from the ;; first parameter. Note that usually this function is called to ;; determine the bounds on an scalar type or the index bounds on an ;; array. In most cases it will return an array containing only a ;; single element. However, when called to extract the index ranges ;; from an array several RangeDescriptors may be returned where each ;; one covers one index range. ;; ;; Return value: RangeDescriptor (see v2cc.h) ;; ;; ****************************************************************************************** (defgeneric get_discrete_range (args (RegionStack_ref rstack) (IR_StaticLevel slevel)) (return RangeDescriptor_vec) (methods IIR_EnumerationType IIR_IntegerType IIR_PhysicalType IIR_FloatingType IIR_ScalarSubtype IIR_ExplicitRange IIR_SliceReference IIR_ArrayType IIR_ArraySubtype IIR_Attr_ArrayRANGE IIR_Attr_ArrayREVERSE_RANGE )) ;; ****************************************************************************************** ;; Name: m_get_static_level , generic function ;; ;; Description: Determines static level of an type or expression ;; ;; Return value: returns static level ;; ;; ****************************************************************************************** (defgeneric get_static_level (args (RegionStack_ref rstack)) (return IR_StaticLevel) (methods IIR_Type IIR_Expression)) ;; ****************************************************************************************** ;; Name: m_constant_fold , generic function ;; ;; Description: performs constant folding optimizations on nodes ;; ;; Return value: returns number of errors found during folding ;; ;; ****************************************************************************************** (defgeneric constant_fold (args (RegionStack_ref rstack)) (return int) (methods IIR_Type IIR_PhysicalType IIR_ScalarSubtype IIR_ArrayType IIR_ArraySubtype IIR_AttrSigFunc IIR_ArrayLiteralExpression IIR_EnumLiteralReference IIR_FunctionCall IIR_SimpleReference IIR_ArrayReference IIR_ArrayRange IIR_AttrArrayFunc IIR_AttrTypeFunc IIR_AttrTypeValue IIR_ExplicitRange IIR_OthersIndexedAssociation IIR_SingleIndexedAssociation IIR_RangeIndexedAssociation IIR_SliceIndexedAssociation IIR_SliceReference IIR_RecordReference IIR_Expression IIR_TypeConversion IIR_ExpressionList IIR_ArrayAggregate IIR_RecordAggregate IIR_FloatingPointLiteral IIR_IntegerLiteral IIR_AbstractLiteralExpression IIR_PhysicalLiteral IIR_EnumerationLiteral IIR_PhysicalUnit IIR_QualifiedExpression IIR_Allocator )) ;; ****************************************************************************************** ;; Name: m_optmize , generic function ;; ;; Description: performs some optimizations ;; ;; Return value: void ;; ;; ****************************************************************************************** (defgeneric optimize (args (RegionStack_ref rstack)) (methods IIR_PredefinedFunctionDeclaration IIR_SubprogramDeclaration IIR_EntityDeclaration IIR_Type IIR_ArchitectureDeclaration IIR_ConcurrentStatementList IIR_ProcessStatement IIR_PackageDeclaration IIR_PackageBodyDeclaration IIR_ConfigurationDeclaration IIR_ComponentDeclaration IIR_ComponentInstantiationStatement IIR_ConcurrentGenerateIfStatement IIR_ConcurrentGenerateForStatement )) freehdl-0.0.7/v2cc/HACKING.v2cc0000644000175000017500000001122707216042566012543 000000000000000. Introduction --------------- This files shortly introduces the code structure of the v2cc code generator. The code generator is responsible for creating C++ code from the parsed VHDL node tree generated by vaul. 1. Source files of v2cc ----------------------- The source files v2cc (actually, the executable is named freehdl-v2cc) is build from are: - v2cc-util.cc and v2cc-util.h: these files define and implement common functions within the code generator. E.g., they contain functions to convert integers, doubles, longs to string and vice versa. - v2cc-chunk.t: contains definitions of all v2cc specific methods and slots added to the vaul/FIRE parser nodes. - v2cc-const-fold.cc: contains generic methods to perform constant folding on the nodes generated by vaul. - v2cc-explore.cc: generic methods to analyze the node tree and to collect various information from the VHDL model, e.g. which signals are accessed or written by which processes. Further, these methods perform all necessary and required error checking. I.e., if the model passed this stage then all compile time detectable errors should have been identified. Hence, no further checking is necessary by the remaining methods. - v2cc-decl.cc: generic methods to generate C++ code from the vaul nodes. This methods are actually called after the node tree has been constructed from the VHDL source. They call the other nodes in order to generate all required C++ code. - v2cc-acl.cc: generic methods to extract acl code from various expressions. - v2cc-get-type-info.cc: generic methods to emit type info code. Type infos are used by the generated code to hold information about types (e.g., left and right bound). They are especially use to store the bounds of arrays. - v2cc-qid.cc: generic methods to emit qualified identifier C++ names. All VHDL identifiers are finally mapped to corresponding C++ classes, objects, or functions. As the naming conventions and visibility rules of VHDL and C++ differ all VHDL objects and declarations get assigned an unique C++ name which does does not only contain the identifier name but also the name of the declarative region. E.g., a variable "var" declared in a process "proc" of an architecture "arch" belonging to entity "ent" will be assigned the C++ name "L3ent_A4arch_P4proc_V3var". - v2cc-expr.cc: generic methods to emit C++ code for expression nodes. - v2cc-impl.cc: generic methods to output the implementation of the C++ classes and functions while the definitions are created by methods defined in v2cc-decl.cc. - v2cc.cc: contains the main program and some auxiliary class and function implementations. - v2cc.h: defines a couple of commonly used data structures, constants and instances. 2. v2cc execution ----------------- When v2cc is executed it will first initialize various data structures and then call vaul to parse the VHDL source file. The resulting node tree is then passed over to the actual code generation routines. The main generic code generation methods are called as follows: - emit_decl: this is the main method which controls C++ code generations. Under control of emit_decl the generic methods explore_and_check, emit_hdr and emit_impl are executed in the following order 1. explore_and_check: it is responsible for error checking, constant folding and collection of information required by the code generation process. explore_and_checks mainly executes the following methods in order to perform its tasks: - explore_and_check (recursively) - get_context: collection information - constant_fold: perform constant folding - check_expression: error check expressions Note that information collection, constant folding and expression checking are usually executed on all descendents of a node when a node is visited by explore_and_check. However, the actual processing strongly depends on the node type. See v2cc-explore.cc for more information on this. 2.- emit_impl: if no errors were found then the actual code generation phase starts executing emit_impl. This will generate the implementation C++ code. I.e., code for class methods as well as normal functions are created. Note that these generic methods are executed BEFORE emit_hdr (which generates the corresponding class declarations and function prototypes) because during emit_impl some internal objects may be created which (of course) has also to be declared in emit_hdr. 3. emit_hdr: output the definitions of classes and functions generated from the VHDL source. Please note that this list does not cover all generic methods which are called during code generation. It should give only a short overview how the code generation actually works. For more details browse through the source code. freehdl-0.0.7/v2cc/x.vhdl0000644000175000017500000000265310100214543012027 00000000000000----------------------------------------------------------- -- Example VHDL file ----------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity model is generic (gen : integer := 10); port (port_sig1:bit_vector(15 downto 0)); end model; -- This is a comment --use work.all; architecture struct of model is --type myarray is array (positive range <>) of integer; type color is ('z', black, wihte, red, green, yellow, blue); signal col : color := 'z'; subtype kol is bit_vector(0 to 7) ; type lop is array (5 downto 2) of integer; type lop1 is array (0 to 1) of kol; type lop11 is array (0 to 2) of lop1; signal int1: integer := 4; signal a : std_logic_vector(1 to 16):= "0001110110011111"; signal b : std_logic_vector(1 to 16):= (1|2|4|8|12|15 => '1', others =>'0'); signal c : std_logic_vector(1 to 16):= (others => '0'); signal a1 : bit_vector(15 downto 0) := "1011110110011111"; signal b1 : bit_vector(15 downto 0) := (0|2|4|6|8|10 => '1', others =>'0'); signal c1 : bit_vector(15 downto 0) := (others => '1'); signal d1 : bit_vector(0 to 7) := "10011101"; signal int : integer := 4; signal clk : bit; constant const: integer:= 5; signal col1: color := blue; constant ccc : integer := gen; begin p: process (int) procedure proc(a : in integer) is begin report "message!"; end proc; begin int <= int + 1 after 10 ns; end process; end struct; freehdl-0.0.7/v2cc/y.vhdl0000644000175000017500000000316107620474306012045 00000000000000----------------------------------------------------------- -- Example VHDL file ----------------------------------------------------------- ----------------------------------------------------------- -- Example VHDL file ----------------------------------------------------------- -- A simple 8 bit adder entity adder2 is -- Currently, no generics are supported generic (gen : integer := 10); port (a, b : in bit_vector(1 to 8); q : out bit_vector(1 to 8)); end adder2; architecture arch of adder2 is begin p: process (a,b) variable ov : bit; begin ov := '0'; for i in 8 downto 1 loop q(i) <= a(i) xor b(i) xor ov; if (a(i) = '1' and b(i) = '1') or (ov = '1' and b(i) = '1') or (a(i) = '1' and ov = '1') then ov := '1'; else ov := '0'; end if; end loop; end process; end arch; use WORK.adder2; -- testbench to test the adder entity model is end model; -- This is a comment architecture struct of model is signal asig, bsig, qsig, qsig2 : bit_vector(1 to 8) := (3 | 4 | 6 => '1', others => '0'); signal clk : bit := '0'; --signal x : integer :=8; component adder2 -- Currently, no generics are supported port (a, b : in bit_vector(1 to 8); q : out bit_vector(1 to 8)); end component; begin -- Instantiate the adder circuit addcomp: adder2 port map(a => asig, b => bsig, q => qsig); addselect: adder2 port map(a => asig, b => bsig, q => qsig2); clk <= not clk after 10 ns; process begin -- Generate some test vectors for the -- adder asig <= (not asig(8)) & asig(1 to 7); bsig <= asig(2 to 8) & (not bsig(1)); wait until clk = '1'; end process; end struct; freehdl-0.0.7/v2cc/z.vhdl0000644000175000017500000000561007101611561012035 00000000000000----------------------------------------------------------- -- Example VHDL file -- Just a dummy test file! Does not do anything useful! ----------------------------------------------------------- entity ttt is -- Currently, no generics are supported port (i1 : inout integer; b1 : inout bit); end ttt; architecture arch of ttt is begin i1 <= i1 + 1 after 10 ns; b1 <= not b1 after 10 ns; end arch; entity tveccomp is -- Currently, no generics are supported port (bvec : inout bit_vector(0 to 7)); end tveccomp; architecture arch of tveccomp is begin bvec <= (not bvec(0)) & bvec(1 to 6) & (not bvec(7)) after 20 ns; end arch; entity model is -- Currently, no generics are supported -- generic (g1 : bit := '0'; g2 : integer := 1000); port (port_sig1 : inout integer; port_sig2 : bit); end model; -- This is a comment architecture struct of model is constant zero : bit := '0'; signal vec, vec2, vv1, vv2, vv3, yyy : bit_vector(0 to 7); signal aaa : bit_vector(3 downto 0) := "1010"; signal bbb, ccc, ddd : bit_vector(0 to 3) := "1100"; signal zzz, rvec : bit_vector(15 downto 0) := "1100110110110000"; signal a0, a1, a3 : bit := zero; signal int1, int2, int3, int4 : integer; signal init_vec : bit_vector(7 downto 1) := (others => '1'); signal zzzvec : bit_vector(8 downto 1) := (others => '1'); type color is (red, yellow, green); type int_vec is array(0 to 3) of integer; type array2d is array(color) of int_vec; signal vec2d : array2d; begin vvv: process (int3) begin int3 <= int3 + 1 after 10 ns; end process; int4 <= int4 + 2 after 10 ns; comp1: entity WORK.ttt port map(i1 => int1, b1 => vv3(0)); comp2: entity WORK.ttt port map(int2, vv3(7)); comp3: entity WORK.tveccomp port map(zzzvec); process begin if init_vec(5 downto 1)'event then a0 <= not a0 after 30 ns; end if; if init_vec(5 downto 1)'active and a0'active then a0 <= not a0 after 30 ns; end if; vec <= zzz(15 downto 8); ccc <= ccc(0 to 2) & '1'; vec2 <= aaa & zzz(15 downto 12); port_sig1 <= port_sig1 + 1; if vec(3) = vec(2+2) then port_sig1 <= port_sig1 + 2; end if; for i in 0 to 7 loop yyy(i) <= vec(i); end loop; wait on a0; end process; p2: process constant const : integer := 1; variable intvar : integer := const; variable vecvar : bit_vector(0 to 7) := "11011011"; begin vv1 <= "00000000"; wait on a0; vv1 <= vecvar; wait on a0; vv1(0) <= '0'; wait on a0; intvar := 0; end process; rot: process begin rvec <= rvec(14 downto 0) & rvec(2**4-1) after 10 ns; ddd <= ddd(3) & ddd(2) & ddd(1) & ddd(0) after 10 ns; wait on rvec; end process; twodim_process: process begin vec2d <= (red => (others => -1), yellow => (others => 0), green => (others => 1)); wait on vec2d; loop vec2d(red) <= vec2d(yellow) after 10 ns; vec2d(yellow) <= vec2d(green) after 10 ns; vec2d(green) <= vec2d(red) after 10 ns; wait on vec2d; end loop; end process; end struct; freehdl-0.0.7/v2cc/adder.vhdl0000644000175000017500000000174407152736376012671 00000000000000----------------------------------------------------------- -- Example VHDL file ----------------------------------------------------------- ----------------------------------------------------------- -- A simple generic adder -- -- INSTRUCTIONS: -- Compile this module with -- "gvhdl -c adder.vhdl" ----------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity adder is -- Currently, no generics are supported port (a, b : in std_logic_vector; q : out std_logic_vector); end adder; architecture arch of adder is begin p: process (a,b) variable ov : std_ulogic; variable av, bv, qv : std_logic_vector(0 to a'length - 1); begin av := a; bv := b; ov := '0'; for i in av'high downto 0 loop qv(i) := av(i) xor bv(i) xor ov; if (av(i) = '1' and bv(i) = '1') or (ov = '1' and bv(i) = '1') or (av(i) = '1' and ov = '1') then ov := '1'; else ov := '0'; end if; end loop; q <= qv; end process; end arch; freehdl-0.0.7/v2cc/error.vhdl0000644000175000017500000000622507605303724012730 00000000000000package mypack is type bvec2d is array (0 to 1, 0 to 1) of bit; end package; use work.mypack.all; entity adder is -- Currently, no generics are supported generic (gen1, gen2 : bit_vector (1 to 3)); port (x : in bit_vector(1 to 4); y : in bvec2d); end adder; architecture arch of adder is signal a, b, q : bit_vector(1 to 8); begin p: process (a,b) variable ov : bit; begin ov := '0'; end process; end arch; use work.mypack.all; entity ccc is port (a : out bit_vector(0 to 3)); end ccc; architecture arch of ccc is begin a <= "0001"; end arch; -- This design is used to test the error detection -- routines of the compiler. Note that it contains -- a lot if illegal code! use work.mypack.all; entity tveccomp is -- Currently, no generics are supported generic (gen : integer); port (bvec : inout bit_vector(0 to 7)); end tveccomp; use work.ccc; use work.adder; architecture arch of tveccomp is type colors is (red, green, yellow, black, wheat, white); subtype colors2 is colors range green to yellow; subtype myint is positive range gen to 200; subtype bvec_type is bit_vector(1 to 10); subtype bvec_type2 is bvec_type(0 to 11); subtype bvec_type3 is bit_vector(1 to 3); signal clk : bit; signal int1 : positive; signal int2 : myint := 300; signal col1 : colors; signal col2 : colors2; signal sig1 : bit_vector(0 to 3); signal sig2 : bit_vector(0 to 3); signal ysig : bvec2d; signal xsig : bit_vector(2 downto 0); begin process (clk) variable t : time; constant creal : real := -1.0; variable cpos : positive; variable bbb : bvec_type3; function func return positive is subtype myint2 is myint range 1 to 200; variable var : myint2; begin var := 0; return -1; end func; begin case int1 is when 2 => clk <= not clk; when 10 => clk <= not clk; when 12 => clk <= not clk; when 100 => clk <= not clk; end case; case int2 is when 100 to 140 => clk <= not clk; when 141 to 180 => clk <= not clk; end case; case col1 is when red => clk <= not clk; when red to black => clk <= not clk; end case; case col1 is when others => clk <= not clk; when red => clk <= not clk; end case; case col2 is when green => clk <= not clk; end case; t := time(int1); cpos := positive(creal); case bbb is when "001" => clk <= not clk; when "1001" => clk <= not clk; when "011" | "001" => clk <= not clk; when "011" to "001" => clk <= not clk; when others => clk <= not clk; end case; case bbb is when "001" => clk <= not clk; when "011" | "010" => clk <= not clk; end case; bbb := "1111"; end process; qq2: entity ccc port map ( a(0 to 2) => sig2(1 to 2), a(0 to 1) => sig2, a(2 to 3) => sig2(1 to 2) ); qq1: entity ccc port map ( a(0) => sig1(0), a(1) => sig1(1), a(2) => sig1(2), a(4) => sig1(3) ); qq3: entity adder generic map ( gen1 => "11111", gen2(1) => '0', gen2(2) => '0', gen2(3) => '0', gen2(1) => '0' ) port map( x(4) => xsig(0), x(1) => xsig(0), --x(2) => xsig(1), x(4) => xsig(0), x(3) => xsig(2), y(0,0) => ysig(0,0), --y(0,1) => ysig(0,1), y(1,0) => ysig(1,0), y(0,0) => ysig(0,0), y(1,1) => ysig(1,1) ); end arch; freehdl-0.0.7/v2cc/model.vhdl0000644000175000017500000000124507152511220012661 00000000000000-- testbench to test the adder entity model is end model; -- This is a comment architecture struct of model is signal asig, bsig, qsig : bit_vector(0 to 7) := (3 | 4 | 6 => '1', others => '0'); signal clk : bit := '0'; --signal x : integer :=8; begin clk <= not clk after 10 ns; process variable var : integer; procedure proc is variable v : integer := 1; begin report "this is another test message!"; var := var + v; end proc; begin -- Generate some test vectors for the -- adder asig <= (not asig(7)) & asig(0 to 6); bsig <= asig(1 to 7) & (not bsig(1)); report "this is a test message!"; proc; wait until clk = '1'; end process; end struct; freehdl-0.0.7/v2cc/model4.vhdl0000644000175000017500000000100407160410445012744 00000000000000-- testbench to test the adder library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity model4 is end model4; -- This is a comment architecture struct of model4 is signal data1, result : unsigned(0 to 7) := (others => '0'); signal data2 : unsigned(0 to 7) := (7 => '1', others => '0'); signal clk : bit; begin clk <= not clk after 10 ns; process begin result <= result + data2; data1 <= (data1(0 to 6) & data1(0)) - result; wait on clk until clk = '1'; end process; end struct; freehdl-0.0.7/v2cc/model5.vhdl0000644000175000017500000000252007166601224012754 00000000000000library ieee; use ieee.std_logic_1164.all; entity model is end model; architecture struct of model is signal clk : bit; signal clk2 : std_logic; type myarray is array(0 to 1, -1 to 3) of integer; subtype bvec_type is bit_vector(1 to 4); type UNSIGNED is array (NATURAL range <>) of STD_LOGIC; type SIGNED is array (NATURAL range <>) of STD_LOGIC; function SHL(ARG: UNSIGNED; COUNT: UNSIGNED) return UNSIGNED is -- synopsys subpgm_id 358 constant control_msb: INTEGER := COUNT'length - 1; variable control: UNSIGNED (control_msb downto 0); constant result_msb: INTEGER := ARG'length-1; subtype rtype is UNSIGNED (result_msb downto 0); variable result, temp: rtype; begin -- synopsys synthesis_off -- if (control(0) = 'X') then -- result := rtype'(others => 'X'); -- return result; -- end if; -- synopsys synthesis_on result := ARG; for i in 0 to control_msb loop if control(i) = '1' then temp := rtype'(others => '0'); if 2**i <= result_msb then temp(result_msb downto 2**i) := result(result_msb - 2**i downto 0); end if; result := temp; end if; end loop; return result; end; begin process variable vec : bit_vector(7 downto 1); begin vec(6 downto 1) := (others => '0'); wait until clk = '1'; if rising_edge(clk2) then clk <= not clk; end if; end process; end struct; freehdl-0.0.7/v2cc/top.vhdl0000644000175000017500000000252107261600166012372 00000000000000----------------------------------------------------------- -- Example VHDL file ----------------------------------------------------------- ----------------------------------------------------------- -- A simple generic adder testbench -- -- INSTRUCTIONS: -- First, compile module adder. Then execute -- "gvhdl top.vhdl adder.o ../ieee/std_logic_1164.o -- This will create a simulator "top" for module top. ----------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity top is port(x, y, z: in bit_vector(15 downto 0) := (others => '0'); v : out std_logic_vector(7 downto 0) := (others =>'1')); end top; use work.adder; architecture arch of top is signal a : std_logic_vector(1 to 16) := "0001110110011111"; signal b : std_logic_vector(1 to 16) := (1|2|4|8|12|15 => '1', others =>'0'); signal c : std_logic_vector(1 to 16) := (others => '0'); signal al, ah : std_logic_vector(0 to 7); signal clk : bit; begin clk <= not clk after 10 ns; addcomp1: entity adder port map (a => a, b => b, q => c); addcomp2: entity adder port map (a => al, b => ah, q => v); -- generate input values p: process (clk) begin if clk'event and clk = '1' then a <= a(2 to 16) & a(1); b <= b(2 to 16) & b(1); ah <= c(1 to 8) after 3 ns; al <= c(9 to 16) after 3 ns; end if; end process; end arch; freehdl-0.0.7/README0000644000175000017500000000442407406755746010760 00000000000000This is a early test release of the FreeHDL package. As such, nothing is final yet and everything is bound to be changed. Please tell us everything that you don't like about this package so that we can improve it. You are also allowed to tell us about the things that you do like, of course, so that we don't make them worse. Installation ------------ This package should behave like a regular GNUish package. Generic installation instructions for such a package can be found in the file INSTALL. Right now, there is only enough documentation to get you to run the included example. Further, some additional info about the compiler/simulator (e.g. a list of supported VHDL constructs) can be found in README.v2cc. Pick a suitable place to install this package in. The default is /usr/local. Then run % ./configure --prefix % make % make install The last step will create some directories below and will put the created programs and some data files there. However, if you prefer *not* to install the package (currently the simulator is very limited, hence you will not be able to use it for "real" work!) check out README.v2cc for some additional info on how to execute the compiler/simulator. Further, if your computer should run out of memory during compilation run "make CXXFLAGS=-g" instead of just "make". You must make sure that the installed files can be found by your system (otherwise you will only be able to compile an execute models copied to the v2cc subdirectory). That is, the directory /bin should be on your path and your linker should be able to find libraries in /lib. We are not yet ready to isolate you from these technicalities. Running the example ------------------- See file "README.v2cc" for some information on how to compile/run the example vhdl models. Where to send bug reports / suggestions / comments -------------------------------------------------- If your report addresses a parser related topics then contact Marius Vollmer . If it is related to the code generator or compiler then send an email to Edwin Naroska . If your are not sure send it to Edwin. He will take care of forwarding your report to the appropriate recipient. freehdl-0.0.7/configure.ac0000644000175000017500000000426511066755366012364 00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(freehdl,0.0.7,edwin@ds.e-technik.uni-dortmund.de) AC_CONFIG_SRCDIR([freehdl/fire-chunk.t]) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([no-define]) AM_MAINTAINER_MODE AC_PREFIX_DEFAULT([/usr/local]) test "x$prefix" = xNONE && prefix="/usr/local" dnl Checks for programs. AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_YACC AM_PROG_LEX AC_PATH_PROG(PERL, perl, :) if test "$PERL" = ":"; then AC_MSG_ERROR([The $PACKAGE package needs a Perl.]) fi AC_PATH_PROG(PKGCONFIG, pkg-config, :) if test "$PKGCONFIG" = ":"; then AC_MSG_ERROR([The $PACKAGE package requires PKG-Config.]) fi AC_CHECK_TOOLS([SYSTEM_LIBTOOL], [glibtool libtool], :) if test "$SYSTEM_LIBTOOL" = ":"; then AC_MSG_ERROR([The $PACKAGE package requires an installed Libtool.]) fi AC_SUBST(SYSTEM_LIBTOOL) if test $USE_MAINTAINER_MODE = yes; then AC_PATH_PROG(GUILE, guile, :) if test "$GUILE" = ":"; then AC_MSG_ERROR([The $PACKAGE package requires a Guile.]) fi fi dnl check for header files AC_LANG_PUSH(C++) AC_CHECK_HEADERS(FlexLexer.h) AC_LANG_POP AC_CHECK_HEADERS(execinfo.h malloc.h getopt.h) dnl Check for machine architecture features AC_C_BIGENDIAN AC_CHECK_SIZEOF(int) dnl Checks for functions AC_CHECK_FUNCS(vasprintf) AC_FUNC_ALLOCA AC_CHECK_FUNCS(socket gettimeofday) AC_CHECK_FUNC(regcomp, , AC_CHECK_LIB(regex, regcomp, REGEXLIBS="-lregex")) AC_SUBST(REGEXLIBS) case $host_os in mingw*) REGEXDEFS="-D__REGEX_IMPORT__" ;; esac AC_SUBST(REGEXDEFS) dnl Solaris special. case $host_os in solaris*) GETOPTLIBS="`gcc --print-file-name=libiberty.a 2>/dev/null`" ;; esac AC_SUBST(GETOPTLIBS) AC_OUTPUT(Makefile freehdl/Makefile fire/Makefile vaul/Makefile kernel/Makefile std/Makefile v2cc/Makefile doc/Makefile ieee/Makefile FHDLgui/Makefile FHDLgui/pictures/Makefile examples/Makefile examples/v2c/Makefile cdfggen/Makefile v2cc/gvhdl freehdl.pc) dnl Print results. AC_MSG_RESULT([]) AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) AC_MSG_RESULT([]) freehdl-0.0.7/aclocal.m40000644000175000017500000103106711066755377011741 00000000000000# generated automatically by aclocal 1.8.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; 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 if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.8.5])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 4 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) freehdl-0.0.7/Makefile.am0000644000175000017500000000066110755367750012126 00000000000000## Process this file with automake to produce Makefile.in EXTRA_DIST = README.gen-nodes README.vaul README.libraries README.AIRE README.v2cc v2cc.libs HACKING SUBDIRS = freehdl fire vaul kernel std v2cc doc examples ieee FHDLgui cdfggen snap: $(MAKE) distdir="$(PACKAGE)-`date +%Y%m%d`" dist # TESTS = test-leon pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = freehdl.pc CLEANFILES = *~ MAINTAINERCLEANFILES = Makefile.in freehdl-0.0.7/Makefile.in0000644000175000017500000004764611175356641012147 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/freehdl.pc.in \ $(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \ INSTALL NEWS config.guess config.sub depcomp install-sh \ ltmain.sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = freehdl.pc SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__installdirs = "$(DESTDIR)$(pkgconfigdir)" pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETOPTLIBS = @GETOPTLIBS@ GREP = @GREP@ GUILE = @GUILE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKGCONFIG = @PKGCONFIG@ RANLIB = @RANLIB@ REGEXDEFS = @REGEXDEFS@ REGEXLIBS = @REGEXLIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_LIBTOOL = @SYSTEM_LIBTOOL@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_SYSTEM_LIBTOOL = @ac_ct_SYSTEM_LIBTOOL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ EXTRA_DIST = README.gen-nodes README.vaul README.libraries README.AIRE README.v2cc v2cc.libs HACKING SUBDIRS = freehdl fire vaul kernel std v2cc doc examples ieee FHDLgui cdfggen # TESTS = test-leon pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = freehdl.pc CLEANFILES = *~ MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) freehdl.pc: $(top_builddir)/config.status $(srcdir)/freehdl.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/v2cc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-pkgconfigDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-pkgconfigDATA \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-pkgconfigDATA snap: $(MAKE) distdir="$(PACKAGE)-`date +%Y%m%d`" dist # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freehdl-0.0.7/freehdl.pc.in0000644000175000017500000000047611066753124012426 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ cxxflags=@CXXFLAGS@ cflags=@CFLAGS@ cxx=@CXX@ libtool=@SYSTEM_LIBTOOL@ Name: FreeHDL Description: VHDL Simulator Version: @VERSION@ URL: http://freehdl.seul.org Requires: Conflicts: Libs: -L${libdir} Cflags: ${cflags} -I${includedir} freehdl-0.0.7/configure0000755000175000017500000303740211175356645012005 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for freehdl 0.0.7. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='freehdl' PACKAGE_TARNAME='freehdl' PACKAGE_VERSION='0.0.7' PACKAGE_STRING='freehdl 0.0.7' PACKAGE_BUGREPORT='edwin@ds.e-technik.uni-dortmund.de' ac_unique_file="freehdl/fire-chunk.t" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS GETOPTLIBS REGEXDEFS REGEXLIBS ALLOCA GUILE ac_ct_SYSTEM_LIBTOOL SYSTEM_LIBTOOL PKGCONFIG PERL LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP OBJDUMP AS DLLTOOL NMEDIT DSYMUTIL RANLIB AR ECHO LN_S EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__leading_dot SET_MAKE AWK mkdir_p INSTALL_STRIP_PROGRAM STRIP install_sh AMTAR MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_shared enable_static enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock with_pic with_tags ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures freehdl 0.0.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/freehdl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of freehdl 0.0.7:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF freehdl configure 0.0.7 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by freehdl $as_me 0.0.7, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 $as_echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version="1.8" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='freehdl' VERSION='0.0.7' # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE test "x$prefix" = xNONE && prefix="/usr/local" # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:$LINENO: result: $SED" >&5 $as_echo "$SED" >&6; } { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4479 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:$LINENO: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to edwin@ds.e-technik.uni-dortmund.de ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:$LINENO: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then $as_echo_n "(cached) " >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=yes # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7843: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7847: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8133: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8137: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8237: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8241: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:$LINENO: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 $as_echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 $as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13159: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13163: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13263: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13267: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14965: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14969: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17193: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17197: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17483: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17487: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17587: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17591: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 $as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 $as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:$LINENO: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 $as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:$LINENO: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_lex=$ac_lib else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_prog_lex_yytext_pointer=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=":" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:$LINENO: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$PERL" = ":"; then { { $as_echo "$as_me:$LINENO: error: The $PACKAGE package needs a Perl." >&5 $as_echo "$as_me: error: The $PACKAGE package needs a Perl." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKGCONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG=":" ;; esac fi PKGCONFIG=$ac_cv_path_PKGCONFIG if test -n "$PKGCONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5 $as_echo "$PKGCONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$PKGCONFIG" = ":"; then { { $as_echo "$as_me:$LINENO: error: The $PACKAGE package requires PKG-Config." >&5 $as_echo "$as_me: error: The $PACKAGE package requires PKG-Config." >&2;} { (exit 1); exit 1; }; } fi if test -n "$ac_tool_prefix"; then for ac_prog in glibtool libtool do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_SYSTEM_LIBTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$SYSTEM_LIBTOOL"; then ac_cv_prog_SYSTEM_LIBTOOL="$SYSTEM_LIBTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_SYSTEM_LIBTOOL="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi SYSTEM_LIBTOOL=$ac_cv_prog_SYSTEM_LIBTOOL if test -n "$SYSTEM_LIBTOOL"; then { $as_echo "$as_me:$LINENO: result: $SYSTEM_LIBTOOL" >&5 $as_echo "$SYSTEM_LIBTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$SYSTEM_LIBTOOL" && break done fi if test -z "$SYSTEM_LIBTOOL"; then ac_ct_SYSTEM_LIBTOOL=$SYSTEM_LIBTOOL for ac_prog in glibtool libtool do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_SYSTEM_LIBTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_SYSTEM_LIBTOOL"; then ac_cv_prog_ac_ct_SYSTEM_LIBTOOL="$ac_ct_SYSTEM_LIBTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_SYSTEM_LIBTOOL="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_SYSTEM_LIBTOOL=$ac_cv_prog_ac_ct_SYSTEM_LIBTOOL if test -n "$ac_ct_SYSTEM_LIBTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_SYSTEM_LIBTOOL" >&5 $as_echo "$ac_ct_SYSTEM_LIBTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_SYSTEM_LIBTOOL" && break done if test "x$ac_ct_SYSTEM_LIBTOOL" = x; then SYSTEM_LIBTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac SYSTEM_LIBTOOL=$ac_ct_SYSTEM_LIBTOOL fi fi if test "$SYSTEM_LIBTOOL" = ":"; then { { $as_echo "$as_me:$LINENO: error: The $PACKAGE package requires an installed Libtool." >&5 $as_echo "$as_me: error: The $PACKAGE package requires an installed Libtool." >&2;} { (exit 1); exit 1; }; } fi if test $USE_MAINTAINER_MODE = yes; then # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GUILE+set}" = set; then $as_echo_n "(cached) " >&6 else case $GUILE in [\\/]* | ?:[\\/]*) ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GUILE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GUILE" && ac_cv_path_GUILE=":" ;; esac fi GUILE=$ac_cv_path_GUILE if test -n "$GUILE"; then { $as_echo "$as_me:$LINENO: result: $GUILE" >&5 $as_echo "$GUILE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$GUILE" = ":"; then { { $as_echo "$as_me:$LINENO: error: The $PACKAGE package requires a Guile." >&5 $as_echo "$as_me: error: The $PACKAGE package requires a Guile." >&2;} { (exit 1); exit 1; }; } fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in FlexLexer.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to edwin@ds.e-technik.uni-dortmund.de ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_header in execinfo.h malloc.h getopt.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to edwin@ds.e-technik.uni-dortmund.de ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:$LINENO: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if test "${ac_cv_sizeof_int+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } else ac_cv_sizeof_int=0 fi ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default static long int longval () { return (long int) (sizeof (int)); } static unsigned long int ulongval () { return (long int) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (int))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (int)))) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (int)))) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } else ac_cv_sizeof_int=0 fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF for ac_func in vasprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_working_alloca_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_alloca_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in socket gettimeofday do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for regcomp" >&5 $as_echo_n "checking for regcomp... " >&6; } if test "${ac_cv_func_regcomp+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define regcomp to an innocuous variant, in case declares regcomp. For example, HP-UX 11i declares gettimeofday. */ #define regcomp innocuous_regcomp /* System header to define __stub macros and hopefully few prototypes, which can conflict with char regcomp (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef regcomp /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char regcomp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_regcomp || defined __stub___regcomp choke me #endif int main () { return regcomp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_regcomp=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_regcomp=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_regcomp" >&5 $as_echo "$ac_cv_func_regcomp" >&6; } if test "x$ac_cv_func_regcomp" = x""yes; then : else { $as_echo "$as_me:$LINENO: checking for regcomp in -lregex" >&5 $as_echo_n "checking for regcomp in -lregex... " >&6; } if test "${ac_cv_lib_regex_regcomp+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lregex $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char regcomp (); int main () { return regcomp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_regex_regcomp=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_regex_regcomp=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_regex_regcomp" >&5 $as_echo "$ac_cv_lib_regex_regcomp" >&6; } if test "x$ac_cv_lib_regex_regcomp" = x""yes; then REGEXLIBS="-lregex" fi fi case $host_os in mingw*) REGEXDEFS="-D__REGEX_IMPORT__" ;; esac case $host_os in solaris*) GETOPTLIBS="`gcc --print-file-name=libiberty.a 2>/dev/null`" ;; esac ac_config_files="$ac_config_files Makefile freehdl/Makefile fire/Makefile vaul/Makefile kernel/Makefile std/Makefile v2cc/Makefile doc/Makefile ieee/Makefile FHDLgui/Makefile FHDLgui/pictures/Makefile examples/Makefile examples/v2c/Makefile cdfggen/Makefile v2cc/gvhdl freehdl.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by freehdl $as_me 0.0.7, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ freehdl config.status 0.0.7 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "freehdl/Makefile") CONFIG_FILES="$CONFIG_FILES freehdl/Makefile" ;; "fire/Makefile") CONFIG_FILES="$CONFIG_FILES fire/Makefile" ;; "vaul/Makefile") CONFIG_FILES="$CONFIG_FILES vaul/Makefile" ;; "kernel/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;; "std/Makefile") CONFIG_FILES="$CONFIG_FILES std/Makefile" ;; "v2cc/Makefile") CONFIG_FILES="$CONFIG_FILES v2cc/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "ieee/Makefile") CONFIG_FILES="$CONFIG_FILES ieee/Makefile" ;; "FHDLgui/Makefile") CONFIG_FILES="$CONFIG_FILES FHDLgui/Makefile" ;; "FHDLgui/pictures/Makefile") CONFIG_FILES="$CONFIG_FILES FHDLgui/pictures/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/v2c/Makefile") CONFIG_FILES="$CONFIG_FILES examples/v2c/Makefile" ;; "cdfggen/Makefile") CONFIG_FILES="$CONFIG_FILES cdfggen/Makefile" ;; "v2cc/gvhdl") CONFIG_FILES="$CONFIG_FILES v2cc/gvhdl" ;; "freehdl.pc") CONFIG_FILES="$CONFIG_FILES freehdl.pc" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:$LINENO: result: $PACKAGE version $VERSION configured successfully." >&5 $as_echo " $PACKAGE version $VERSION configured successfully." >&6; } { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } freehdl-0.0.7/AUTHORS0000644000175000017500000000076110600525471011124 00000000000000Major contributors: Marius Vollmer (parser) Edwin Naroska (code generator/simulator) Said Mchaalia (VCD dumper) David Colson (testing) Philippe (FHDLgui) Stefan Jahn (testing/maintenance) Special thanks to Ed Immenschuh for his great help in porting FreeHDL to different platforms and Dave Sullins for his excellent work on the VHDL test suite! freehdl-0.0.7/COPYING0000644000175000017500000004307007046260631011113 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. freehdl-0.0.7/COPYING.LIB0000644000175000017500000006126107046260632011523 00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! freehdl-0.0.7/ChangeLog0000644000175000017500000000310611001201534011605 000000000000002008-04-15 Stefan Jahn * configure.ac: Released version 0.0.6 and bumped up to version 0.0.7. 2008-04-15 Stefan Jahn * configure.ac: Checking for gettimeofday(). Also checking for libtool, but saving result in SYTEM_LIBTOOL instead of LIBTOOL (build issue). 2008-04-10 Stefan Jahn * configure.ac: Released version 0.0.5 and bumped up to version 0.0.6. 2008-02-17 Stefan Jahn * configure.ac: Adding checks for pkg-config and libtool. 2007-04-04 Stefan Jahn * configure.ac: Released version 0.0.4 and bumped up to version 0.0.5. 2006-09-02 Stefan Jahn * configure.ac: Released version 0.0.3 and bumped up to version 0.0.4. 2006-05-29 Stefan Jahn * configure.ac: Released version 0.0.2 and bumped up to version 0.0.3. 2006-01-21 Stefan Jahn * configure.ac: Released version 0.0.1 and bumped up to version 0.0.2. 2004-09-29 Edwin Naroska * configure.in: test to check for include file "FlexLexer.h" added. 2003-07-26 Edwin Naroska * README.v2cc: file updated. 2001-10-01 Marius Vollmer * Makefile.am (TESTS): New. 2001-02-05 Edwin Naroska * configure.in (AC_HAVE_HEADERS): Check for system header file execinfo.h 2000-02-07 Marius Vollmer * configure.in (AC_INIT): Use "freehdl/fire-chunk.t" as the required source file. freehdl-0.0.7/INSTALL0000644000175000017500000001644607046260632011121 00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. freehdl-0.0.7/NEWS0000644000175000017500000000371411175357160010562 00000000000000-- -- NEWS -- -- Copyright (C) 2005, 2006, 2007, 2008, 2009 Stefan Jahn -- -- This 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, or (at your option) -- any later version. -- -- This software 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 package; see the file COPYING. If not, write to -- the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -- Boston, MA 02110-1301, USA. -- This file lists user visible changes that were made between releases. For more verbose descriptions of these and internal changes see the ChangeLog files. Version 0.0.7 ------------- * fixed segfault bug occurring with intermediate scalar in case statements * added --linker option to freehdl-config script to return the appropriate system GNU libtool (may be glibtool on MacOS) * using STDERR in gvhdl script for error messages * some segfault bugs corrected Version 0.0.6 ------------- * fixed libtool build issue * fixed mingw32 cross-compile process Version 0.0.5 ------------- * using pkg-config to allow multi-arch installations * removed freehdl-libtool dependency, using system libtool * fixed compile-errors for gcc4.3 * minor bug-fixes * added info dir entry in fire.texi * fixed compile-time error under MacOS 10.3.x (gcc3.3) Version 0.0.4 ------------- * changes copyright notices in doc/fire.texi, use GNU FDL Version 0.0.3 ------------- * implemented quiet mode for simulation binary Version 0.0.2 ------------- * build-system improvements * bug fixes in the VCD dumper Version 0.0.1 ------------- * first available version freehdl-0.0.7/config.guess0000755000175000017500000012753411034524645012410 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: freehdl-0.0.7/config.sub0000755000175000017500000010115311034524645012040 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: freehdl-0.0.7/depcomp0000755000175000017500000003541011175356623011441 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-04-25.13 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # Dependencies are output in .lo.d with libtool 1.4. # They are output in .o.d with libtool 1.5. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: freehdl-0.0.7/install-sh0000755000175000017500000002244111175356623012070 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-04-01.17 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 -d DIRECTORIES... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. test -n "$dir_arg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" || lasterr=$? # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: freehdl-0.0.7/ltmain.sh0000644000175000017500000060646011005712103011672 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.26 Debian 1.5.26-4" TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: freehdl-0.0.7/missing0000755000175000017500000002466611175356623011476 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: freehdl-0.0.7/README.gen-nodes0000644000175000017500000001343207046260632012616 00000000000000[This is the README from an early prototype of the gen-nodes tool. It is quite out of date with regard to the details, but the general ideas still apply.] This is a demonstration of my ideas about an extensible framework for representing an abstract syntax tree (actually a graph). The goal is to be able to specify a hierachy of node types and define `generic' functions on them. A generic function can have different implementations for different types. These implementations are called the methods of a generic function. The decision which method to invoke when a generic functions is called is made at run-time. We want to be able to define new generic functions without changing the definition of the types that they work on. Therefore, we can not use the virtual functions of C++. A virtual function is part of the type it works on and it is therefore necessary to change the type itself when adding new virtual functions. This means frequent and inconvenient recompilation. Furthermore, such changes to the type definitions have to be carefully coordinated when more than one party wants to make some. My proposed solution to this dilemma is to design a new, minimal OOP model and implement it in C++. To make it useable, we need a tool that generates most of the boilerplate code for us. The demonstration uses Scheme (a Lisp dialect) for implementing the boilerplate generating tool and Scheme syntax for specifying the input to it. I know that this is not the most popular thing to do, but it was easiest for me. Therefore... * You need to have Guile installed to play with the tool. Version * * 1.2 should work fine. You can find it on your local GNU mirror. * - How it works The node features are defined in `chunks'. Each chunk can contain new node type definitions and generic functions with their methods. You can also extend node types with new attributes. The chunks are independent from one-another. That is, you can mix and match chunks at link time without having to recompile them. The cornerstone of the system is `gen-nodes'. This is the tool that reads the description of a number of chunks and outputs C++ code for their implementation. - The chunk descriptions. The files that gen-nodes reads contain the description of the chunks in Scheme syntax. A chunk is started with this statement: (chunk NAME OPTS..) it ends at the end of input or when the next chunk begins. NAME should be a valid C++ identifier and unique among all chunks. You can define new node types: (defnode NAME (BASE) SLOTS... OPTS...) The NAME is the name of the node type and should be a valid and unique C++ identifier. BASE is the name of a previously defined node type that will be used as the base for the new type. You can omit BASE (but not the parentheses around it). LINKS-AND-ATTRS can specify links to other nodes (link NODE LINK-NAME) where NODE is the type of the node that is pointed to by the link named LINK-NAME. The generated C++ struct will have a member that is a pointer to a struct generated for NODE. You can also specify attributes (attr TYPE ATTR-NAME) where TYPE is string enclosed in double quotes that is a valid C++ type, such as "char*" or "int". The generated C++ struct will have a member with name ATTR-NAME and type TYPE. Generic functions are specified with (defgeneric RET-TYPE GENERIC-NAME EXTRA-ARGS) This will generate a C++ function named GENERIC-NAME with return type RET-TYPE (which should be a string just like a attribute type). The first argument of this function is a pointer to a node struct. The run-time type of this node is used to dispatch to one of the methods of this generic function, see below. The rest of the arguments of the function are specified by EXTRA-ARGS. This should be a list like ((TYPE ARG-NAME) (TYPE ARG-NAME) ...) When the generic function should not be global but be contained in a class, you specify the qualified name of it (i.e. including the class name) as a list of symbols. The qualified name "outer_class::inner_class::func" would be written as (outer_class inner_class func) Methods are defined with (defmethods GENERIC-NAME NODES...) For each of the node types listed in NODES, an individual method is defined. Methods are translated into ordinary C++ functions whose name is formed by concatenating the string "m_" and the GENERIC-NAME. Their first parameter is a pointer to the node type they belong to and the rest is specified by the EXTRA-ARGS of the generic declaration. When a generic function is invoked on a node type that has no method defined for it, the method for the nearest base type that has a method is invoked. When no such base type exists, the program is aborted. You can extend existing nodes with (extnode NODE ATTRS...) NODE is the name of the node that you want to extend and ATTRS is a list of attribute definitions, just like for defnode. For every specified attribute a function will be generated according to this template: TYPE& NAME (NODE*); TYPE is the type of the attribute, NAME is the name of the attribute and NODE is the struct generated for the extended node. The function will return a reference to the storage reserved for the attribute. You can add arbitary lines to the generated output with (header-add LINES...) and (impl-add LINES) You can split the chunk definitions into several files and use (include FILE) to include them. - Invoking gen-nodes gen-nodes CMD CHUNK IN-FILE OUT-FILE Gen-nodes reads the IN-FILE (which should contain the descriptions in the format explained above) and generates output for CHUNK in OUT-FILE, according to CMD. When CMD is `header', gen-nodes writes a header file to OUT-FILE that should be included by the users of the CHUNK. When it is `impl', it writes the implementation of CHUNK. freehdl-0.0.7/README.vaul0000644000175000017500000001333607046260632011711 00000000000000This is the source for VAUL. VAUL is cryptic for Vhdl Analyzer and Utility Library. Devlopment has been initiated in 1994 by the University of Dortmund, Department for Electrical Engineering, AG SIV, Heja BVB. Marius Vollmer has written most of it, with guidance from Ludwig Schwoerer . Part of this work is based upon work done by Thomas Dettmer and others. See the file AUTHORS for details. Many thanks to all who have contributed, especially to Professor Schrder, who has allowed me to distribute my work under the terms of the LGPL. VAUL can be used to parse and analyze arbitrary VHDL code. The result is an abstract syntax graph, which is represented as a collection of C++ objects, tightly connected by pointers. All names used in the VHDL code have been resolved to their respective declarations (including overloaded function names) and types have been checked (excluding subtype constraints). It is now a serious canditate for the VHDL frontend of the FreeHDL project, see http://www.linuxeda.com/~freehdl. * STATUS Currently, the analyzer understands enough of VHDL to successfully parse and type-check the IEEE std_logic_1164 packages (including "arith", "signed", "unsigned", "textio", etc.), the VITAL packages (timing and primitives), all models of the Free Model Foundation that I have tested, and probably much more. It generates quite useful error messages, but could do better, of course. Many minor semantic checks are not done or the details are probably incorrect. The documentation is mostly lacking, unfortunately, but things are getting better. Right now, the most useful source of information about the generated syntax graph is probably "v2c.cc", the source code of the `VHDL to pseudo-C' translator. * CONTENTS libfire/ Libfire contains the definition of the abstract syntax nodes, plus support routines. "Fire" stands for "Feeble Intermediate Representation with Extensibility". It is of course a pun on "AIRE", the "Advanced Intermediate Representation with Extensibility". I hope to make libfire AIRE compliant sometimes in the future, but right now, it is only very superficially similar to AIRE. Libfire has some unique features for extensibility that I think are superior to the proposed AIRE mechanisms. So we wont need the extensibility of AIRE for implementing useful applications of the syntax nodes, but it would still be nice to be compatible to existing and upcoming AIRE compliant software. Libfire is [will be] documented in the file `doc/libfire.texi'. libvaul/ This is the actual VHDL frontend, packaged as a library. Included is a sample application, the superficial translator from VHDL to pseudo C, "v2c". There are also a few VHDL files for testing in vlib/. PLEASE NOTE: The files in vlib/ are meant for testing ONLY and might therefore contain gratuitous errors and lies. Please get them afresh from their original sources if you want to use them for real. Libvaul uses libfire for its intermediate representation, of course. It adds some extensions of its own. Right now, the relationship between libfire and libvaul is somewhat perverted. Libfire does not contain anything really useful and the bulk of the syntax nodes is defined as `extensions' in libvaul. This will change over time, of course. doc/ Here is some documentation. * COMPILING Basically, what you do with GNU packages: % ./configure % make More complete (but generic) instructions are in INSTALL. This version uses automake/libtool as its build environment. But as long as you dont want to change the Makefiles, you don't need to have them installed. The C++ rendition of the abstract syntax node definitions is generated by a tool written in Guile Scheme. The generated files are contained in the distribution, so you shouldn't need to run the Scheme program unless you modify the definitions in the *.t files. Guile version 1.2 from your local GNU mirror should be fine. You probably need GNU C++ (2.6.3 and up) and maybe some other GNUish tools. It should compile at least on GNU/Linux, SunOS 4 and 5, maybe with some tweaking. * RUNNING There is no real documentation for the library or the example programs. The doc/ directory contains the beginnings of libfire.texi, the documentatzion for the general syntax graph support and the particular node types used by VAUL, but it is still very incomplete. But until then, here are some hints about how to run `v2c' on the sample VHDL files. There are some VHDL files in libvaul/vlib/* that can be used to test `libvaul'. Each VHDL design library is contained in a separate subdirectory. vlib/std/ The packages std.standard and std.textio. vlib/ieee/ The IEEE std_logic_1164 packages and the VITAL timing and primitive packages. vlib/fmf/ Some packages and models from the Free Model Foundation. Libvaul does not store its intermediate representation of the VHDL source code on disk. That means that whenever a design unit is needed during analysis, the source code for it has to be found and reanalyzed. Only two kinds of design units are ever needed during analysis: packages that are mentioned in USE clauses, and entities that are mentioned in binding indications. [right?] Libvaul can not find the needed source code by itself, it needs help from the application. v2c has a very simple rule for finding the source code. For a package or entity named UNIT, that is contained in a design library named LIB, it looks for "vlib/LIB/UNIT.vhd" and "vlib/LIB/UNIT.vhdl". % cd .../libvaul v2c knows that the libraries are in vlib/ % ./v2c -lfmf vlib/fmf/nlb6201.vhd `-lfmf' means: use the "fmf" library as the working library. freehdl-0.0.7/README.libraries0000644000175000017500000002005107161636010012701 00000000000000Design libraries and v2cc ------------------------- v2cc does not have a opaque notion of design libraries. VHDL files are not pre-analyzed and checked into some library data base. Instead, whenever a reference to a design unit needs to be made, v2cc parses the VHDL code of that design unit from fresh. Therefore, it needs to be able to find the source file of a design unit given the VHDL name of that unit. Thus, as far as v2cc is concerned, a design library is a mapping from VHDL identifiers to file names. There is also a mapping for getting library names from mapping files. Such a mapping is specified via a "mapping file". It contains a list of pattern rules that each transform a certain class of identifiers into file names. The syntax of a mapping file is: Lexical: litchar: 'a'..'z' | 'A'..'Z' | '0'..'9' | '_' | '/' | '-' | '.' escchar escchar: '\' char whitespace: ' ' | '\n' | '\v' | '\t' | comment comment: '#' any_character* '\n' opchar: ':' | ',' | '(' | ')' specchar: every printable char except litchar, whitespace and opchar symchar: litchar | specchar symbol: symchar+ Grammar: mapping: version patternrule* version: "v2cc_mapfile" "0" patternrule: symbol [ ':' symbol ] Comments are ignored. A mapping files specifies a sequence of pattern rules. When transforming an indentifier, each rule is tried in turn and the first one that matches is choosen. A rule looks like pattern: filename When the ": filename" part is omitted, it defaults to "patternEXT" where "EXT" is determined by the user of the mapping file. The "pattern" can contain the special character "<" which introduces a `wildcard'. The "<" must be followed by a ">", with arbitrary characters inbetween. These characters form the name of the wildcard. A wildcard matches any sequence of characters. There can be any number of wildcards in the pattern, but each must have a unique name. The "filename" can also contain the character "<", followed by a name, followed by ">". There, it introduces a `wildcard substitution'. It will be replaced with the characters that matched the wildcard with the same name in "pattern". When there is no wildcard in "pattern" with the right name, it will be replaced with nothing. While doing this replacement, the characters "#" and "/" are replaced as "##", and "#-" respectively. No other character translations are done, so if you have funny characters in your VHDL identifiers, you will have funny characters in your filenames. Before doing the comparison with the patterns, the VHDL identifier is brought into a canononical form: when it is not an abstract identifier, all its characters are down-cased. When the resulting filename is relative (does not begin with "/"), it is prefixed with the directory of the mapping file. A non-existent mapping file is equivalent to the single rule <> An empty mapping file is just that: an empty mapping. The mapping does not need to be reversible. It is OK when multiple identifiers map to a single filename. No special character besides "<" and ">" is valid in "pattern" or "filename". They are reserved for future extensions. The mapping files for going from design unit names to filenames are found by looking into directories specified by the `v2cc library path'. You can use the environment variable V2CC_LIBRARY_PATH and command line options to define the path. When the environment variable is not set, it defaults to a value that makes the standard libraries available that are distributed and installed with v2cc itself. When it is set, it completely overwrites this default value. The variable V2CC_LIBRARY_PATH consists of ":" separated filenames. The filename "*" is replaced with the default value mentioned above. In addition to the environment variable, you can use the "-L libdir" command line option with v2cc. The directories specified with "-L" are added in front of the ones specified by V2CC_LIBRARY_PATH. In the final library path, they appear in the same order as on the command line. Looking for a design unit named UNIT in a library named LIB is done like this: for each component of the library path, L if L is a regular file set LMAP to L else if L is a directory set LMAP to L/v2cc.libs else continue with next component translate LIB into FLIB using LMAP with EXT="" if FLIB.vhdl exists terminate with FLIB.vhdl as the result if FLIB.v2cc exists set UMAP to FLIB.v2cc else if FLIB is a directory set UMAP to FLIB/v2cc.units else continue with next component translate UNIT into FUNIT using UMAP with EXT=".vhdl" terminate with FUNIT as the result terminate unsuccessfully This mechanism is used for all design units that are referenced from within VHDL code (or via other means). There is a complication with architectures and package bodies, though, because they are not uniquely identified by a single identifier. For them, a artifical identifier is constructed. Architectures get names of the form () while package bodies become (body) For example, "architecture struct of model" is turned into "model(struct)" and "package body misc" is turned into "misc(body)". When a design file contains multiple design units, they are all parsed, checked for correctnes and remembered, but only the needed unit will be used for code generation. That is, when a design file contains both a package header and a package body and the package header is referenced from another design unit, no code will be generated for the package body. When one of the ignored units will be referenced later in the same invocation of v2cc, the design file will not be read again because all design units are retained in core. Examples -------- The simplest situation is when you have no mapping files at all. A design library is then a directory on your library path. The name of that directory is that of the library in VHDL. Each file in that directory with a ".vhdl" extension is used for a design unit with the same name as the file without the extension. Say you have this directory structure somedir/ std/ standard.vhdl textio.vhdl ieee/ numeric_bit.vhdl std_logic_1164.vhdl When you put "somedir" into your library path, you have access to the design units STD.STANDARD STD.TEXTIO IEEE.NUMERIC_BIT IEEE.STD_LOGIC_1164 In this situation, you have one file per design unit. When you have one file per design library, it would look like this somedir/ fmf.vhdl All references to design units in the FMF design library would be routed to "fmf.vhdl". Considerations -------------- - Simplicity The mapping is intended to be simple. If you find yourself doing complicated things or wanting complicated extensions, we should probably rethink the mapping file completely. Maybe it is better to be able to specify an external program that gets called to do the mapping. - Extensibility Simple things within the pattern rules can be done by defining a meaning for other special characters. Broader changes to the grammar of the file should be marked with a different version number, or maybe even a different format name. - Efficiency It might be that the repeated parsing of VHDL source code will be an unduly overhead. This might not really be the case (Edwin says the C++ compiler takes much longer anyway), but if it turns out to be a problem, the solution would be to cache the results of previous parsing runs on disk. This should be done transparent to the user (although the user should of course be able to detect and correct problems with the caching like full disks or denied write permission to the caching directoy). - Automatic generation Mapping files are meant to be written by hand. If you are thinking about some automatic mechanism by which to generate them, it is probably better to extend the capabilities of the mapping files so that your new mechanism can be selected. freehdl-0.0.7/README.AIRE0000644000175000017500000003660407046260632011465 00000000000000[ If you are working on FIRE, please update this document accordingly. The `I' in the text is mvo@zagadka.ping.de (Marius Vollmer). ] Differences between FIRE and AIRE ********************************* The node type definition in fire-chunk.t are an attempt to get as close to AIRE as reasonable, but there are both large and small differences that are mostly motivated by my laziness. But many are also due to my unhappines with certain AIRE features. Being fully AIRE compliant is a worthy goal. But right now, I think it does not pay off to put much energy into this as there are more useful goals. Below is a (incomplete) account of the differences between FIRE and AIRE, with biased comments. Framework --------- With the term `framework', I'm referring to the general constructs with which FIRE and AIRE try to support their general goals. This includes things like the operations that are supported for every node type, memory management, the precise way how new types are defined, extensibility, modularity and more. The framework of FIRE is more advanced than the one of AIRE and I see no point in going with AIRE in this regard. There has been much discussion about this topic on the FreeHDL list, and improvements for the framework were the original motivation to start with FIRE. The advantages of FIRE include: - Painless high level definitions - Definitions are trivially and confidently machine-readable - Run-time type information via the "is-a" predicate. - Flexible run-time extensibility - Extensibility includes new node types, new visitor functions and new node attributes without recompiling. - Semi-automatic memory management with a simple garbage collector - Inspection facilities that can be used to implement persistence Please see the libfire sources for ultimate technical details. General Node Stuff ------------------ The nodes of a abstract syntax `tree' form a graph. It is useful to find a definition what a node can be. It pays to find a simple but general definition because it makes graph algorithms easier to specify and implement. For example, memory management and persitent stores are much easier to implement when the nodes have been kept conceptually simple. FIRE views the syntax graph as a passive, mostly un-mutable data structure. It consists of nodes that contain typed pointers to other nodes, and additional payload. This simplistic definition is mapped to a similarily simplistic C++ implementation. Each node type is mapped to a C++ struct with the pointers and the payload implemented as public data members. In addition to the type id, there is also a predicate that can test whether a given node is derived from a given type. AIRE uses C++ syntax to describe the node type definitions. It does not seem to have restrictions on what features of C++ one might use in such a node type definition. The AIRE spec randomly uses both public data members and accessor functions. It is possible to add the accessor functions to FIRE to achieve AIRE source compatability. But the underlying simple view of a node as a passive data structure should remain. In fact, using *only* accessor functions would be an improvement for FIRE, but they should not destroy the fundamental `passiveness' of the graphs, and there should not be a random mixture between data members and accessor functions. AIRE often uses the effectively untyped IIR node type. This makes the specification less precise and less transparent. FIRE tries to avoid the use of IIR and prefers more specialized types instead. For example, a IIR_SignalAssignmentStatement in AIRE denotes the target by an IIR, while FIRE uses IIR_Expression. FIRE generally tries to put the burden on the frontend. It chooses a representation that is convenient for the clients of the frontend. For example, it requires that all names have been resolved. Basic Data Types ---------------- FIRE mostly uses the types defined in AIRE. IR_Kind: this is not an enumeration member, but a pointer to an opaque information structure. This should be of no consequence, but IR_Kind is no longer an integral type that can be used to index arrays, say. IR_Direction: new type to denote the direction of ranges. IR_String: new type to hold a constant string and do memory management for it. IIR Base Class -------------- The get_kind and get_kind_text functions of AIRE are named kind and kind_name in FIRE, for no good reasons. No source location methods are implemented. Instead, a IIR node points to a IIR_PosInfo node. Predefined IIR_PosInfo types include IIR_PosInfo_TextFile and IIR_PosInfo_Sheet. It is possible to trivially implement new kinds of position information. IIR_Statement is not implemented. IIR_DesignFile & IIR_Comment Derived Classes -------------------------------------------- Unimplemented. Comments are ignored completely and DesignFiles are not mapped into the graph. The largest unit for a graph is a design unit. Design files are handled by the frontend. IIR_Literal Derived Classes --------------------------- IIR_TextLiteral has an IR_String attribute called `text' that holds the characters of the literal. IIR_Identifier, IIR_CharacterLiteral, and IIR_StringLiteral are derived from TextLiteral without adding any new features. There is no `get' method. There is no IIR_BitStringLiteral because the lexer converts bit string literals immediately into IIR_StringLiterals. It would be better to retain bit string literals unchanged to produce better error messages. IIR_IntegerLiteral just uses a IR_String for the value, without any support routines. When we want to have arbitrary integers, we should be using a bignum package (like GNU mp) and remove IIR_IntegerLiteral32, IIR_IntegerLiteral64 completely. The same applies to IIR_FloatingPointLiteral and derived types. There are additional types IIR_AbstractLiteral, IIR_AbstractIntegerLiteral, and IIR_AbstractFloatingPointLiteral to further structure the hierachy. IIR_Tuple Derived Classes ------------------------- IIR_AssociationElement: Moved actual from AEByExpression to here. Added formal_conversion and actual_conversion. When actual is IIR_OpenExpression, then it's an AEOpen, else it's an AEByExpression. The types AEByExpression and AEOpen are there and correctly used, too. IIR_BreakElement: unused/unimplemented. IIR_CaseStatementAlternative: Moved ChoiceList from CSAByChoices to base class. CSAByExpression, CSAByChoices, CSAByOthers are not used. It's all in the ChoiceList. This could be done AIRE style. IIR_Choice: added CByExpression, CByRange, CByOthers. Choice is an abstract class. This could be done AIRE style. IIR_ConditionalWaveform: unused/unimplemented. A conditional signal assignemnt is expanded into its equivalent process. IIR_ConfigurationItem: derived from IIR_DeclarativeRegion for historic reasons. Needs to be cleaned up. IIR_ComponentConfiguration: has no `name' element. IIR_Designator*: unused/unimplemented. IIR_Elsif: unused/unimplemented. IIR_SelectedWaveform: unused/unimplemented. A selected signal assignemnt is expanded into its equivalent process. IIR_Simultanous*: unused/unimplemented. IIR_ElementAssociation, IIR_IndexedAssociation: new, used for aggregates. IIR_AttributeValue: new, used for user defined attributes. Lists ----- Lists are currently a cheap cop out. They don't implement any of the baroque ADT stuff from AIRE, but are simply singly linked lists with a first and rest pointer. I think the AIRE interface could be provided but is not very useful. Not all lists have been implemented, only those that are actually used. Some new lists are also there. IIR_GenericList, IIR_PortList: not used because they are not derived from IIR_InterfaceList and I want to have `generic' functions that can work both on a GenericList and a PortList. This is no big loss. IIR_TypeDefinition and IIR_NatureDefinition Derived Classes ----------------------------------------------------------- Here are many significant deviations from AIRE. I had especially little respect when I did this part of FIRE and it shows. All IIR_TypeDefinitions have lost their "Definition" suffix. Thus, IIR_TypeDefinition is now IIR_Type. This is easy to revert of course. Types have a pointer to their declaration. Scalar types have no range (it is contained in their primary subtype(?)). Subtypes are arranged differently. Subtypes form their own hierachy: IIR_Type: Type base IIR_Subtype: Type immediate_base, FunctionDeclaration res_func IIR_ScalarSubtype: Range range IIR_ArraySubtype: TypeList constraint This avoids gratitous duplication of code for the original multitude of similar Subtypes that weren't related hierachically. The range of a ScalarSubtype is denoted by the IIR_Range hierachy. This allows not only for explicit ranges but also for ranges denoted by attributes. There is no IIR_RangeTypeDefinition. Record and Array types are derived from the new IIR_CompositeType. ArrayTypes are not restricted to one dimension. This is important. We can either support it directly in the spec or everybody is forced to non-portably kluge around it. See SAVANT. IIR_Signature: unused/unimplemented. IIR_NatureDefinition: unused/unimplemented. IIR_Declaration Derived Classes ------------------------------- In addition to the declarations, we also maintain the nested declarative regions in the graph, so that backends can walk them in a generic way. IIR_Declaration: moved attributes to here and use AttributeValue instead of AttributeSpecification. Has pointer to containing IIR_DeclarativeRegion. IIR_DeclarativeRegion: new. Chains declarative regions of one scope together with a `continued' pointer. Has list of contained IIR_Declarations. This means that declarations that have their own IIR_DeclarationList in AIRE are now derived from IIR_DeclarativeRegion and inherit the list. Makes much more sense. IIR_LoopDeclarativeRegion: new. IIR_FunctionDeclaration: pure is just a boolean. IIR_EnumerationLiteral: has no position info. IIR_NatureElementDeclaration: unused/unimplemented. IIR_SubtypeDeclaration: derived from TypeDeclaration. IIR_NatureDeclaration: unused/unimplemented. IIR_SubnatureDeclaration: unused/unimplemented. IIR_ObjectDeclaration: added initial_value. IIR_ConstantDeclaration, IIR_VariableDeclaration, IIR_SharedVariableDeclaration, IIR_SignalDeclaration: no value, use initial_value of ObjectDelcaration. The graph is not intented to be used at simulation-time. IIR_TerminalDeclaration, IIR_QuantityDeclaration: unused/unimplemented. IIR_InterfaceDeclaration: derived from IIR_ObjectDeclaration. Added `boolean buffer'. No value, see IIR_ConstantDeclaration, et al. IIR_TerminalInterfaceDeclaration, IIR_QuantityInterfaceDeclaration: unused/unimplemented. IIR_AliasDeclaration: derived from IIR_ObjectDeclaration. No name, initial_value refers to aliased object (via ObjectReference, presumably). IIR_ComponentDeclaration: derived from IIR_DeclarativeRegion. This probably can be fixed but it doesn't hurt either. IIR_Group*: unused/unimplemented. Needs fixing. IIR_LibraryUnit: added library_name to help identify units. IIR_EntityDeclaration: has no `architectures' pointer. The full list of architectures can not be determined when parsing the entity declaration and the graph should not be mutated later. Finding all architectures of an entity is a useful thing but I do not consider it to be the job of the frontend. More often than not, the architectures aren't needed anyway. IIR_PackageDeclaration: like architectures of entities, I consider it to be out of the scope of the frontend to find the package body for a package. IIR_PackageBodyDeclaration: rather, a package body points back to its package declaration. IIR_PhysicalUnit: added pointer to defining PhysicalType. IIR_AttributeSpecification: unused/unimplemented. Use AttributeValue instead, much simpler. IIR_ConfigurationSpecification: has no component_name, entity_aspect, and instantiation_list but simply a `LibraryUnit unit'. IIR_DisconnectSpecification: used for only one signal, which is denoted by `IIR_Expression guarded_signal'. IIR_LibraryClause: has no logical_name. IIR_UseClause: has no selected_name, but a direct pointer to the used unit. IIR_Name derived Classes ------------------------ No Name class is used/implemented. All references are resolved. Attributes are implemented as Expressions. IIR_Expression Derived Classes ------------------------------ No MonadicOperator or DyadicOperator is implemented. They are expressed by function calls that point to the declaration of the operator. We need a number of new node types to refer to objects and literals. AIRE seems to allow literals and objects directly in expressions, but FIRE doesn't. This and most of the other changes are done to make the life of the backend easier. By using these additional `indirect' classes, we can be more precise and explicit. IIR_AbstractLiteralExpression: new, used to refer to IIR_AbstractLiterals. IIR_PhysicalLiteral: derived from AbstractLiteralExpression. IIR_ArrayLiteralExpression: new, used to refer to IIR_StringLiterals. IIR_EnumLiteralReference: new, used to refer to IIR_EnumerationLiterals. IIR_NullExpression, IIR_OpenExpression: new, useful. IIR_Aggregate: split into RecordAggregate and ArrayAggregate with their own specialized Element/IndexedAssociations. IIR_OthersInitialization: unused/unimplemented. IIR_FunctionCall: `implementation' is called `function', for no good reason. IIR_ObjectReference: new, used to refer to objects. The hierarchy is ObjectReference SimpleReference: ObjectDeclaration object AccessReference: Expression access RecordReference: Expression record, ElementDeclaration element GenericArrayReference: Expression array ArrayReference: ExpressionList indices SliceReference: Range range Builtin attributes are also derived from Expression. They are mostly copied verbatim from the old VAUL definitions. There is no similarity to the unimplemented AIRE Attribute classes. The similarity could be achieved, but they should remain Expressions. IIR_SequentialStatement Derived Classes --------------------------------------- IIR_SequentialStatement: moved label from unimplemented IIR_Statement to here. IIR_ProcedureCallStatement: has no procedure_name, points directly to ProcedureDeclaration. IIR_IfStatement: does not use ElsIf. Instead, if/elsif chains are rewritten into equivalent nested ifs. IIR_LoopStatement: new, used as common base of ForLoopStatement and WhileLoopStatement. Does not have declaration list, but points to LoopDeclarativeRegion. IIR_LoopControlStatement: new, used as common base of NextStatement, ExitStatement. IIR_ConcurrentStatement Derived Classes --------------------------------------- IIR_ConcurrentStatement: derived from DeclarativeRegion, for historical reasons. Needs to be fixed, maybe. IIR_ProcessStatement: added `boolean guarded'. IIR_ConcurrentProcedureCallStatement, ConcurrentAssertionStatement, ConcurrentConditionalSignalAssignment, ConcurrentSelectedSignalAssignment: unused/unimplemented. They are rewritten into their equivalent ProcessStatement. IIR_ComponentInstantiationStatement: added pointer to ConfigurationSpecification that configures this thing. IIR_ConcurrentGenerateStatement: new, used as common base class of ConcurrentGenerateForStatement and ConcurrentGenerateIfStatement. IIR_SimultanousStatement Derived Classes ---------------------------------------- unused/unimplemented. freehdl-0.0.7/README.v2cc0000644000175000017500000002560510277677701011612 000000000000000. Table of content ------------------- This document is organized as follows: 1. Running the compiler 1.1 Compiling ieee.std_logic_1164 and ieee.numeric_std 1.2 Compiler options 2. Supported VHDL subset 3. Supported simulation commands 3.1 Controlling simulation from the command line 4. Bug reports 1. Running the compiler ----------------------- Change to subdirectory "v2cc". Here you will find a simple perl script "gvhdl" which performs all necessary steps in order to create a simulation binary from a VHDL source file. The command %./gvhdl y.vhdl compiles "y.vhdl" into a executable "y". Type %./y to start the simulator. For more info on how to control the simulator see section 3. Note that all VHDL source files must end with ".vhdl". If you would like to build a simulator for a model consisting of several modules (entity + architecture or package + package body) you may put all the modules into a single file and compile it as described above. The top level module should be placed at the end of the file. Another option is to create a separate file for each module. The files should be named after the entity/package it stores. Then, each module must be compiled separately: %./gvhdl -c .vhdl %./gvhdl -c .vhdl ... %./gvhdl -c .vhdl Finally, the top level module is compiled and linked via: %./gvhdl .vhdl .o ... .o 1.1 Compiling ieee.std_logic_1164 and ieee.numeric_std ------------------------------------------------------ If package ieee.std_logic_1164 or ieee.numeric_std are used within a design then the corresponding object files must be added when compiling the top level design. I.e., when compiling the top level module of your design add "../ieee/numeric_std.o ../ieee/std_logic_1164.o" (order is important!) to the list of modules to link (or just "../ieee/std_logic_1164.o" if you do not use numeric_std): %./gvhdl .vhdl .o ... .o \ ../ieee/numeric_std.o ../ieee/std_logic_1164.o Make sure to list numeric_std.o before std_logic_1164.o. Otherwise, the link stage may fail! As an alternative method you may use the "--libieee" option to add all ieee libraries (that currently come with the compiler). Directory "v2cc" contains two example models "top.vhdl" and "model4.vhdl" which make use of std_logic_1164 and numeric_std. To compile "top.vhdl" execute: %./gvhdl -c adder.vhdl %./gvhdl top.vhdl adder.o ../ieee/std_logic_1164.o or %./gvhdl -c adder.vhdl %./gvhdl top.vhdl adder.o --libieee To compile "model4.vhdl" run %./gvhdl model4.vhdl ../ieee/std_logic_1164.o ../ieee/numeric_std.o or simply %./gvhdl model4.vhdl --libieee 1.2 Compiler options -------------------- gvhdl now accepts the following options: -g : adds debugging info (i.e., the simulator can be debugged using VHDL source file line numbers). This also enables outputting some stack trace info in case of an runtime error. -G : same as -g but no VHDL source file and line number info is added to the executable (this is to support debugging code generated by the compiler). -c : compile only, do not link -l : compile design into library . -L : path to VHDL library root directory. Within this directory the compiler search for a file named v2cc.libs. v2cc.libs translates library unit names to directories. Note that more than one vhdl_lib may be provided (see also section "VHDL libraray mapping"). --libieee : add ieee libraries (std:logic_1164, numeric_std, ...) to executable. All other options not directly recognized by gvhdl are forwarded to g++. Hence, in order to optimize the generated code for speed add "-O3" to the list of gvhdl options! E.g., %../v2cc/gvhdl -O3 -c -l ieee std_logic_1164.vhdl %../v2cc/gvhdl -O3 -c -l ieee numeric_std.vhdl executed within subdir "ieee" will create speed optimized versions of std_logic_1164 and numeric_std. However, note that the code of these packages is generated form the the ORIGINAL ieee VHDL source. Currently, there are no special hand optimized versions of it (this is one of the tasks to be done in the future). 1.3 VHDL library mapping -------------------------------- In order to support mapping from VHDL unit names to directiores, a set of v2cc.libs files may be used. The directory where a v2cc.libs file is stored is passed over to the compiler using the "-L " compiler switch. Note that several vhdl_lib directores may be specified. The content of a v2cc.libs file looks like v2cc_mapfile 0 work : vhdl dummy : /home/edwin/work/test/dummy The first line ist just used to check for a vaild vhdl mapping file. The next two lines associate - VHDL libraray "work" with subdirectory "vhdl" and - VHDL libraray "dummy" with subdirectory /home/edwin/work/test/dummy. If the subdir path does not start with "/" then it is relative to the directory the corresponding v2cc.libs resides in. Here, VHDL library "work" is mapped to "/vhdl". If a model or package named "comp" is referenced then the compiler will look into the directores of all VHDL libraries that are currently visible and searches for a file named "comp.vhdl". For more details about the v2cc.libs format please read with README.libraries. 1.3.1 Example VHDL library setup -------------------------------- As an example assume that all VHDL libraries are mapped into subdirs starting from root directory "/foo". Further, assume that there are VHDL libraries named "lib1" and "lib2". They shall be mapped to subdir "/foo/lib1_dir" and "/foo/lib2_dir". Hence, the file/directory structure is as follows: /foo <- library root directory /foo/v2cc.libs <- mapping control file /foo/lib1_dir <- library dir for VHDL library lib1 /foo/lib1_dir/comp1.vhdl <- file that contains VHDL model comp1 /foo/lib2_dir <- library dir for VHDL library lib2 /foo/lib2_dir/comp2.vhdl <- file that contains VHDL model comp2 Then, file "/foo/v2cc.libs" should contain: v2cc_mapfile 0 lib1 : lib1_dir lib2 : lib2_dir In order to compile a design named comp1 (stored in file comp1.vhdl) into VHDL library lib1 goto subdir "/foo/lib1_dir" and execute: %gvhdl -c -L .. -l lib1 comp1.vhdl Note that option "-l lib1" forces the compiler to associate the model stored in "comp1.vhdl" with VHDL libraray lib1. Note further, that the compiler switch "-L .." specifies the path to the directory where "v2cc.libs" is stored. You may also specify an absolute path: %gvhdl -c -L /foo -l lib1 comp1.vhdl Note that comp1 should reside in a file named "comp1.vhdl". If lib2 contains a design comp2 that makes use of comp1 from lib1 then goto "/foo/lib2_dir" and run the following command to create an executable for model comp2: %gvhdl -L .. -l lib2 comp2.vhdl ../lib1_dir/comp1.o 2. Supported VHDL subset ------------------------ Currently, FreeHDL does not support the entire VHDL'93 standard. The following incomplete list gives an overview on what is currently (not) supported (note that the compiler is not tested very intensively; hence, expect to hit a lot of bugs in the compiler and simulator system): - Individual association of formals of composite type are currently not supported. - VHDL'93 as well as VHDL'87 file support has been added. - Shared variables are currently not supported. - Attributes transaction, quiet, stable and delayed are currently not supported. - User defined attributes are currently not supported. - Groups are currently not supported. - Guarded signal assignments are currently not supported. - Currently drivers cannot be switched off. 3. Supported simulation commands -------------------------------- After the simulator has been started a short summary of the available commands are printed to the screen: c : execute cycles = execute simulation cycles n : next = execute next simulation cycle q : quit = quit simulation r