Changeset d0c91a6
- Timestamp:
- Jan 15, 2019, 4:16:15 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- c802eb88
- Parents:
- 5e49e47 (diff), c9aba81 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 36 added
- 1 deleted
- 139 edited
- 52 moved
Legend:
- Unmodified
- Added
- Removed
-
INSTALL
r5e49e47 rd0c91a6 22 22 it is important not to put quotes around the directory path; Cforall may 23 23 appear to build, but the installed version may not work properly. 24 25 --with-backend-compiler=PROGRAM specifies the installed path of gcc. It26 defaults to the first command named 'gcc' in the current PATH.27 28 cfa-cc itself is built with the version of g++ specified by the environment29 variable CXX. If CXX is unset, cfa-cc is built using the first command named30 'g++' in the current PATH. -
Jenkins/TestRegen
r5e49e47 rd0c91a6 70 70 //escapes the sandbox 71 71 //Also specify the compiler by hand 72 sh "./configure CXX=clang++ --host=${arch} --with-backend-compiler=gcc-6 --prefix=${install_dir} --enable-silent-rules --quiet"72 sh "./configure CXX=clang++ CC=gcc-6 --host=${arch} --enable-silent-rules --quiet" 73 73 74 74 //Compile the project 75 sh 'make -j 8 --no-print-directory install'75 sh 'make -j 8 --no-print-directory' 76 76 77 77 //Regenerate the desired tests -
Jenkinsfile
r5e49e47 rd0c91a6 118 118 } 119 119 120 sh "${SrcDir}/configure CXX=${Settings.Compiler. cpp_cc} ${Settings.Architecture.flags} ${targets} --with-backend-compiler=${Settings.Compiler.cfa_cc} --quiet"120 sh "${SrcDir}/configure CXX=${Settings.Compiler.CXX} CC=${Settings.Compiler.CC} ${Settings.Architecture.flags} ${targets} --quiet" 121 121 122 122 //Compile the project … … 239 239 //Description of a compiler (Must be serializable since pipelines are persistent) 240 240 class CC_Desc implements Serializable { 241 public String cc_name242 public String cpp_cc243 public String cfa_cc244 245 CC_Desc(String cc_name, String cpp_cc, String cfa_cc) {246 this. cc_name = cc_name247 this. cpp_cc = cpp_cc248 this. cfa_cc = cfa_cc241 public String name 242 public String CXX 243 public String CC 244 245 CC_Desc(String name, String CXX, String CC) { 246 this.name = name 247 this.CXX = CXX 248 this.CC = CC 249 249 } 250 250 } … … 315 315 316 316 def full = param.RunAllTests ? " (Full)" : "" 317 this.DescShort = "${ this.Compiler. cc_name }:${ this.Architecture.name }${full}"318 319 this.DescLong = """Compiler : ${ this.Compiler. cc_name } (${ this.Compiler.cpp_cc }/${ this.Compiler.cfa_cc})317 this.DescShort = "${ this.Compiler.name }:${ this.Architecture.name }${full}" 318 319 this.DescLong = """Compiler : ${ this.Compiler.name } (${ this.Compiler.CXX }/${ this.Compiler.CC }) 320 320 Architecture : ${ this.Architecture.name } 321 321 Arc Flags : ${ this.Architecture.flags } -
Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 BACKEND_CC = @BACKEND_CC@ # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command 18 ACLOCAL_AMFLAGS = -I automake 19 19 20 20 MAINTAINERCLEANFILES = lib/* bin/* tests/.deps/* tests/.out/* -
Makefile.in
r5e49e47 rd0c91a6 94 94 subdir = . 95 95 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 96 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 97 $(top_srcdir)/configure.ac 96 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 97 $(top_srcdir)/automake/ltoptions.m4 \ 98 $(top_srcdir)/automake/ltsugar.m4 \ 99 $(top_srcdir)/automake/ltversion.m4 \ 100 $(top_srcdir)/automake/lt~obsolete.m4 \ 101 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 98 102 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 99 103 $(ACLOCAL_M4) … … 198 202 $(top_srcdir)/automake/config.sub \ 199 203 $(top_srcdir)/automake/install-sh \ 204 $(top_srcdir)/automake/ltmain.sh \ 200 205 $(top_srcdir)/automake/missing $(top_srcdir)/src/config.h.in \ 201 206 INSTALL README automake/compile automake/config.guess \ 202 207 automake/config.sub automake/depcomp automake/install-sh \ 203 automake/ missing automake/ylwrap208 automake/ltmain.sh automake/missing automake/ylwrap 204 209 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 205 210 distdir = $(PACKAGE)-$(VERSION) … … 248 253 AMTAR = @AMTAR@ 249 254 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 255 AR = @AR@ 250 256 AUTOCONF = @AUTOCONF@ 251 257 AUTOHEADER = @AUTOHEADER@ 252 258 AUTOMAKE = @AUTOMAKE@ 253 259 AWK = @AWK@ 254 BACKEND_CC = @BACKEND_CC@ # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command255 260 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 256 261 CC = @CC@ … … 272 277 CPPFLAGS = @CPPFLAGS@ 273 278 CXX = @CXX@ 279 CXXCPP = @CXXCPP@ 274 280 CXXDEPMODE = @CXXDEPMODE@ 275 281 CXXFLAGS = @CXXFLAGS@ … … 277 283 DEFS = @DEFS@ 278 284 DEPDIR = @DEPDIR@ 285 DLLTOOL = @DLLTOOL@ 279 286 DRIVER_DIR = @DRIVER_DIR@ 287 DSYMUTIL = @DSYMUTIL@ 288 DUMPBIN = @DUMPBIN@ 280 289 ECHO_C = @ECHO_C@ 281 290 ECHO_N = @ECHO_N@ … … 283 292 EGREP = @EGREP@ 284 293 EXEEXT = @EXEEXT@ 294 FGREP = @FGREP@ 285 295 GREP = @GREP@ 286 296 HOST_FLAGS = @HOST_FLAGS@ … … 290 300 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 291 301 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 302 LD = @LD@ 292 303 LDFLAGS = @LDFLAGS@ 293 304 LEX = @LEX@ … … 298 309 LIBOBJS = @LIBOBJS@ 299 310 LIBS = @LIBS@ 311 LIBTOOL = @LIBTOOL@ 312 LIPO = @LIPO@ 313 LN_S = @LN_S@ 300 314 LTLIBOBJS = @LTLIBOBJS@ 315 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 301 316 MAKEINFO = @MAKEINFO@ 317 MANIFEST_TOOL = @MANIFEST_TOOL@ 302 318 MKDIR_P = @MKDIR_P@ 319 NM = @NM@ 320 NMEDIT = @NMEDIT@ 321 OBJDUMP = @OBJDUMP@ 303 322 OBJEXT = @OBJEXT@ 323 OTOOL = @OTOOL@ 324 OTOOL64 = @OTOOL64@ 304 325 PACKAGE = @PACKAGE@ 305 326 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 311 332 PATH_SEPARATOR = @PATH_SEPARATOR@ 312 333 RANLIB = @RANLIB@ 334 SED = @SED@ 313 335 SET_MAKE = @SET_MAKE@ 314 336 SHELL = @SHELL@ … … 322 344 abs_top_builddir = @abs_top_builddir@ 323 345 abs_top_srcdir = @abs_top_srcdir@ 346 ac_ct_AR = @ac_ct_AR@ 324 347 ac_ct_CC = @ac_ct_CC@ 325 348 ac_ct_CXX = @ac_ct_CXX@ 349 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 326 350 am__include = @am__include@ 327 351 am__leading_dot = @am__leading_dot@ … … 371 395 top_srcdir = @top_srcdir@ 372 396 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 397 ACLOCAL_AMFLAGS = -I automake 373 398 MAINTAINERCLEANFILES = lib/* bin/* tests/.deps/* tests/.out/* 374 399 SUBDIRS = driver src . @LIBCFA_TARGET_DIRS@ … … 428 453 distclean-hdr: 429 454 -rm -f config.h stamp-h1 455 456 mostlyclean-libtool: 457 -rm -f *.lo 458 459 clean-libtool: 460 -rm -rf .libs _libs 461 462 distclean-libtool: 463 -rm -f libtool config.lt 430 464 install-man1: $(man1_MANS) 431 465 @$(NORMAL_INSTALL) … … 803 837 clean: clean-recursive 804 838 805 clean-am: clean-generic mostlyclean-am839 clean-am: clean-generic clean-libtool mostlyclean-am 806 840 807 841 distclean: distclean-recursive 808 842 -rm -f $(am__CONFIG_DISTCLEAN_FILES) 809 843 -rm -f Makefile 810 distclean-am: clean-am distclean-generic distclean-hdr distclean-tags 844 distclean-am: clean-am distclean-generic distclean-hdr \ 845 distclean-libtool distclean-tags 811 846 812 847 dvi: dvi-recursive … … 858 893 mostlyclean: mostlyclean-recursive 859 894 860 mostlyclean-am: mostlyclean-generic 895 mostlyclean-am: mostlyclean-generic mostlyclean-libtool 861 896 862 897 pdf: pdf-recursive … … 876 911 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ 877 912 am--refresh check check-am clean clean-cscope clean-generic \ 878 cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ 879 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ 880 distcheck distclean distclean-generic distclean-hdr \ 881 distclean-tags distcleancheck distdir distuninstallcheck dvi \ 882 dvi-am html html-am info info-am install install-am \ 883 install-data install-data-am install-dvi install-dvi-am \ 884 install-exec install-exec-am install-html install-html-am \ 885 install-info install-info-am install-man install-man1 \ 886 install-pdf install-pdf-am install-ps install-ps-am \ 887 install-strip installcheck installcheck-am installdirs \ 888 installdirs-am maintainer-clean maintainer-clean-generic \ 889 mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ 890 tags-am uninstall uninstall-am uninstall-man uninstall-man1 913 clean-libtool cscope cscopelist-am ctags ctags-am dist \ 914 dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ 915 dist-xz dist-zip distcheck distclean distclean-generic \ 916 distclean-hdr distclean-libtool distclean-tags distcleancheck \ 917 distdir distuninstallcheck dvi dvi-am html html-am info \ 918 info-am install install-am install-data install-data-am \ 919 install-dvi install-dvi-am install-exec install-exec-am \ 920 install-html install-html-am install-info install-info-am \ 921 install-man install-man1 install-pdf install-pdf-am install-ps \ 922 install-ps-am install-strip installcheck installcheck-am \ 923 installdirs installdirs-am maintainer-clean \ 924 maintainer-clean-generic mostlyclean mostlyclean-generic \ 925 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ 926 uninstall-am uninstall-man uninstall-man1 891 927 892 928 .PRECIOUS: Makefile -
aclocal.m4
r5e49e47 rd0c91a6 1171 1171 ]) # _AM_PROG_TAR 1172 1172 1173 m4_include([automake/libtool.m4]) 1174 m4_include([automake/ltoptions.m4]) 1175 m4_include([automake/ltsugar.m4]) 1176 m4_include([automake/ltversion.m4]) 1177 m4_include([automake/lt~obsolete.m4]) -
automake/cfa.m4
r5e49e47 rd0c91a6 73 73 "arm" ) cannon_arch_name="arm";; 74 74 "ARM" ) cannon_arch_name="arm";; 75 "armv7l" ) cannon_arch_name="arm";; 75 76 *) 76 77 >&2 echo "Unkown architecture " $arch_name; -
benchmark/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 20 # applies to both programs 20 21 include $(top_srcdir)/src/cfa.make 21 22 22 UPPCC = u++ 23 UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS) 23 24 24 25 25 AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread … … 35 35 PRINT_FORMAT = %20s: #Comments needed for spacing 36 36 37 # Dummy hack tricks 37 38 EXTRA_PROGRAMS = dummy # build but do not install 38 39 39 dummy_SOURCES = dummyC.c dummyCXX.cpp 40 40 … … 47 47 .NOTPARALLEL: 48 48 49 noinst_PROGRAMS = 50 49 ## ========================================================================================================= 51 50 all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT) 52 51 … … 58 57 @${STATS} .result.log 59 58 @echo "------------------------------------------------------" 60 @rm -f a.out .result.log 59 @rm -f a.out .result.log *.class 61 60 62 61 %.runquiet : … … 111 110 ## ========================================================================================================= 112 111 loop$(EXEEXT): 113 $( COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c112 $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c 114 113 115 114 function$(EXEEXT): 116 $( COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c115 $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c 117 116 118 117 fetch_add$(EXEEXT): 119 $( COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c118 $(AM_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c 120 119 121 120 ## ========================================================================================================= … … 140 139 141 140 ctxswitch-kos_fibre$(EXEEXT): 142 @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre141 $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre 143 142 144 143 ctxswitch-kos_fibre2$(EXEEXT): 145 @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre144 $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre 146 145 endif 147 146 … … 149 148 150 149 ctxswitch-pthread$(EXEEXT): 151 @$(COMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c150 $(AM_V_CC)$(COMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c 152 151 153 152 ctxswitch-cfa_coroutine$(EXEEXT): 154 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa153 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa 155 154 156 155 ctxswitch-cfa_thread$(EXEEXT): 157 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa156 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa 158 157 159 158 ctxswitch-cfa_thread2$(EXEEXT): 160 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa159 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa 161 160 162 161 ctxswitch-upp_coroutine$(EXEEXT): 163 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc162 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc 164 163 165 164 ctxswitch-upp_thread$(EXEEXT): 166 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc165 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc 167 166 168 167 ctxswitch-goroutine$(EXEEXT): 169 @go build -o a.out $(srcdir)/ctxswitch/goroutine.go168 $(AM_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go 170 169 171 170 ctxswitch-java_thread$(EXEEXT): 172 @javac -d .$(srcdir)/ctxswitch/JavaThread.java171 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java 173 172 @echo "#!/bin/sh" > a.out 174 173 @echo "java JavaThread" >> a.out … … 188 187 189 188 mutex-pthread_lock$(EXEEXT): 190 @$(COMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c189 $(AM_V_CC)$(COMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c 191 190 192 191 mutex-upp$(EXEEXT): 193 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc192 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc 194 193 195 194 mutex-cfa1$(EXEEXT): 196 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa1.cfa195 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa1.cfa 197 196 198 197 mutex-cfa2$(EXEEXT): 199 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa2.cfa198 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa2.cfa 200 199 201 200 mutex-cfa4$(EXEEXT): 202 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa4.cfa201 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa4.cfa 203 202 204 203 mutex-java_thread$(EXEEXT): 205 @javac -d .$(srcdir)/mutex/JavaThread.java204 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java 206 205 @echo "#!/bin/sh" > a.out 207 206 @echo "java JavaThread" >> a.out … … 218 217 219 218 signal-pthread_cond$(EXEEXT): 220 @$(COMPILE) -DBENCH_N=500000 $(srcdir)/schedint/pthreads.c219 $(AM_V_CC)$(COMPILE) -DBENCH_N=500000 $(srcdir)/schedint/pthreads.c 221 220 222 221 signal-upp$(EXEEXT): 223 @$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc222 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc 224 223 225 224 signal-cfa1$(EXEEXT): 226 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa1.cfa225 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa1.cfa 227 226 228 227 signal-cfa2$(EXEEXT): 229 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa2.cfa228 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa2.cfa 230 229 231 230 signal-cfa4$(EXEEXT): 232 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa4.cfa231 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa4.cfa 233 232 234 233 signal-java_thread$(EXEEXT): 235 @javac -d .$(srcdir)/schedint/JavaThread.java234 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java 236 235 @echo "#!/bin/sh" > a.out 237 236 @echo "java JavaThread" >> a.out … … 247 246 248 247 waitfor-upp$(EXEEXT): 249 @$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc248 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc 250 249 251 250 waitfor-cfa1$(EXEEXT): 252 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa1.cfa251 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa1.cfa 253 252 254 253 waitfor-cfa2$(EXEEXT): 255 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa2.cfa254 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa2.cfa 256 255 257 256 waitfor-cfa4$(EXEEXT): 258 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa4.cfa257 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa4.cfa 259 258 260 259 ## ========================================================================================================= … … 270 269 271 270 creation-cfa_coroutine$(EXEEXT): 272 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa271 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa 273 272 274 273 creation-cfa_coroutine_eager$(EXEEXT): 275 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa-DEAGER274 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa -DEAGER 276 275 277 276 creation-cfa_thread$(EXEEXT): 278 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa277 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa 279 278 280 279 creation-upp_coroutine$(EXEEXT): 281 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc280 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc 282 281 283 282 creation-upp_thread$(EXEEXT): 284 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc283 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc 285 284 286 285 creation-pthread$(EXEEXT): 287 @$(COMPILE) -DBENCH_N=250000 $(srcdir)/creation/pthreads.c286 $(AM_V_CC)$(COMPILE) -DBENCH_N=250000 $(srcdir)/creation/pthreads.c 288 287 289 288 creation-goroutine$(EXEEXT): 290 @go build -o a.out $(srcdir)/creation/goroutine.go289 $(AM_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go 291 290 292 291 creation-java_thread$(EXEEXT): 293 @javac -d .$(srcdir)/creation/JavaThread.java292 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java 294 293 @echo "#!/bin/sh" > a.out 295 294 @echo "java JavaThread" >> a.out … … 312 311 313 312 compile-array$(EXEEXT): 314 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa313 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa 315 314 316 315 compile-attributes$(EXEEXT): 317 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa316 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa 318 317 319 318 compile-empty$(EXEEXT): 320 @$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa319 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa 321 320 322 321 compile-expression$(EXEEXT): 323 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa322 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa 324 323 325 324 compile-io$(EXEEXT): 326 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa325 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa 327 326 328 327 compile-monitor$(EXEEXT): 329 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa328 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa 330 329 331 330 compile-operators$(EXEEXT): 332 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa331 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa 333 332 334 333 compile-thread$(EXEEXT): 335 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa334 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa 336 335 337 336 compile-typeof$(EXEEXT): 338 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa339 337 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa 338 -
benchmark/Makefile.in
r5e49e47 rd0c91a6 17 17 ######################## -*- Mode: Makefile-Automake -*- ###################### 18 18 ############################################################################### 19 20 19 VPATH = @srcdir@ 21 20 am__is_gnu_make = { \ … … 93 92 host_triplet = @host@ 94 93 EXTRA_PROGRAMS = dummy$(EXEEXT) 95 noinst_PROGRAMS =96 94 @WITH_LIBFIBRE_TRUE@am__append_1 = \ 97 95 @WITH_LIBFIBRE_TRUE@ ctxswitch-kos_fibre.run \ … … 100 98 subdir = benchmark 101 99 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 102 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 103 $(top_srcdir)/configure.ac 100 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 101 $(top_srcdir)/automake/ltoptions.m4 \ 102 $(top_srcdir)/automake/ltsugar.m4 \ 103 $(top_srcdir)/automake/ltversion.m4 \ 104 $(top_srcdir)/automake/lt~obsolete.m4 \ 105 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 104 106 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 105 107 $(ACLOCAL_M4) … … 109 111 CONFIG_CLEAN_FILES = 110 112 CONFIG_CLEAN_VPATH_FILES = 111 PROGRAMS = $(noinst_PROGRAMS)112 113 am_dummy_OBJECTS = dummyC.$(OBJEXT) dummyCXX.$(OBJEXT) 113 114 dummy_OBJECTS = $(am_dummy_OBJECTS) 114 115 dummy_LDADD = $(LDADD) 116 AM_V_lt = $(am__v_lt_@AM_V@) 117 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 118 am__v_lt_0 = --silent 119 am__v_lt_1 = 115 120 AM_V_P = $(am__v_P_@AM_V@) 116 121 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) … … 131 136 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 132 137 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 138 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 139 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 140 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 141 $(AM_CFLAGS) $(CFLAGS) 133 142 AM_V_CC = $(am__v_CC_@AM_V@) 134 143 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) … … 136 145 am__v_CC_1 = 137 146 CCLD = $(CC) 138 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 147 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 148 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 149 $(AM_LDFLAGS) $(LDFLAGS) -o $@ 139 150 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 140 151 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) … … 143 154 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 144 155 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 156 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 157 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 158 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 159 $(AM_CXXFLAGS) $(CXXFLAGS) 145 160 AM_V_CXX = $(am__v_CXX_@AM_V@) 146 161 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) … … 148 163 am__v_CXX_1 = 149 164 CXXLD = $(CXX) 150 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 151 -o $@ 165 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 166 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 167 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 152 168 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 153 169 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) … … 187 203 AMTAR = @AMTAR@ 188 204 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 205 AR = @AR@ 189 206 AUTOCONF = @AUTOCONF@ 190 207 AUTOHEADER = @AUTOHEADER@ 191 208 AUTOMAKE = @AUTOMAKE@ 192 209 AWK = @AWK@ 193 BACKEND_CC = @BACKEND_CC@194 210 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 195 211 CC = @CC@ … … 211 227 CPPFLAGS = @CPPFLAGS@ 212 228 CXX = @CXX@ 229 CXXCPP = @CXXCPP@ 213 230 CXXDEPMODE = @CXXDEPMODE@ 214 231 CXXFLAGS = @CXXFLAGS@ … … 216 233 DEFS = @DEFS@ 217 234 DEPDIR = @DEPDIR@ 235 DLLTOOL = @DLLTOOL@ 218 236 DRIVER_DIR = @DRIVER_DIR@ 237 DSYMUTIL = @DSYMUTIL@ 238 DUMPBIN = @DUMPBIN@ 219 239 ECHO_C = @ECHO_C@ 220 240 ECHO_N = @ECHO_N@ … … 222 242 EGREP = @EGREP@ 223 243 EXEEXT = @EXEEXT@ 244 FGREP = @FGREP@ 224 245 GREP = @GREP@ 225 246 HOST_FLAGS = @HOST_FLAGS@ … … 229 250 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 230 251 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 252 LD = @LD@ 231 253 LDFLAGS = @LDFLAGS@ 232 254 LEX = @LEX@ … … 237 259 LIBOBJS = @LIBOBJS@ 238 260 LIBS = @LIBS@ 261 LIBTOOL = @LIBTOOL@ 262 LIPO = @LIPO@ 263 LN_S = @LN_S@ 239 264 LTLIBOBJS = @LTLIBOBJS@ 265 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 240 266 MAKEINFO = @MAKEINFO@ 267 MANIFEST_TOOL = @MANIFEST_TOOL@ 241 268 MKDIR_P = @MKDIR_P@ 269 NM = @NM@ 270 NMEDIT = @NMEDIT@ 271 OBJDUMP = @OBJDUMP@ 242 272 OBJEXT = @OBJEXT@ 273 OTOOL = @OTOOL@ 274 OTOOL64 = @OTOOL64@ 243 275 PACKAGE = @PACKAGE@ 244 276 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 250 282 PATH_SEPARATOR = @PATH_SEPARATOR@ 251 283 RANLIB = @RANLIB@ 284 SED = @SED@ 252 285 SET_MAKE = @SET_MAKE@ 253 286 SHELL = @SHELL@ … … 261 294 abs_top_builddir = @abs_top_builddir@ 262 295 abs_top_srcdir = @abs_top_srcdir@ 296 ac_ct_AR = @ac_ct_AR@ 263 297 ac_ct_CC = @ac_ct_CC@ 264 298 ac_ct_CXX = @ac_ct_CXX@ 299 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 265 300 am__include = @am__include@ 266 301 am__leading_dot = @am__leading_dot@ … … 310 345 top_srcdir = @top_srcdir@ 311 346 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 347 ACLOCAL_AMFLAGS = -I automake 312 348 CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS) 313 349 LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ … … 320 356 am__v_CFA_0 = @echo " CFA " $@; 321 357 am__v_CFA_1 = 322 323 # applies to both programs 358 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@) 359 am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@) 360 am__v_JAVAC_0 = @echo " JAVAC " $@; 361 am__v_JAVAC_1 = 362 AM_V_GOC = $(am__v_GOC_@AM_V@) 363 am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@) 364 am__v_GOC_0 = @echo " GOC " $@; 365 am__v_GOC_1 = 324 366 UPPCC = u++ 325 367 UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS) 368 AM_V_UPP = $(am__v_UPP_@AM_V@) 369 am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@) 370 am__v_UPP_0 = @echo " UPP " $@; 371 am__v_UPP_1 = 372 373 # applies to both programs 326 374 AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread 327 375 AM_CFAFLAGS = -quiet -in-tree -nodebug … … 377 425 $(am__aclocal_m4_deps): 378 426 379 clean-noinstPROGRAMS:380 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)381 382 427 dummy$(EXEEXT): $(dummy_OBJECTS) $(dummy_DEPENDENCIES) $(EXTRA_dummy_DEPENDENCIES) 383 428 @rm -f dummy$(EXEEXT) … … 409 454 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 410 455 456 .c.lo: 457 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 458 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 459 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 460 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 461 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 462 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< 463 411 464 .cpp.o: 412 465 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ … … 424 477 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 425 478 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 479 480 .cpp.lo: 481 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 482 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 483 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 484 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 485 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 486 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 487 488 mostlyclean-libtool: 489 -rm -f *.lo 490 491 clean-libtool: 492 -rm -rf .libs _libs 426 493 427 494 ID: $(am__tagged_files) … … 509 576 check-am: all-am 510 577 check: check-am 511 all-am: Makefile $(PROGRAMS)578 all-am: Makefile 512 579 installdirs: 513 580 install: install-am … … 543 610 clean: clean-am 544 611 545 clean-am: clean-generic clean- noinstPROGRAMSmostlyclean-am612 clean-am: clean-generic clean-libtool mostlyclean-am 546 613 547 614 distclean: distclean-am … … 598 665 mostlyclean: mostlyclean-am 599 666 600 mostlyclean-am: mostlyclean-compile mostlyclean-generic 667 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 668 mostlyclean-libtool 601 669 602 670 pdf: pdf-am … … 613 681 614 682 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 615 clean- noinstPROGRAMScscopelist-am ctags ctags-am distclean \616 distclean-compile distclean-generic distclean- tags distdir dvi\617 d vi-am html html-am info info-am install install-am \618 install -data install-data-am install-dvi install-dvi-am\619 install- exec install-exec-am install-html install-html-am\620 install- info install-info-am install-man install-pdf\621 install-pdf -am install-ps install-ps-am install-strip\622 install check installcheck-am installdirs maintainer-clean\623 maintainer-clean -generic mostlyclean mostlyclean-compile\624 mostlyclean- generic pdf pdf-am ps ps-am tags tags-am uninstall \625 uninstall-am683 clean-libtool cscopelist-am ctags ctags-am distclean \ 684 distclean-compile distclean-generic distclean-libtool \ 685 distclean-tags distdir dvi dvi-am html html-am info info-am \ 686 install install-am install-data install-data-am install-dvi \ 687 install-dvi-am install-exec install-exec-am install-html \ 688 install-html-am install-info install-info-am install-man \ 689 install-pdf install-pdf-am install-ps install-ps-am \ 690 install-strip installcheck installcheck-am installdirs \ 691 maintainer-clean maintainer-clean-generic mostlyclean \ 692 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ 693 pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am 626 694 627 695 .PRECIOUS: Makefile … … 655 723 @${STATS} .result.log 656 724 @echo "------------------------------------------------------" 657 @rm -f a.out .result.log 725 @rm -f a.out .result.log *.class 658 726 659 727 %.runquiet : … … 705 773 706 774 loop$(EXEEXT): 707 $( COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c775 $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c 708 776 709 777 function$(EXEEXT): 710 $( COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c778 $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c 711 779 712 780 fetch_add$(EXEEXT): 713 $( COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c781 $(AM_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c 714 782 715 783 @WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre$(EXEEXT): 716 @WITH_LIBFIBRE_TRUE@ @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre784 @WITH_LIBFIBRE_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre 717 785 718 786 @WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre2$(EXEEXT): 719 @WITH_LIBFIBRE_TRUE@ @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre787 @WITH_LIBFIBRE_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre 720 788 721 789 ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND) 722 790 723 791 ctxswitch-pthread$(EXEEXT): 724 @$(COMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c792 $(AM_V_CC)$(COMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c 725 793 726 794 ctxswitch-cfa_coroutine$(EXEEXT): 727 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa795 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa 728 796 729 797 ctxswitch-cfa_thread$(EXEEXT): 730 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa798 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa 731 799 732 800 ctxswitch-cfa_thread2$(EXEEXT): 733 @$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa801 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa 734 802 735 803 ctxswitch-upp_coroutine$(EXEEXT): 736 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc804 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc 737 805 738 806 ctxswitch-upp_thread$(EXEEXT): 739 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc807 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc 740 808 741 809 ctxswitch-goroutine$(EXEEXT): 742 @go build -o a.out $(srcdir)/ctxswitch/goroutine.go810 $(AM_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go 743 811 744 812 ctxswitch-java_thread$(EXEEXT): 745 @javac -d .$(srcdir)/ctxswitch/JavaThread.java813 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java 746 814 @echo "#!/bin/sh" > a.out 747 815 @echo "java JavaThread" >> a.out … … 760 828 761 829 mutex-pthread_lock$(EXEEXT): 762 @$(COMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c830 $(AM_V_CC)$(COMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c 763 831 764 832 mutex-upp$(EXEEXT): 765 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc833 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc 766 834 767 835 mutex-cfa1$(EXEEXT): 768 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa1.cfa836 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa1.cfa 769 837 770 838 mutex-cfa2$(EXEEXT): 771 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa2.cfa839 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa2.cfa 772 840 773 841 mutex-cfa4$(EXEEXT): 774 @$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa4.cfa842 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000 $(srcdir)/mutex/cfa4.cfa 775 843 776 844 mutex-java_thread$(EXEEXT): 777 @javac -d .$(srcdir)/mutex/JavaThread.java845 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java 778 846 @echo "#!/bin/sh" > a.out 779 847 @echo "java JavaThread" >> a.out … … 789 857 790 858 signal-pthread_cond$(EXEEXT): 791 @$(COMPILE) -DBENCH_N=500000 $(srcdir)/schedint/pthreads.c859 $(AM_V_CC)$(COMPILE) -DBENCH_N=500000 $(srcdir)/schedint/pthreads.c 792 860 793 861 signal-upp$(EXEEXT): 794 @$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc862 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc 795 863 796 864 signal-cfa1$(EXEEXT): 797 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa1.cfa865 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa1.cfa 798 866 799 867 signal-cfa2$(EXEEXT): 800 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa2.cfa868 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa2.cfa 801 869 802 870 signal-cfa4$(EXEEXT): 803 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa4.cfa871 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedint/cfa4.cfa 804 872 805 873 signal-java_thread$(EXEEXT): 806 @javac -d .$(srcdir)/schedint/JavaThread.java874 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java 807 875 @echo "#!/bin/sh" > a.out 808 876 @echo "java JavaThread" >> a.out … … 816 884 817 885 waitfor-upp$(EXEEXT): 818 @$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc886 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc 819 887 820 888 waitfor-cfa1$(EXEEXT): 821 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa1.cfa889 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa1.cfa 822 890 823 891 waitfor-cfa2$(EXEEXT): 824 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa2.cfa892 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa2.cfa 825 893 826 894 waitfor-cfa4$(EXEEXT): 827 @$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa4.cfa895 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000 $(srcdir)/schedext/cfa4.cfa 828 896 829 897 creation$(EXEEXT) :\ … … 838 906 839 907 creation-cfa_coroutine$(EXEEXT): 840 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa908 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa 841 909 842 910 creation-cfa_coroutine_eager$(EXEEXT): 843 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa-DEAGER911 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa -DEAGER 844 912 845 913 creation-cfa_thread$(EXEEXT): 846 @$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa914 $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa 847 915 848 916 creation-upp_coroutine$(EXEEXT): 849 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc917 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc 850 918 851 919 creation-upp_thread$(EXEEXT): 852 @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc920 $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc 853 921 854 922 creation-pthread$(EXEEXT): 855 @$(COMPILE) -DBENCH_N=250000 $(srcdir)/creation/pthreads.c923 $(AM_V_CC)$(COMPILE) -DBENCH_N=250000 $(srcdir)/creation/pthreads.c 856 924 857 925 creation-goroutine$(EXEEXT): 858 @go build -o a.out $(srcdir)/creation/goroutine.go926 $(AM_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go 859 927 860 928 creation-java_thread$(EXEEXT): 861 @javac -d .$(srcdir)/creation/JavaThread.java929 $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java 862 930 @echo "#!/bin/sh" > a.out 863 931 @echo "java JavaThread" >> a.out … … 875 943 876 944 compile-array$(EXEEXT): 877 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa945 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa 878 946 879 947 compile-attributes$(EXEEXT): 880 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa948 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa 881 949 882 950 compile-empty$(EXEEXT): 883 @$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa951 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa 884 952 885 953 compile-expression$(EXEEXT): 886 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa954 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa 887 955 888 956 compile-io$(EXEEXT): 889 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa957 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa 890 958 891 959 compile-monitor$(EXEEXT): 892 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa960 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa 893 961 894 962 compile-operators$(EXEEXT): 895 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa963 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa 896 964 897 965 compile-thread$(EXEEXT): 898 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa966 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa 899 967 900 968 compile-typeof$(EXEEXT): 901 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa969 $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa 902 970 903 971 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
benchmark/Monitor.c
r5e49e47 rd0c91a6 29 29 EndTime = Time(); 30 30 31 sout | ( EndTime - StartTime ) / N | endl;31 sout | ( EndTime - StartTime ) / N; 32 32 } -
configure
r5e49e47 rd0c91a6 199 199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 200 200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 201 202 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( 203 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 204 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO 205 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO 206 PATH=/empty FPATH=/empty; export PATH FPATH 207 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ 208 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 201 209 test \$(( 1 + 1 )) = 2 || exit 1" 202 210 if (eval "$as_required") 2>/dev/null; then : … … 557 565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 558 566 567 SHELL=${CONFIG_SHELL-/bin/sh} 568 559 569 560 570 test -n "$DJDIR" || exec 7<&0 </dev/null … … 626 636 LTLIBOBJS 627 637 LIBOBJS 638 CFA_BACKEND_CC 628 639 ALLOCA 640 WITH_LIBFIBRE_FALSE 641 WITH_LIBFIBRE_TRUE 642 CXXCPP 643 CPP 644 LT_SYS_LIBRARY_PATH 645 OTOOL64 646 OTOOL 647 LIPO 648 NMEDIT 649 DSYMUTIL 650 MANIFEST_TOOL 651 RANLIB 652 ac_ct_AR 653 AR 654 DLLTOOL 655 OBJDUMP 656 LN_S 657 NM 658 ac_ct_DUMPBIN 659 DUMPBIN 660 LD 661 FGREP 629 662 EGREP 630 663 GREP 631 CPP 632 WITH_LIBFIBRE_FALSE 633 WITH_LIBFIBRE_TRUE 634 RANLIB 664 SED 665 LIBTOOL 635 666 LEXLIB 636 667 LEX_OUTPUT_ROOT … … 687 718 CFA_INCDIR 688 719 CFA_PREFIX 689 CFA_BACKEND_CC690 BACKEND_CC691 720 DOendif 692 721 DOifskipcompile … … 763 792 enable_silent_rules 764 793 with_cfa_name 765 with_backend_compiler766 794 with_target_hosts 767 795 enable_dependency_tracking 796 enable_shared 797 enable_static 798 with_pic 799 enable_fast_install 800 with_aix_soname 801 with_gnu_ld 802 with_sysroot 803 enable_libtool_lock 768 804 ' 769 805 ac_precious_vars='build_alias … … 782 818 YACC 783 819 YFLAGS 784 CPP' 820 LT_SYS_LIBRARY_PATH 821 CPP 822 CXXCPP' 785 823 786 824 … … 1418 1456 --disable-dependency-tracking 1419 1457 speeds up one-time build 1458 --enable-shared[=PKGS] build shared libraries [default=yes] 1459 --enable-static[=PKGS] build static libraries [default=yes] 1460 --enable-fast-install[=PKGS] 1461 optimize for fast installation [default=yes] 1462 --disable-libtool-lock avoid locking (might break parallel builds) 1420 1463 1421 1464 Optional Packages: … … 1423 1466 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1424 1467 --with-cfa-name=NAME NAME too which cfa will be installed 1425 --with-backend-compiler=PROGRAM PROGRAM that performs the final code compilation (must be gcc-compatible)1426 1468 --with-target-hosts=HOSTS HOSTS comma seperated list of hosts to build for, format ARCH:debug|nodebug|nolib 1469 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use 1470 both] 1471 --with-aix-soname=aix|svr4|both 1472 shared library versioning (aka "SONAME") variant to 1473 provide on AIX, [default=aix]. 1474 --with-gnu-ld assume the C compiler uses GNU ld [default=no] 1475 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the 1476 compiler's sysroot if not specified). 1427 1477 1428 1478 Some influential environment variables: … … 1444 1494 This script will default YFLAGS to the empty string to avoid a 1445 1495 default value of `-d' given by some make applications. 1496 LT_SYS_LIBRARY_PATH 1497 User-defined run-time library search path. 1446 1498 CPP C preprocessor 1499 CXXCPP C++ preprocessor 1447 1500 1448 1501 Use these variables to override the choices made by `configure' or to help … … 1648 1701 } # ac_fn_c_try_link 1649 1702 1650 # ac_fn_c_check_ type LINENO TYPEVAR INCLUDES1651 # ------------------------------------------- 1652 # Tests whether TYPE exists after having included INCLUDES, setting cache1653 # variable VAR accordingly.1654 ac_fn_c_check_ type ()1703 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 1704 # ------------------------------------------------------- 1705 # Tests whether HEADER exists and can be compiled using the include files in 1706 # INCLUDES, setting the cache variable VAR accordingly. 1707 ac_fn_c_check_header_compile () 1655 1708 { 1656 1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack … … 1660 1713 $as_echo_n "(cached) " >&6 1661 1714 else 1662 eval "$3=no"1663 1715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1664 1716 /* end confdefs.h. */ 1665 1717 $4 1666 int 1667 main () 1668 { 1669 if (sizeof ($2)) 1670 return 0; 1671 ; 1672 return 0; 1673 } 1718 #include <$2> 1674 1719 _ACEOF 1675 1720 if ac_fn_c_try_compile "$LINENO"; then : 1676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext1677 /* end confdefs.h. */1678 $41679 int1680 main ()1681 {1682 if (sizeof (($2)))1683 return 0;1684 ;1685 return 0;1686 }1687 _ACEOF1688 if ac_fn_c_try_compile "$LINENO"; then :1689 1690 else1691 1721 eval "$3=yes" 1692 fi 1693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 1722 else 1723 eval "$3=no" 1694 1724 fi 1695 1725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext … … 1700 1730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1701 1731 1702 } # ac_fn_c_check_ type1732 } # ac_fn_c_check_header_compile 1703 1733 1704 1734 # ac_fn_c_try_cpp LINENO … … 1781 1811 } # ac_fn_c_try_run 1782 1812 1783 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES1784 # -------------------------------------------------------1785 # Tests whether HEADER exists and can be compiled using the include files in1786 # INCLUDES, setting the cache variable VAR accordingly.1787 ac_fn_c_check_header_compile ()1788 {1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack1790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&51791 $as_echo_n "checking for $2... " >&6; }1792 if eval \${$3+:} false; then :1793 $as_echo_n "(cached) " >&61794 else1795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext1796 /* end confdefs.h. */1797 $41798 #include <$2>1799 _ACEOF1800 if ac_fn_c_try_compile "$LINENO"; then :1801 eval "$3=yes"1802 else1803 eval "$3=no"1804 fi1805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext1806 fi1807 eval ac_res=\$$31808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&51809 $as_echo "$ac_res" >&6; }1810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno1811 1812 } # ac_fn_c_check_header_compile1813 1814 1813 # ac_fn_c_check_func LINENO FUNC VAR 1815 1814 # ---------------------------------- … … 1878 1877 1879 1878 } # ac_fn_c_check_func 1879 1880 # ac_fn_cxx_try_cpp LINENO 1881 # ------------------------ 1882 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1883 ac_fn_cxx_try_cpp () 1884 { 1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1886 if { { ac_try="$ac_cpp conftest.$ac_ext" 1887 case "(($ac_try" in 1888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1889 *) ac_try_echo=$ac_try;; 1890 esac 1891 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1892 $as_echo "$ac_try_echo"; } >&5 1893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 1894 ac_status=$? 1895 if test -s conftest.err; then 1896 grep -v '^ *+' conftest.err >conftest.er1 1897 cat conftest.er1 >&5 1898 mv -f conftest.er1 conftest.err 1899 fi 1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1901 test $ac_status = 0; } > conftest.i && { 1902 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 1903 test ! -s conftest.err 1904 }; then : 1905 ac_retval=0 1906 else 1907 $as_echo "$as_me: failed program was:" >&5 1908 sed 's/^/| /' conftest.$ac_ext >&5 1909 1910 ac_retval=1 1911 fi 1912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1913 as_fn_set_status $ac_retval 1914 1915 } # ac_fn_cxx_try_cpp 1916 1917 # ac_fn_cxx_try_link LINENO 1918 # ------------------------- 1919 # Try to link conftest.$ac_ext, and return whether this succeeded. 1920 ac_fn_cxx_try_link () 1921 { 1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1923 rm -f conftest.$ac_objext conftest$ac_exeext 1924 if { { ac_try="$ac_link" 1925 case "(($ac_try" in 1926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1927 *) ac_try_echo=$ac_try;; 1928 esac 1929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1930 $as_echo "$ac_try_echo"; } >&5 1931 (eval "$ac_link") 2>conftest.err 1932 ac_status=$? 1933 if test -s conftest.err; then 1934 grep -v '^ *+' conftest.err >conftest.er1 1935 cat conftest.er1 >&5 1936 mv -f conftest.er1 conftest.err 1937 fi 1938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1939 test $ac_status = 0; } && { 1940 test -z "$ac_cxx_werror_flag" || 1941 test ! -s conftest.err 1942 } && test -s conftest$ac_exeext && { 1943 test "$cross_compiling" = yes || 1944 test -x conftest$ac_exeext 1945 }; then : 1946 ac_retval=0 1947 else 1948 $as_echo "$as_me: failed program was:" >&5 1949 sed 's/^/| /' conftest.$ac_ext >&5 1950 1951 ac_retval=1 1952 fi 1953 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 1954 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 1955 # interfere with the next link command; also delete a directory that is 1956 # left behind by Apple's compiler. We do this before executing the actions. 1957 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1959 as_fn_set_status $ac_retval 1960 1961 } # ac_fn_cxx_try_link 1962 1963 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES 1964 # ------------------------------------------- 1965 # Tests whether TYPE exists after having included INCLUDES, setting cache 1966 # variable VAR accordingly. 1967 ac_fn_c_check_type () 1968 { 1969 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1971 $as_echo_n "checking for $2... " >&6; } 1972 if eval \${$3+:} false; then : 1973 $as_echo_n "(cached) " >&6 1974 else 1975 eval "$3=no" 1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1977 /* end confdefs.h. */ 1978 $4 1979 int 1980 main () 1981 { 1982 if (sizeof ($2)) 1983 return 0; 1984 ; 1985 return 0; 1986 } 1987 _ACEOF 1988 if ac_fn_c_try_compile "$LINENO"; then : 1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1990 /* end confdefs.h. */ 1991 $4 1992 int 1993 main () 1994 { 1995 if (sizeof (($2))) 1996 return 0; 1997 ; 1998 return 0; 1999 } 2000 _ACEOF 2001 if ac_fn_c_try_compile "$LINENO"; then : 2002 2003 else 2004 eval "$3=yes" 2005 fi 2006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2007 fi 2008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2009 fi 2010 eval ac_res=\$$3 2011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2012 $as_echo "$ac_res" >&6; } 2013 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2014 2015 } # ac_fn_c_check_type 1880 2016 1881 2017 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES … … 2480 2616 2481 2617 2618 2482 2619 #AC_CONFIG_SRCDIR([src/main.cc]) 2483 2620 ac_config_headers="$ac_config_headers config.h:src/config.h.in" … … 3166 3303 3167 3304 #============================================================================== 3168 # backend compiler implementation3169 3170 # Check whether --with-backend-compiler was given.3171 if test "${with_backend_compiler+set}" = set; then :3172 withval=$with_backend_compiler; backendcompiler=$withval3173 else3174 backendcompiler=""3175 fi3176 3177 if test "x$backendcompiler" != "x"; then3178 BACKEND_CC=${backendcompiler}3179 else3180 # Extract the first word of "gcc", so it can be a program name with args.3181 set dummy gcc; ac_word=$23182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&53183 $as_echo_n "checking for $ac_word... " >&6; }3184 if ${ac_cv_path_BACKEND_CC+:} false; then :3185 $as_echo_n "(cached) " >&63186 else3187 case $BACKEND_CC in3188 [\\/]* | ?:[\\/]*)3189 ac_cv_path_BACKEND_CC="$BACKEND_CC" # Let the user override the test with a path.3190 ;;3191 *)3192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR3193 for as_dir in $PATH3194 do3195 IFS=$as_save_IFS3196 test -z "$as_dir" && as_dir=.3197 for ac_exec_ext in '' $ac_executable_extensions; do3198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then3199 ac_cv_path_BACKEND_CC="$as_dir/$ac_word$ac_exec_ext"3200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&53201 break 23202 fi3203 done3204 done3205 IFS=$as_save_IFS3206 3207 ;;3208 esac3209 fi3210 BACKEND_CC=$ac_cv_path_BACKEND_CC3211 if test -n "$BACKEND_CC"; then3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BACKEND_CC" >&53213 $as_echo "$BACKEND_CC" >&6; }3214 else3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&53216 $as_echo "no" >&6; }3217 fi3218 3219 # check gcc installed3220 if test "x$BACKEND_CC" = "x"; then3221 as_fn_error $? "some version of gcc is needed. Get it at ftp://ftp.gnu.org" "$LINENO" 53222 exit 13223 fi3224 fi3225 3226 cat >>confdefs.h <<_ACEOF3227 #define CFA_BACKEND_CC "${BACKEND_CC}"3228 _ACEOF3229 3230 3231 3232 #==============================================================================3233 3305 # Installation paths 3234 3306 … … 3478 3550 "arm" ) cannon_arch_name="arm";; 3479 3551 "ARM" ) cannon_arch_name="arm";; 3552 "armv7l" ) cannon_arch_name="arm";; 3480 3553 *) 3481 3554 >&2 echo "Unkown architecture " $arch_name; … … 3518 3591 "arm" ) cannon_arch_name="arm";; 3519 3592 "ARM" ) cannon_arch_name="arm";; 3593 "armv7l" ) cannon_arch_name="arm";; 3520 3594 *) 3521 3595 >&2 echo "Unkown architecture " $arch_name; … … 5316 5390 fi 5317 5391 if test "${LEX}" = "lex" ; then echo "Error: flex required." ; exit 1 ; fi 5318 5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 5320 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 5321 set x ${MAKE-make} 5322 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 5323 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : 5392 case `pwd` in 5393 *\ * | *\ *) 5394 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 5395 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; 5396 esac 5397 5398 5399 5400 macro_version='2.4.6' 5401 macro_revision='2.4.6' 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 ltmain=$ac_aux_dir/ltmain.sh 5416 5417 # Backslashify metacharacters that are still active within 5418 # double-quoted strings. 5419 sed_quote_subst='s/\(["`$\\]\)/\\\1/g' 5420 5421 # Same as above, but do not quote variable references. 5422 double_quote_subst='s/\(["`\\]\)/\\\1/g' 5423 5424 # Sed substitution to delay expansion of an escaped shell variable in a 5425 # double_quote_subst'ed string. 5426 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 5427 5428 # Sed substitution to delay expansion of an escaped single quote. 5429 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 5430 5431 # Sed substitution to avoid accidental globbing in evaled expressions 5432 no_glob_subst='s/\*/\\\*/g' 5433 5434 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 5435 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 5436 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 5437 5438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 5439 $as_echo_n "checking how to print strings... " >&6; } 5440 # Test print first, because it will be a builtin if present. 5441 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 5442 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 5443 ECHO='print -r --' 5444 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 5445 ECHO='printf %s\n' 5446 else 5447 # Use this function as a fallback that always works. 5448 func_fallback_echo () 5449 { 5450 eval 'cat <<_LTECHO_EOF 5451 $1 5452 _LTECHO_EOF' 5453 } 5454 ECHO='func_fallback_echo' 5455 fi 5456 5457 # func_echo_all arg... 5458 # Invoke $ECHO with all args, space-separated. 5459 func_echo_all () 5460 { 5461 $ECHO "" 5462 } 5463 5464 case $ECHO in 5465 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 5466 $as_echo "printf" >&6; } ;; 5467 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 5468 $as_echo "print -r" >&6; } ;; 5469 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 5470 $as_echo "cat" >&6; } ;; 5471 esac 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 5487 $as_echo_n "checking for a sed that does not truncate output... " >&6; } 5488 if ${ac_cv_path_SED+:} false; then : 5324 5489 $as_echo_n "(cached) " >&6 5325 5490 else 5326 cat >conftest.make <<\_ACEOF 5327 SHELL = /bin/sh 5328 all: 5329 @echo '@@@%%%=$(MAKE)=@@@%%%' 5330 _ACEOF 5331 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 5332 case `${MAKE-make} -f conftest.make 2>/dev/null` in 5333 *@@@%%%=?*=@@@%%%*) 5334 eval ac_cv_prog_make_${ac_make}_set=yes;; 5335 *) 5336 eval ac_cv_prog_make_${ac_make}_set=no;; 5337 esac 5338 rm -f conftest.make 5339 fi 5340 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then 5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5342 $as_echo "yes" >&6; } 5343 SET_MAKE= 5344 else 5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5346 $as_echo "no" >&6; } 5347 SET_MAKE="MAKE=${MAKE-make}" 5348 fi 5349 5350 if test -n "$ac_tool_prefix"; then 5351 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 5352 set dummy ${ac_tool_prefix}ranlib; ac_word=$2 5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5354 $as_echo_n "checking for $ac_word... " >&6; } 5355 if ${ac_cv_prog_RANLIB+:} false; then : 5356 $as_echo_n "(cached) " >&6 5357 else 5358 if test -n "$RANLIB"; then 5359 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 5360 else 5361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5491 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ 5492 for ac_i in 1 2 3 4 5 6 7; do 5493 ac_script="$ac_script$as_nl$ac_script" 5494 done 5495 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed 5496 { ac_script=; unset ac_script;} 5497 if test -z "$SED"; then 5498 ac_path_SED_found=false 5499 # Loop through the user's path and test for each of PROGNAME-LIST 5500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5362 5501 for as_dir in $PATH 5363 5502 do 5364 5503 IFS=$as_save_IFS 5365 5504 test -z "$as_dir" && as_dir=. 5505 for ac_prog in sed gsed; do 5366 5506 for ac_exec_ext in '' $ac_executable_extensions; do 5367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5368 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 5369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5370 break 2 5371 fi 5372 done 5507 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 5508 as_fn_executable_p "$ac_path_SED" || continue 5509 # Check for GNU ac_path_SED and select it if it is found. 5510 # Check for GNU $ac_path_SED 5511 case `"$ac_path_SED" --version 2>&1` in 5512 *GNU*) 5513 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; 5514 *) 5515 ac_count=0 5516 $as_echo_n 0123456789 >"conftest.in" 5517 while : 5518 do 5519 cat "conftest.in" "conftest.in" >"conftest.tmp" 5520 mv "conftest.tmp" "conftest.in" 5521 cp "conftest.in" "conftest.nl" 5522 $as_echo '' >> "conftest.nl" 5523 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break 5524 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5525 as_fn_arith $ac_count + 1 && ac_count=$as_val 5526 if test $ac_count -gt ${ac_path_SED_max-0}; then 5527 # Best one so far, save it but keep looking for a better one 5528 ac_cv_path_SED="$ac_path_SED" 5529 ac_path_SED_max=$ac_count 5530 fi 5531 # 10*(2^10) chars as input seems more than enough 5532 test $ac_count -gt 10 && break 5533 done 5534 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5535 esac 5536 5537 $ac_path_SED_found && break 3 5538 done 5539 done 5373 5540 done 5374 5541 IFS=$as_save_IFS 5375 5376 fi 5377 fi 5378 RANLIB=$ac_cv_prog_RANLIB 5379 if test -n "$RANLIB"; then 5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 5381 $as_echo "$RANLIB" >&6; } 5382 else 5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5384 $as_echo "no" >&6; } 5385 fi 5386 5387 5388 fi 5389 if test -z "$ac_cv_prog_RANLIB"; then 5390 ac_ct_RANLIB=$RANLIB 5391 # Extract the first word of "ranlib", so it can be a program name with args. 5392 set dummy ranlib; ac_word=$2 5393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5394 $as_echo_n "checking for $ac_word... " >&6; } 5395 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 5396 $as_echo_n "(cached) " >&6 5397 else 5398 if test -n "$ac_ct_RANLIB"; then 5399 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 5400 else 5401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5402 for as_dir in $PATH 5403 do 5404 IFS=$as_save_IFS 5405 test -z "$as_dir" && as_dir=. 5406 for ac_exec_ext in '' $ac_executable_extensions; do 5407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5408 ac_cv_prog_ac_ct_RANLIB="ranlib" 5409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5410 break 2 5542 if test -z "$ac_cv_path_SED"; then 5543 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 5411 5544 fi 5412 done 5413 done 5414 IFS=$as_save_IFS 5415 5416 fi 5417 fi 5418 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 5419 if test -n "$ac_ct_RANLIB"; then 5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 5421 $as_echo "$ac_ct_RANLIB" >&6; } 5422 else 5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5424 $as_echo "no" >&6; } 5425 fi 5426 5427 if test "x$ac_ct_RANLIB" = x; then 5428 RANLIB=":" 5429 else 5430 case $cross_compiling:$ac_tool_warned in 5431 yes:) 5432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 5433 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 5434 ac_tool_warned=yes ;; 5435 esac 5436 RANLIB=$ac_ct_RANLIB 5437 fi 5438 else 5439 RANLIB="$ac_cv_prog_RANLIB" 5440 fi 5441 5442 5443 # Checks for libraries. 5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fibre::yield in -lfibre" >&5 5445 $as_echo_n "checking for Fibre::yield in -lfibre... " >&6; } 5446 if ${ac_cv_lib_fibre_Fibre__yield+:} false; then : 5447 $as_echo_n "(cached) " >&6 5448 else 5449 ac_check_lib_save_LIBS=$LIBS 5450 LIBS="-lfibre $LIBS" 5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5452 /* end confdefs.h. */ 5453 5454 /* Override any GCC internal prototype to avoid an error. 5455 Use char because int might match the return type of a GCC 5456 builtin and then its argument prototype would still apply. */ 5457 #ifdef __cplusplus 5458 extern "C" 5459 #endif 5460 char Fibre::yield (); 5461 int 5462 main () 5463 { 5464 return Fibre::yield (); 5465 ; 5466 return 0; 5467 } 5468 _ACEOF 5469 if ac_fn_c_try_link "$LINENO"; then : 5470 ac_cv_lib_fibre_Fibre__yield=yes 5471 else 5472 ac_cv_lib_fibre_Fibre__yield=no 5473 fi 5474 rm -f core conftest.err conftest.$ac_objext \ 5475 conftest$ac_exeext conftest.$ac_ext 5476 LIBS=$ac_check_lib_save_LIBS 5477 fi 5478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fibre_Fibre__yield" >&5 5479 $as_echo "$ac_cv_lib_fibre_Fibre__yield" >&6; } 5480 if test "x$ac_cv_lib_fibre_Fibre__yield" = xyes; then : 5481 HAVE_LIBFIBRE=1 5482 else 5483 HAVE_LIBFIBRE=0 5484 fi 5485 5486 if test "$HAVE_LIBFIBRE" -eq 1; then 5487 WITH_LIBFIBRE_TRUE= 5488 WITH_LIBFIBRE_FALSE='#' 5489 else 5490 WITH_LIBFIBRE_TRUE='#' 5491 WITH_LIBFIBRE_FALSE= 5492 fi 5493 5494 5495 # Checks for header files. 5496 ac_ext=c 5497 ac_cpp='$CPP $CPPFLAGS' 5498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5500 ac_compiler_gnu=$ac_cv_c_compiler_gnu 5501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 5502 $as_echo_n "checking how to run the C preprocessor... " >&6; } 5503 # On Suns, sometimes $CPP names a directory. 5504 if test -n "$CPP" && test -d "$CPP"; then 5505 CPP= 5506 fi 5507 if test -z "$CPP"; then 5508 if ${ac_cv_prog_CPP+:} false; then : 5509 $as_echo_n "(cached) " >&6 5510 else 5511 # Double quotes because CPP needs to be expanded 5512 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 5513 do 5514 ac_preproc_ok=false 5515 for ac_c_preproc_warn_flag in '' yes 5516 do 5517 # Use a header file that comes with gcc, so configuring glibc 5518 # with a fresh cross-compiler works. 5519 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5520 # <limits.h> exists even on freestanding compilers. 5521 # On the NeXT, cc -E runs the code through the compiler's parser, 5522 # not just through cpp. "Syntax error" is here to catch this case. 5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5524 /* end confdefs.h. */ 5525 #ifdef __STDC__ 5526 # include <limits.h> 5527 #else 5528 # include <assert.h> 5529 #endif 5530 Syntax error 5531 _ACEOF 5532 if ac_fn_c_try_cpp "$LINENO"; then : 5533 5534 else 5535 # Broken: fails on valid input. 5536 continue 5537 fi 5538 rm -f conftest.err conftest.i conftest.$ac_ext 5539 5540 # OK, works on sane cases. Now check whether nonexistent headers 5541 # can be detected and how. 5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5543 /* end confdefs.h. */ 5544 #include <ac_nonexistent.h> 5545 _ACEOF 5546 if ac_fn_c_try_cpp "$LINENO"; then : 5547 # Broken: success on invalid input. 5548 continue 5549 else 5550 # Passes both tests. 5551 ac_preproc_ok=: 5552 break 5553 fi 5554 rm -f conftest.err conftest.i conftest.$ac_ext 5555 5556 done 5557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5558 rm -f conftest.i conftest.err conftest.$ac_ext 5559 if $ac_preproc_ok; then : 5560 break 5561 fi 5562 5563 done 5564 ac_cv_prog_CPP=$CPP 5565 5566 fi 5567 CPP=$ac_cv_prog_CPP 5568 else 5569 ac_cv_prog_CPP=$CPP 5570 fi 5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 5572 $as_echo "$CPP" >&6; } 5573 ac_preproc_ok=false 5574 for ac_c_preproc_warn_flag in '' yes 5575 do 5576 # Use a header file that comes with gcc, so configuring glibc 5577 # with a fresh cross-compiler works. 5578 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5579 # <limits.h> exists even on freestanding compilers. 5580 # On the NeXT, cc -E runs the code through the compiler's parser, 5581 # not just through cpp. "Syntax error" is here to catch this case. 5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5583 /* end confdefs.h. */ 5584 #ifdef __STDC__ 5585 # include <limits.h> 5586 #else 5587 # include <assert.h> 5588 #endif 5589 Syntax error 5590 _ACEOF 5591 if ac_fn_c_try_cpp "$LINENO"; then : 5592 5593 else 5594 # Broken: fails on valid input. 5595 continue 5596 fi 5597 rm -f conftest.err conftest.i conftest.$ac_ext 5598 5599 # OK, works on sane cases. Now check whether nonexistent headers 5600 # can be detected and how. 5601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5602 /* end confdefs.h. */ 5603 #include <ac_nonexistent.h> 5604 _ACEOF 5605 if ac_fn_c_try_cpp "$LINENO"; then : 5606 # Broken: success on invalid input. 5607 continue 5608 else 5609 # Passes both tests. 5610 ac_preproc_ok=: 5611 break 5612 fi 5613 rm -f conftest.err conftest.i conftest.$ac_ext 5614 5615 done 5616 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5617 rm -f conftest.i conftest.err conftest.$ac_ext 5618 if $ac_preproc_ok; then : 5619 5620 else 5621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5622 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 5623 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 5624 See \`config.log' for more details" "$LINENO" 5; } 5625 fi 5626 5627 ac_ext=c 5628 ac_cpp='$CPP $CPPFLAGS' 5629 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5630 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5631 ac_compiler_gnu=$ac_cv_c_compiler_gnu 5545 else 5546 ac_cv_path_SED=$SED 5547 fi 5548 5549 fi 5550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 5551 $as_echo "$ac_cv_path_SED" >&6; } 5552 SED="$ac_cv_path_SED" 5553 rm -f conftest.sed 5554 5555 test -z "$SED" && SED=sed 5556 Xsed="$SED -e 1s/^X//" 5557 5558 5559 5560 5561 5562 5563 5564 5565 5632 5566 5633 5567 … … 5762 5696 5763 5697 5698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 5699 $as_echo_n "checking for fgrep... " >&6; } 5700 if ${ac_cv_path_FGREP+:} false; then : 5701 $as_echo_n "(cached) " >&6 5702 else 5703 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 5704 then ac_cv_path_FGREP="$GREP -F" 5705 else 5706 if test -z "$FGREP"; then 5707 ac_path_FGREP_found=false 5708 # Loop through the user's path and test for each of PROGNAME-LIST 5709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5710 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 5711 do 5712 IFS=$as_save_IFS 5713 test -z "$as_dir" && as_dir=. 5714 for ac_prog in fgrep; do 5715 for ac_exec_ext in '' $ac_executable_extensions; do 5716 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 5717 as_fn_executable_p "$ac_path_FGREP" || continue 5718 # Check for GNU ac_path_FGREP and select it if it is found. 5719 # Check for GNU $ac_path_FGREP 5720 case `"$ac_path_FGREP" --version 2>&1` in 5721 *GNU*) 5722 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; 5723 *) 5724 ac_count=0 5725 $as_echo_n 0123456789 >"conftest.in" 5726 while : 5727 do 5728 cat "conftest.in" "conftest.in" >"conftest.tmp" 5729 mv "conftest.tmp" "conftest.in" 5730 cp "conftest.in" "conftest.nl" 5731 $as_echo 'FGREP' >> "conftest.nl" 5732 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break 5733 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5734 as_fn_arith $ac_count + 1 && ac_count=$as_val 5735 if test $ac_count -gt ${ac_path_FGREP_max-0}; then 5736 # Best one so far, save it but keep looking for a better one 5737 ac_cv_path_FGREP="$ac_path_FGREP" 5738 ac_path_FGREP_max=$ac_count 5739 fi 5740 # 10*(2^10) chars as input seems more than enough 5741 test $ac_count -gt 10 && break 5742 done 5743 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5744 esac 5745 5746 $ac_path_FGREP_found && break 3 5747 done 5748 done 5749 done 5750 IFS=$as_save_IFS 5751 if test -z "$ac_cv_path_FGREP"; then 5752 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5753 fi 5754 else 5755 ac_cv_path_FGREP=$FGREP 5756 fi 5757 5758 fi 5759 fi 5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 5761 $as_echo "$ac_cv_path_FGREP" >&6; } 5762 FGREP="$ac_cv_path_FGREP" 5763 5764 5765 test -z "$GREP" && GREP=grep 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 # Check whether --with-gnu-ld was given. 5786 if test "${with_gnu_ld+set}" = set; then : 5787 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes 5788 else 5789 with_gnu_ld=no 5790 fi 5791 5792 ac_prog=ld 5793 if test yes = "$GCC"; then 5794 # Check if gcc -print-prog-name=ld gives a path. 5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 5796 $as_echo_n "checking for ld used by $CC... " >&6; } 5797 case $host in 5798 *-*-mingw*) 5799 # gcc leaves a trailing carriage return, which upsets mingw 5800 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5801 *) 5802 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5803 esac 5804 case $ac_prog in 5805 # Accept absolute paths. 5806 [\\/]* | ?:[\\/]*) 5807 re_direlt='/[^/][^/]*/\.\./' 5808 # Canonicalize the pathname of ld 5809 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5810 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5811 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5812 done 5813 test -z "$LD" && LD=$ac_prog 5814 ;; 5815 "") 5816 # If it fails, then pretend we aren't using GCC. 5817 ac_prog=ld 5818 ;; 5819 *) 5820 # If it is relative, then search for the first ld in PATH. 5821 with_gnu_ld=unknown 5822 ;; 5823 esac 5824 elif test yes = "$with_gnu_ld"; then 5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 5826 $as_echo_n "checking for GNU ld... " >&6; } 5827 else 5828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 5829 $as_echo_n "checking for non-GNU ld... " >&6; } 5830 fi 5831 if ${lt_cv_path_LD+:} false; then : 5832 $as_echo_n "(cached) " >&6 5833 else 5834 if test -z "$LD"; then 5835 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 5836 for ac_dir in $PATH; do 5837 IFS=$lt_save_ifs 5838 test -z "$ac_dir" && ac_dir=. 5839 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5840 lt_cv_path_LD=$ac_dir/$ac_prog 5841 # Check to see if the program is GNU ld. I'd rather use --version, 5842 # but apparently some variants of GNU ld only accept -v. 5843 # Break only if it was the GNU/non-GNU ld that we prefer. 5844 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5845 *GNU* | *'with BFD'*) 5846 test no != "$with_gnu_ld" && break 5847 ;; 5848 *) 5849 test yes != "$with_gnu_ld" && break 5850 ;; 5851 esac 5852 fi 5853 done 5854 IFS=$lt_save_ifs 5855 else 5856 lt_cv_path_LD=$LD # Let the user override the test with a path. 5857 fi 5858 fi 5859 5860 LD=$lt_cv_path_LD 5861 if test -n "$LD"; then 5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 5863 $as_echo "$LD" >&6; } 5864 else 5865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5866 $as_echo "no" >&6; } 5867 fi 5868 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 5870 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } 5871 if ${lt_cv_prog_gnu_ld+:} false; then : 5872 $as_echo_n "(cached) " >&6 5873 else 5874 # I'd rather use --version here, but apparently some GNU lds only accept -v. 5875 case `$LD -v 2>&1 </dev/null` in 5876 *GNU* | *'with BFD'*) 5877 lt_cv_prog_gnu_ld=yes 5878 ;; 5879 *) 5880 lt_cv_prog_gnu_ld=no 5881 ;; 5882 esac 5883 fi 5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 5885 $as_echo "$lt_cv_prog_gnu_ld" >&6; } 5886 with_gnu_ld=$lt_cv_prog_gnu_ld 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 5897 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } 5898 if ${lt_cv_path_NM+:} false; then : 5899 $as_echo_n "(cached) " >&6 5900 else 5901 if test -n "$NM"; then 5902 # Let the user override the test. 5903 lt_cv_path_NM=$NM 5904 else 5905 lt_nm_to_check=${ac_tool_prefix}nm 5906 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5907 lt_nm_to_check="$lt_nm_to_check nm" 5908 fi 5909 for lt_tmp_nm in $lt_nm_to_check; do 5910 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 5911 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5912 IFS=$lt_save_ifs 5913 test -z "$ac_dir" && ac_dir=. 5914 tmp_nm=$ac_dir/$lt_tmp_nm 5915 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 5916 # Check to see if the nm accepts a BSD-compat flag. 5917 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 5918 # nm: unknown option "B" ignored 5919 # Tru64's nm complains that /dev/null is an invalid object file 5920 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 5921 case $build_os in 5922 mingw*) lt_bad_file=conftest.nm/nofile ;; 5923 *) lt_bad_file=/dev/null ;; 5924 esac 5925 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 5926 *$lt_bad_file* | *'Invalid file or object type'*) 5927 lt_cv_path_NM="$tmp_nm -B" 5928 break 2 5929 ;; 5930 *) 5931 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5932 */dev/null*) 5933 lt_cv_path_NM="$tmp_nm -p" 5934 break 2 5935 ;; 5936 *) 5937 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5938 continue # so that we can try to find one that supports BSD flags 5939 ;; 5940 esac 5941 ;; 5942 esac 5943 fi 5944 done 5945 IFS=$lt_save_ifs 5946 done 5947 : ${lt_cv_path_NM=no} 5948 fi 5949 fi 5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 5951 $as_echo "$lt_cv_path_NM" >&6; } 5952 if test no != "$lt_cv_path_NM"; then 5953 NM=$lt_cv_path_NM 5954 else 5955 # Didn't find any BSD compatible name lister, look for dumpbin. 5956 if test -n "$DUMPBIN"; then : 5957 # Let the user override the test. 5958 else 5959 if test -n "$ac_tool_prefix"; then 5960 for ac_prog in dumpbin "link -dump" 5961 do 5962 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 5963 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 5964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5965 $as_echo_n "checking for $ac_word... " >&6; } 5966 if ${ac_cv_prog_DUMPBIN+:} false; then : 5967 $as_echo_n "(cached) " >&6 5968 else 5969 if test -n "$DUMPBIN"; then 5970 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. 5971 else 5972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5973 for as_dir in $PATH 5974 do 5975 IFS=$as_save_IFS 5976 test -z "$as_dir" && as_dir=. 5977 for ac_exec_ext in '' $ac_executable_extensions; do 5978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5979 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" 5980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5981 break 2 5982 fi 5983 done 5984 done 5985 IFS=$as_save_IFS 5986 5987 fi 5988 fi 5989 DUMPBIN=$ac_cv_prog_DUMPBIN 5990 if test -n "$DUMPBIN"; then 5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 5992 $as_echo "$DUMPBIN" >&6; } 5993 else 5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5995 $as_echo "no" >&6; } 5996 fi 5997 5998 5999 test -n "$DUMPBIN" && break 6000 done 6001 fi 6002 if test -z "$DUMPBIN"; then 6003 ac_ct_DUMPBIN=$DUMPBIN 6004 for ac_prog in dumpbin "link -dump" 6005 do 6006 # Extract the first word of "$ac_prog", so it can be a program name with args. 6007 set dummy $ac_prog; ac_word=$2 6008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6009 $as_echo_n "checking for $ac_word... " >&6; } 6010 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : 6011 $as_echo_n "(cached) " >&6 6012 else 6013 if test -n "$ac_ct_DUMPBIN"; then 6014 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. 6015 else 6016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6017 for as_dir in $PATH 6018 do 6019 IFS=$as_save_IFS 6020 test -z "$as_dir" && as_dir=. 6021 for ac_exec_ext in '' $ac_executable_extensions; do 6022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6023 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" 6024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6025 break 2 6026 fi 6027 done 6028 done 6029 IFS=$as_save_IFS 6030 6031 fi 6032 fi 6033 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN 6034 if test -n "$ac_ct_DUMPBIN"; then 6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 6036 $as_echo "$ac_ct_DUMPBIN" >&6; } 6037 else 6038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6039 $as_echo "no" >&6; } 6040 fi 6041 6042 6043 test -n "$ac_ct_DUMPBIN" && break 6044 done 6045 6046 if test "x$ac_ct_DUMPBIN" = x; then 6047 DUMPBIN=":" 6048 else 6049 case $cross_compiling:$ac_tool_warned in 6050 yes:) 6051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6052 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6053 ac_tool_warned=yes ;; 6054 esac 6055 DUMPBIN=$ac_ct_DUMPBIN 6056 fi 6057 fi 6058 6059 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 6060 *COFF*) 6061 DUMPBIN="$DUMPBIN -symbols -headers" 6062 ;; 6063 *) 6064 DUMPBIN=: 6065 ;; 6066 esac 6067 fi 6068 6069 if test : != "$DUMPBIN"; then 6070 NM=$DUMPBIN 6071 fi 6072 fi 6073 test -z "$NM" && NM=nm 6074 6075 6076 6077 6078 6079 6080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 6081 $as_echo_n "checking the name lister ($NM) interface... " >&6; } 6082 if ${lt_cv_nm_interface+:} false; then : 6083 $as_echo_n "(cached) " >&6 6084 else 6085 lt_cv_nm_interface="BSD nm" 6086 echo "int some_variable = 0;" > conftest.$ac_ext 6087 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) 6088 (eval "$ac_compile" 2>conftest.err) 6089 cat conftest.err >&5 6090 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) 6091 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 6092 cat conftest.err >&5 6093 (eval echo "\"\$as_me:$LINENO: output\"" >&5) 6094 cat conftest.out >&5 6095 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 6096 lt_cv_nm_interface="MS dumpbin" 6097 fi 6098 rm -f conftest* 6099 fi 6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 6101 $as_echo "$lt_cv_nm_interface" >&6; } 6102 6103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 6104 $as_echo_n "checking whether ln -s works... " >&6; } 6105 LN_S=$as_ln_s 6106 if test "$LN_S" = "ln -s"; then 6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6108 $as_echo "yes" >&6; } 6109 else 6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 6111 $as_echo "no, using $LN_S" >&6; } 6112 fi 6113 6114 # find the maximum length of command line arguments 6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 6116 $as_echo_n "checking the maximum length of command line arguments... " >&6; } 6117 if ${lt_cv_sys_max_cmd_len+:} false; then : 6118 $as_echo_n "(cached) " >&6 6119 else 6120 i=0 6121 teststring=ABCD 6122 6123 case $build_os in 6124 msdosdjgpp*) 6125 # On DJGPP, this test can blow up pretty badly due to problems in libc 6126 # (any single argument exceeding 2000 bytes causes a buffer overrun 6127 # during glob expansion). Even if it were fixed, the result of this 6128 # check would be larger than it should be. 6129 lt_cv_sys_max_cmd_len=12288; # 12K is about right 6130 ;; 6131 6132 gnu*) 6133 # Under GNU Hurd, this test is not required because there is 6134 # no limit to the length of command line arguments. 6135 # Libtool will interpret -1 as no limit whatsoever 6136 lt_cv_sys_max_cmd_len=-1; 6137 ;; 6138 6139 cygwin* | mingw* | cegcc*) 6140 # On Win9x/ME, this test blows up -- it succeeds, but takes 6141 # about 5 minutes as the teststring grows exponentially. 6142 # Worse, since 9x/ME are not pre-emptively multitasking, 6143 # you end up with a "frozen" computer, even though with patience 6144 # the test eventually succeeds (with a max line length of 256k). 6145 # Instead, let's just punt: use the minimum linelength reported by 6146 # all of the supported platforms: 8192 (on NT/2K/XP). 6147 lt_cv_sys_max_cmd_len=8192; 6148 ;; 6149 6150 mint*) 6151 # On MiNT this can take a long time and run out of memory. 6152 lt_cv_sys_max_cmd_len=8192; 6153 ;; 6154 6155 amigaos*) 6156 # On AmigaOS with pdksh, this test takes hours, literally. 6157 # So we just punt and use a minimum line length of 8192. 6158 lt_cv_sys_max_cmd_len=8192; 6159 ;; 6160 6161 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 6162 # This has been around since 386BSD, at least. Likely further. 6163 if test -x /sbin/sysctl; then 6164 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 6165 elif test -x /usr/sbin/sysctl; then 6166 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 6167 else 6168 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 6169 fi 6170 # And add a safety zone 6171 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 6172 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 6173 ;; 6174 6175 interix*) 6176 # We know the value 262144 and hardcode it with a safety zone (like BSD) 6177 lt_cv_sys_max_cmd_len=196608 6178 ;; 6179 6180 os2*) 6181 # The test takes a long time on OS/2. 6182 lt_cv_sys_max_cmd_len=8192 6183 ;; 6184 6185 osf*) 6186 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 6187 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 6188 # nice to cause kernel panics so lets avoid the loop below. 6189 # First set a reasonable default. 6190 lt_cv_sys_max_cmd_len=16384 6191 # 6192 if test -x /sbin/sysconfig; then 6193 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 6194 *1*) lt_cv_sys_max_cmd_len=-1 ;; 6195 esac 6196 fi 6197 ;; 6198 sco3.2v5*) 6199 lt_cv_sys_max_cmd_len=102400 6200 ;; 6201 sysv5* | sco5v6* | sysv4.2uw2*) 6202 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 6203 if test -n "$kargmax"; then 6204 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` 6205 else 6206 lt_cv_sys_max_cmd_len=32768 6207 fi 6208 ;; 6209 *) 6210 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 6211 if test -n "$lt_cv_sys_max_cmd_len" && \ 6212 test undefined != "$lt_cv_sys_max_cmd_len"; then 6213 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 6214 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 6215 else 6216 # Make teststring a little bigger before we do anything with it. 6217 # a 1K string should be a reasonable start. 6218 for i in 1 2 3 4 5 6 7 8; do 6219 teststring=$teststring$teststring 6220 done 6221 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 6222 # If test is not a shell built-in, we'll probably end up computing a 6223 # maximum length that is only half of the actual maximum length, but 6224 # we can't tell. 6225 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 6226 = "X$teststring$teststring"; } >/dev/null 2>&1 && 6227 test 17 != "$i" # 1/2 MB should be enough 6228 do 6229 i=`expr $i + 1` 6230 teststring=$teststring$teststring 6231 done 6232 # Only check the string length outside the loop. 6233 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 6234 teststring= 6235 # Add a significant safety factor because C++ compilers can tack on 6236 # massive amounts of additional arguments before passing them to the 6237 # linker. It appears as though 1/2 is a usable value. 6238 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 6239 fi 6240 ;; 6241 esac 6242 6243 fi 6244 6245 if test -n "$lt_cv_sys_max_cmd_len"; then 6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 6247 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } 6248 else 6249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 6250 $as_echo "none" >&6; } 6251 fi 6252 max_cmd_len=$lt_cv_sys_max_cmd_len 6253 6254 6255 6256 6257 6258 6259 : ${CP="cp -f"} 6260 : ${MV="mv -f"} 6261 : ${RM="rm -f"} 6262 6263 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 6264 lt_unset=unset 6265 else 6266 lt_unset=false 6267 fi 6268 6269 6270 6271 6272 6273 # test EBCDIC or ASCII 6274 case `echo X|tr X '\101'` in 6275 A) # ASCII based system 6276 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 6277 lt_SP2NL='tr \040 \012' 6278 lt_NL2SP='tr \015\012 \040\040' 6279 ;; 6280 *) # EBCDIC based system 6281 lt_SP2NL='tr \100 \n' 6282 lt_NL2SP='tr \r\n \100\100' 6283 ;; 6284 esac 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 6295 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } 6296 if ${lt_cv_to_host_file_cmd+:} false; then : 6297 $as_echo_n "(cached) " >&6 6298 else 6299 case $host in 6300 *-*-mingw* ) 6301 case $build in 6302 *-*-mingw* ) # actually msys 6303 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 6304 ;; 6305 *-*-cygwin* ) 6306 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 6307 ;; 6308 * ) # otherwise, assume *nix 6309 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 6310 ;; 6311 esac 6312 ;; 6313 *-*-cygwin* ) 6314 case $build in 6315 *-*-mingw* ) # actually msys 6316 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 6317 ;; 6318 *-*-cygwin* ) 6319 lt_cv_to_host_file_cmd=func_convert_file_noop 6320 ;; 6321 * ) # otherwise, assume *nix 6322 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 6323 ;; 6324 esac 6325 ;; 6326 * ) # unhandled hosts (and "normal" native builds) 6327 lt_cv_to_host_file_cmd=func_convert_file_noop 6328 ;; 6329 esac 6330 6331 fi 6332 6333 to_host_file_cmd=$lt_cv_to_host_file_cmd 6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 6335 $as_echo "$lt_cv_to_host_file_cmd" >&6; } 6336 6337 6338 6339 6340 6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 6342 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } 6343 if ${lt_cv_to_tool_file_cmd+:} false; then : 6344 $as_echo_n "(cached) " >&6 6345 else 6346 #assume ordinary cross tools, or native build. 6347 lt_cv_to_tool_file_cmd=func_convert_file_noop 6348 case $host in 6349 *-*-mingw* ) 6350 case $build in 6351 *-*-mingw* ) # actually msys 6352 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 6353 ;; 6354 esac 6355 ;; 6356 esac 6357 6358 fi 6359 6360 to_tool_file_cmd=$lt_cv_to_tool_file_cmd 6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 6362 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } 6363 6364 6365 6366 6367 6368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 6369 $as_echo_n "checking for $LD option to reload object files... " >&6; } 6370 if ${lt_cv_ld_reload_flag+:} false; then : 6371 $as_echo_n "(cached) " >&6 6372 else 6373 lt_cv_ld_reload_flag='-r' 6374 fi 6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 6376 $as_echo "$lt_cv_ld_reload_flag" >&6; } 6377 reload_flag=$lt_cv_ld_reload_flag 6378 case $reload_flag in 6379 "" | " "*) ;; 6380 *) reload_flag=" $reload_flag" ;; 6381 esac 6382 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6383 case $host_os in 6384 cygwin* | mingw* | pw32* | cegcc*) 6385 if test yes != "$GCC"; then 6386 reload_cmds=false 6387 fi 6388 ;; 6389 darwin*) 6390 if test yes = "$GCC"; then 6391 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6392 else 6393 reload_cmds='$LD$reload_flag -o $output$reload_objs' 6394 fi 6395 ;; 6396 esac 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 if test -n "$ac_tool_prefix"; then 6407 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. 6408 set dummy ${ac_tool_prefix}objdump; ac_word=$2 6409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6410 $as_echo_n "checking for $ac_word... " >&6; } 6411 if ${ac_cv_prog_OBJDUMP+:} false; then : 6412 $as_echo_n "(cached) " >&6 6413 else 6414 if test -n "$OBJDUMP"; then 6415 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 6416 else 6417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6418 for as_dir in $PATH 6419 do 6420 IFS=$as_save_IFS 6421 test -z "$as_dir" && as_dir=. 6422 for ac_exec_ext in '' $ac_executable_extensions; do 6423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6424 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" 6425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6426 break 2 6427 fi 6428 done 6429 done 6430 IFS=$as_save_IFS 6431 6432 fi 6433 fi 6434 OBJDUMP=$ac_cv_prog_OBJDUMP 6435 if test -n "$OBJDUMP"; then 6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 6437 $as_echo "$OBJDUMP" >&6; } 6438 else 6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6440 $as_echo "no" >&6; } 6441 fi 6442 6443 6444 fi 6445 if test -z "$ac_cv_prog_OBJDUMP"; then 6446 ac_ct_OBJDUMP=$OBJDUMP 6447 # Extract the first word of "objdump", so it can be a program name with args. 6448 set dummy objdump; ac_word=$2 6449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6450 $as_echo_n "checking for $ac_word... " >&6; } 6451 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : 6452 $as_echo_n "(cached) " >&6 6453 else 6454 if test -n "$ac_ct_OBJDUMP"; then 6455 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. 6456 else 6457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6458 for as_dir in $PATH 6459 do 6460 IFS=$as_save_IFS 6461 test -z "$as_dir" && as_dir=. 6462 for ac_exec_ext in '' $ac_executable_extensions; do 6463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6464 ac_cv_prog_ac_ct_OBJDUMP="objdump" 6465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6466 break 2 6467 fi 6468 done 6469 done 6470 IFS=$as_save_IFS 6471 6472 fi 6473 fi 6474 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP 6475 if test -n "$ac_ct_OBJDUMP"; then 6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 6477 $as_echo "$ac_ct_OBJDUMP" >&6; } 6478 else 6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6480 $as_echo "no" >&6; } 6481 fi 6482 6483 if test "x$ac_ct_OBJDUMP" = x; then 6484 OBJDUMP="false" 6485 else 6486 case $cross_compiling:$ac_tool_warned in 6487 yes:) 6488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6489 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6490 ac_tool_warned=yes ;; 6491 esac 6492 OBJDUMP=$ac_ct_OBJDUMP 6493 fi 6494 else 6495 OBJDUMP="$ac_cv_prog_OBJDUMP" 6496 fi 6497 6498 test -z "$OBJDUMP" && OBJDUMP=objdump 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 6509 $as_echo_n "checking how to recognize dependent libraries... " >&6; } 6510 if ${lt_cv_deplibs_check_method+:} false; then : 6511 $as_echo_n "(cached) " >&6 6512 else 6513 lt_cv_file_magic_cmd='$MAGIC_CMD' 6514 lt_cv_file_magic_test_file= 6515 lt_cv_deplibs_check_method='unknown' 6516 # Need to set the preceding variable on all platforms that support 6517 # interlibrary dependencies. 6518 # 'none' -- dependencies not supported. 6519 # 'unknown' -- same as none, but documents that we really don't know. 6520 # 'pass_all' -- all dependencies passed with no checks. 6521 # 'test_compile' -- check by making test program. 6522 # 'file_magic [[regex]]' -- check by looking for files in library path 6523 # that responds to the $file_magic_cmd with a given extended regex. 6524 # If you have 'file' or equivalent on your system and you're not sure 6525 # whether 'pass_all' will *always* work, you probably want this one. 6526 6527 case $host_os in 6528 aix[4-9]*) 6529 lt_cv_deplibs_check_method=pass_all 6530 ;; 6531 6532 beos*) 6533 lt_cv_deplibs_check_method=pass_all 6534 ;; 6535 6536 bsdi[45]*) 6537 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' 6538 lt_cv_file_magic_cmd='/usr/bin/file -L' 6539 lt_cv_file_magic_test_file=/shlib/libc.so 6540 ;; 6541 6542 cygwin*) 6543 # func_win32_libid is a shell function defined in ltmain.sh 6544 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6545 lt_cv_file_magic_cmd='func_win32_libid' 6546 ;; 6547 6548 mingw* | pw32*) 6549 # Base MSYS/MinGW do not provide the 'file' command needed by 6550 # func_win32_libid shell function, so use a weaker test based on 'objdump', 6551 # unless we find 'file', for example because we are cross-compiling. 6552 if ( file / ) >/dev/null 2>&1; then 6553 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6554 lt_cv_file_magic_cmd='func_win32_libid' 6555 else 6556 # Keep this pattern in sync with the one in func_win32_libid. 6557 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6558 lt_cv_file_magic_cmd='$OBJDUMP -f' 6559 fi 6560 ;; 6561 6562 cegcc*) 6563 # use the weaker test based on 'objdump'. See mingw*. 6564 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6565 lt_cv_file_magic_cmd='$OBJDUMP -f' 6566 ;; 6567 6568 darwin* | rhapsody*) 6569 lt_cv_deplibs_check_method=pass_all 6570 ;; 6571 6572 freebsd* | dragonfly*) 6573 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6574 case $host_cpu in 6575 i*86 ) 6576 # Not sure whether the presence of OpenBSD here was a mistake. 6577 # Let's accept both of them until this is cleared up. 6578 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' 6579 lt_cv_file_magic_cmd=/usr/bin/file 6580 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6581 ;; 6582 esac 6583 else 6584 lt_cv_deplibs_check_method=pass_all 6585 fi 6586 ;; 6587 6588 haiku*) 6589 lt_cv_deplibs_check_method=pass_all 6590 ;; 6591 6592 hpux10.20* | hpux11*) 6593 lt_cv_file_magic_cmd=/usr/bin/file 6594 case $host_cpu in 6595 ia64*) 6596 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' 6597 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6598 ;; 6599 hppa*64*) 6600 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' 6601 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6602 ;; 6603 *) 6604 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' 6605 lt_cv_file_magic_test_file=/usr/lib/libc.sl 6606 ;; 6607 esac 6608 ;; 6609 6610 interix[3-9]*) 6611 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6612 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' 6613 ;; 6614 6615 irix5* | irix6* | nonstopux*) 6616 case $LD in 6617 *-32|*"-32 ") libmagic=32-bit;; 6618 *-n32|*"-n32 ") libmagic=N32;; 6619 *-64|*"-64 ") libmagic=64-bit;; 6620 *) libmagic=never-match;; 6621 esac 6622 lt_cv_deplibs_check_method=pass_all 6623 ;; 6624 6625 # This must be glibc/ELF. 6626 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6627 lt_cv_deplibs_check_method=pass_all 6628 ;; 6629 6630 netbsd* | netbsdelf*-gnu) 6631 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6632 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' 6633 else 6634 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' 6635 fi 6636 ;; 6637 6638 newos6*) 6639 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' 6640 lt_cv_file_magic_cmd=/usr/bin/file 6641 lt_cv_file_magic_test_file=/usr/lib/libnls.so 6642 ;; 6643 6644 *nto* | *qnx*) 6645 lt_cv_deplibs_check_method=pass_all 6646 ;; 6647 6648 openbsd* | bitrig*) 6649 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6650 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' 6651 else 6652 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' 6653 fi 6654 ;; 6655 6656 osf3* | osf4* | osf5*) 6657 lt_cv_deplibs_check_method=pass_all 6658 ;; 6659 6660 rdos*) 6661 lt_cv_deplibs_check_method=pass_all 6662 ;; 6663 6664 solaris*) 6665 lt_cv_deplibs_check_method=pass_all 6666 ;; 6667 6668 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6669 lt_cv_deplibs_check_method=pass_all 6670 ;; 6671 6672 sysv4 | sysv4.3*) 6673 case $host_vendor in 6674 motorola) 6675 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]' 6676 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6677 ;; 6678 ncr) 6679 lt_cv_deplibs_check_method=pass_all 6680 ;; 6681 sequent) 6682 lt_cv_file_magic_cmd='/bin/file' 6683 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' 6684 ;; 6685 sni) 6686 lt_cv_file_magic_cmd='/bin/file' 6687 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" 6688 lt_cv_file_magic_test_file=/lib/libc.so 6689 ;; 6690 siemens) 6691 lt_cv_deplibs_check_method=pass_all 6692 ;; 6693 pc) 6694 lt_cv_deplibs_check_method=pass_all 6695 ;; 6696 esac 6697 ;; 6698 6699 tpf*) 6700 lt_cv_deplibs_check_method=pass_all 6701 ;; 6702 os2*) 6703 lt_cv_deplibs_check_method=pass_all 6704 ;; 6705 esac 6706 6707 fi 6708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 6709 $as_echo "$lt_cv_deplibs_check_method" >&6; } 6710 6711 file_magic_glob= 6712 want_nocaseglob=no 6713 if test "$build" = "$host"; then 6714 case $host_os in 6715 mingw* | pw32*) 6716 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6717 want_nocaseglob=yes 6718 else 6719 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` 6720 fi 6721 ;; 6722 esac 6723 fi 6724 6725 file_magic_cmd=$lt_cv_file_magic_cmd 6726 deplibs_check_method=$lt_cv_deplibs_check_method 6727 test -z "$deplibs_check_method" && deplibs_check_method=unknown 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 if test -n "$ac_tool_prefix"; then 6751 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. 6752 set dummy ${ac_tool_prefix}dlltool; ac_word=$2 6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6754 $as_echo_n "checking for $ac_word... " >&6; } 6755 if ${ac_cv_prog_DLLTOOL+:} false; then : 6756 $as_echo_n "(cached) " >&6 6757 else 6758 if test -n "$DLLTOOL"; then 6759 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. 6760 else 6761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6762 for as_dir in $PATH 6763 do 6764 IFS=$as_save_IFS 6765 test -z "$as_dir" && as_dir=. 6766 for ac_exec_ext in '' $ac_executable_extensions; do 6767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6768 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" 6769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6770 break 2 6771 fi 6772 done 6773 done 6774 IFS=$as_save_IFS 6775 6776 fi 6777 fi 6778 DLLTOOL=$ac_cv_prog_DLLTOOL 6779 if test -n "$DLLTOOL"; then 6780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 6781 $as_echo "$DLLTOOL" >&6; } 6782 else 6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6784 $as_echo "no" >&6; } 6785 fi 6786 6787 6788 fi 6789 if test -z "$ac_cv_prog_DLLTOOL"; then 6790 ac_ct_DLLTOOL=$DLLTOOL 6791 # Extract the first word of "dlltool", so it can be a program name with args. 6792 set dummy dlltool; ac_word=$2 6793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6794 $as_echo_n "checking for $ac_word... " >&6; } 6795 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : 6796 $as_echo_n "(cached) " >&6 6797 else 6798 if test -n "$ac_ct_DLLTOOL"; then 6799 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. 6800 else 6801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6802 for as_dir in $PATH 6803 do 6804 IFS=$as_save_IFS 6805 test -z "$as_dir" && as_dir=. 6806 for ac_exec_ext in '' $ac_executable_extensions; do 6807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6808 ac_cv_prog_ac_ct_DLLTOOL="dlltool" 6809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6810 break 2 6811 fi 6812 done 6813 done 6814 IFS=$as_save_IFS 6815 6816 fi 6817 fi 6818 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL 6819 if test -n "$ac_ct_DLLTOOL"; then 6820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 6821 $as_echo "$ac_ct_DLLTOOL" >&6; } 6822 else 6823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6824 $as_echo "no" >&6; } 6825 fi 6826 6827 if test "x$ac_ct_DLLTOOL" = x; then 6828 DLLTOOL="false" 6829 else 6830 case $cross_compiling:$ac_tool_warned in 6831 yes:) 6832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6833 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6834 ac_tool_warned=yes ;; 6835 esac 6836 DLLTOOL=$ac_ct_DLLTOOL 6837 fi 6838 else 6839 DLLTOOL="$ac_cv_prog_DLLTOOL" 6840 fi 6841 6842 test -z "$DLLTOOL" && DLLTOOL=dlltool 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 6854 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } 6855 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : 6856 $as_echo_n "(cached) " >&6 6857 else 6858 lt_cv_sharedlib_from_linklib_cmd='unknown' 6859 6860 case $host_os in 6861 cygwin* | mingw* | pw32* | cegcc*) 6862 # two different shell functions defined in ltmain.sh; 6863 # decide which one to use based on capabilities of $DLLTOOL 6864 case `$DLLTOOL --help 2>&1` in 6865 *--identify-strict*) 6866 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 6867 ;; 6868 *) 6869 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 6870 ;; 6871 esac 6872 ;; 6873 *) 6874 # fallback: assume linklib IS sharedlib 6875 lt_cv_sharedlib_from_linklib_cmd=$ECHO 6876 ;; 6877 esac 6878 6879 fi 6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 6881 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } 6882 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 6883 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 6884 6885 6886 6887 6888 6889 6890 6891 if test -n "$ac_tool_prefix"; then 6892 for ac_prog in ar 6893 do 6894 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 6895 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 6896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6897 $as_echo_n "checking for $ac_word... " >&6; } 6898 if ${ac_cv_prog_AR+:} false; then : 6899 $as_echo_n "(cached) " >&6 6900 else 6901 if test -n "$AR"; then 6902 ac_cv_prog_AR="$AR" # Let the user override the test. 6903 else 6904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6905 for as_dir in $PATH 6906 do 6907 IFS=$as_save_IFS 6908 test -z "$as_dir" && as_dir=. 6909 for ac_exec_ext in '' $ac_executable_extensions; do 6910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6911 ac_cv_prog_AR="$ac_tool_prefix$ac_prog" 6912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6913 break 2 6914 fi 6915 done 6916 done 6917 IFS=$as_save_IFS 6918 6919 fi 6920 fi 6921 AR=$ac_cv_prog_AR 6922 if test -n "$AR"; then 6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 6924 $as_echo "$AR" >&6; } 6925 else 6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6927 $as_echo "no" >&6; } 6928 fi 6929 6930 6931 test -n "$AR" && break 6932 done 6933 fi 6934 if test -z "$AR"; then 6935 ac_ct_AR=$AR 6936 for ac_prog in ar 6937 do 6938 # Extract the first word of "$ac_prog", so it can be a program name with args. 6939 set dummy $ac_prog; ac_word=$2 6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6941 $as_echo_n "checking for $ac_word... " >&6; } 6942 if ${ac_cv_prog_ac_ct_AR+:} false; then : 6943 $as_echo_n "(cached) " >&6 6944 else 6945 if test -n "$ac_ct_AR"; then 6946 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 6947 else 6948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6949 for as_dir in $PATH 6950 do 6951 IFS=$as_save_IFS 6952 test -z "$as_dir" && as_dir=. 6953 for ac_exec_ext in '' $ac_executable_extensions; do 6954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6955 ac_cv_prog_ac_ct_AR="$ac_prog" 6956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6957 break 2 6958 fi 6959 done 6960 done 6961 IFS=$as_save_IFS 6962 6963 fi 6964 fi 6965 ac_ct_AR=$ac_cv_prog_ac_ct_AR 6966 if test -n "$ac_ct_AR"; then 6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 6968 $as_echo "$ac_ct_AR" >&6; } 6969 else 6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6971 $as_echo "no" >&6; } 6972 fi 6973 6974 6975 test -n "$ac_ct_AR" && break 6976 done 6977 6978 if test "x$ac_ct_AR" = x; then 6979 AR="false" 6980 else 6981 case $cross_compiling:$ac_tool_warned in 6982 yes:) 6983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6984 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6985 ac_tool_warned=yes ;; 6986 esac 6987 AR=$ac_ct_AR 6988 fi 6989 fi 6990 6991 : ${AR=ar} 6992 : ${AR_FLAGS=cru} 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 7005 $as_echo_n "checking for archiver @FILE support... " >&6; } 7006 if ${lt_cv_ar_at_file+:} false; then : 7007 $as_echo_n "(cached) " >&6 7008 else 7009 lt_cv_ar_at_file=no 7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7011 /* end confdefs.h. */ 7012 7013 int 7014 main () 7015 { 7016 7017 ; 7018 return 0; 7019 } 7020 _ACEOF 7021 if ac_fn_c_try_compile "$LINENO"; then : 7022 echo conftest.$ac_objext > conftest.lst 7023 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' 7024 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 7025 (eval $lt_ar_try) 2>&5 7026 ac_status=$? 7027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7028 test $ac_status = 0; } 7029 if test 0 -eq "$ac_status"; then 7030 # Ensure the archiver fails upon bogus file names. 7031 rm -f conftest.$ac_objext libconftest.a 7032 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 7033 (eval $lt_ar_try) 2>&5 7034 ac_status=$? 7035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7036 test $ac_status = 0; } 7037 if test 0 -ne "$ac_status"; then 7038 lt_cv_ar_at_file=@ 7039 fi 7040 fi 7041 rm -f conftest.* libconftest.a 7042 7043 fi 7044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7045 7046 fi 7047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 7048 $as_echo "$lt_cv_ar_at_file" >&6; } 7049 7050 if test no = "$lt_cv_ar_at_file"; then 7051 archiver_list_spec= 7052 else 7053 archiver_list_spec=$lt_cv_ar_at_file 7054 fi 7055 7056 7057 7058 7059 7060 7061 7062 if test -n "$ac_tool_prefix"; then 7063 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 7064 set dummy ${ac_tool_prefix}strip; ac_word=$2 7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7066 $as_echo_n "checking for $ac_word... " >&6; } 7067 if ${ac_cv_prog_STRIP+:} false; then : 7068 $as_echo_n "(cached) " >&6 7069 else 7070 if test -n "$STRIP"; then 7071 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 7072 else 7073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7074 for as_dir in $PATH 7075 do 7076 IFS=$as_save_IFS 7077 test -z "$as_dir" && as_dir=. 7078 for ac_exec_ext in '' $ac_executable_extensions; do 7079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7080 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 7081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7082 break 2 7083 fi 7084 done 7085 done 7086 IFS=$as_save_IFS 7087 7088 fi 7089 fi 7090 STRIP=$ac_cv_prog_STRIP 7091 if test -n "$STRIP"; then 7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 7093 $as_echo "$STRIP" >&6; } 7094 else 7095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7096 $as_echo "no" >&6; } 7097 fi 7098 7099 7100 fi 7101 if test -z "$ac_cv_prog_STRIP"; then 7102 ac_ct_STRIP=$STRIP 7103 # Extract the first word of "strip", so it can be a program name with args. 7104 set dummy strip; ac_word=$2 7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7106 $as_echo_n "checking for $ac_word... " >&6; } 7107 if ${ac_cv_prog_ac_ct_STRIP+:} false; then : 7108 $as_echo_n "(cached) " >&6 7109 else 7110 if test -n "$ac_ct_STRIP"; then 7111 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 7112 else 7113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7114 for as_dir in $PATH 7115 do 7116 IFS=$as_save_IFS 7117 test -z "$as_dir" && as_dir=. 7118 for ac_exec_ext in '' $ac_executable_extensions; do 7119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7120 ac_cv_prog_ac_ct_STRIP="strip" 7121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7122 break 2 7123 fi 7124 done 7125 done 7126 IFS=$as_save_IFS 7127 7128 fi 7129 fi 7130 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 7131 if test -n "$ac_ct_STRIP"; then 7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 7133 $as_echo "$ac_ct_STRIP" >&6; } 7134 else 7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7136 $as_echo "no" >&6; } 7137 fi 7138 7139 if test "x$ac_ct_STRIP" = x; then 7140 STRIP=":" 7141 else 7142 case $cross_compiling:$ac_tool_warned in 7143 yes:) 7144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7145 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 7146 ac_tool_warned=yes ;; 7147 esac 7148 STRIP=$ac_ct_STRIP 7149 fi 7150 else 7151 STRIP="$ac_cv_prog_STRIP" 7152 fi 7153 7154 test -z "$STRIP" && STRIP=: 7155 7156 7157 7158 7159 7160 7161 if test -n "$ac_tool_prefix"; then 7162 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 7163 set dummy ${ac_tool_prefix}ranlib; ac_word=$2 7164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7165 $as_echo_n "checking for $ac_word... " >&6; } 7166 if ${ac_cv_prog_RANLIB+:} false; then : 7167 $as_echo_n "(cached) " >&6 7168 else 7169 if test -n "$RANLIB"; then 7170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 7171 else 7172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7173 for as_dir in $PATH 7174 do 7175 IFS=$as_save_IFS 7176 test -z "$as_dir" && as_dir=. 7177 for ac_exec_ext in '' $ac_executable_extensions; do 7178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 7180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7181 break 2 7182 fi 7183 done 7184 done 7185 IFS=$as_save_IFS 7186 7187 fi 7188 fi 7189 RANLIB=$ac_cv_prog_RANLIB 7190 if test -n "$RANLIB"; then 7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 7192 $as_echo "$RANLIB" >&6; } 7193 else 7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7195 $as_echo "no" >&6; } 7196 fi 7197 7198 7199 fi 7200 if test -z "$ac_cv_prog_RANLIB"; then 7201 ac_ct_RANLIB=$RANLIB 7202 # Extract the first word of "ranlib", so it can be a program name with args. 7203 set dummy ranlib; ac_word=$2 7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7205 $as_echo_n "checking for $ac_word... " >&6; } 7206 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 7207 $as_echo_n "(cached) " >&6 7208 else 7209 if test -n "$ac_ct_RANLIB"; then 7210 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 7211 else 7212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7213 for as_dir in $PATH 7214 do 7215 IFS=$as_save_IFS 7216 test -z "$as_dir" && as_dir=. 7217 for ac_exec_ext in '' $ac_executable_extensions; do 7218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7219 ac_cv_prog_ac_ct_RANLIB="ranlib" 7220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7221 break 2 7222 fi 7223 done 7224 done 7225 IFS=$as_save_IFS 7226 7227 fi 7228 fi 7229 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 7230 if test -n "$ac_ct_RANLIB"; then 7231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 7232 $as_echo "$ac_ct_RANLIB" >&6; } 7233 else 7234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7235 $as_echo "no" >&6; } 7236 fi 7237 7238 if test "x$ac_ct_RANLIB" = x; then 7239 RANLIB=":" 7240 else 7241 case $cross_compiling:$ac_tool_warned in 7242 yes:) 7243 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7244 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 7245 ac_tool_warned=yes ;; 7246 esac 7247 RANLIB=$ac_ct_RANLIB 7248 fi 7249 else 7250 RANLIB="$ac_cv_prog_RANLIB" 7251 fi 7252 7253 test -z "$RANLIB" && RANLIB=: 7254 7255 7256 7257 7258 7259 7260 # Determine commands to create old-style static archives. 7261 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 7262 old_postinstall_cmds='chmod 644 $oldlib' 7263 old_postuninstall_cmds= 7264 7265 if test -n "$RANLIB"; then 7266 case $host_os in 7267 bitrig* | openbsd*) 7268 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 7269 ;; 7270 *) 7271 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 7272 ;; 7273 esac 7274 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 7275 fi 7276 7277 case $host_os in 7278 darwin*) 7279 lock_old_archive_extraction=yes ;; 7280 *) 7281 lock_old_archive_extraction=no ;; 7282 esac 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 # If no C compiler was specified, use CC. 7323 LTCC=${LTCC-"$CC"} 7324 7325 # If no C compiler flags were specified, use CFLAGS. 7326 LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 7327 7328 # Allow CC to be a program name with arguments. 7329 compiler=$CC 7330 7331 7332 # Check for command to grab the raw symbol name followed by C symbol from nm. 7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 7334 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } 7335 if ${lt_cv_sys_global_symbol_pipe+:} false; then : 7336 $as_echo_n "(cached) " >&6 7337 else 7338 7339 # These are sane defaults that work on at least a few old systems. 7340 # [They come from Ultrix. What could be older than Ultrix?!! ;)] 7341 7342 # Character class describing NM global symbol codes. 7343 symcode='[BCDEGRST]' 7344 7345 # Regexp to match symbols that can be accessed directly from C. 7346 sympat='\([_A-Za-z][_A-Za-z0-9]*\)' 7347 7348 # Define system-specific variables. 7349 case $host_os in 7350 aix*) 7351 symcode='[BCDT]' 7352 ;; 7353 cygwin* | mingw* | pw32* | cegcc*) 7354 symcode='[ABCDGISTW]' 7355 ;; 7356 hpux*) 7357 if test ia64 = "$host_cpu"; then 7358 symcode='[ABCDEGRST]' 7359 fi 7360 ;; 7361 irix* | nonstopux*) 7362 symcode='[BCDEGRST]' 7363 ;; 7364 osf*) 7365 symcode='[BCDEGQRST]' 7366 ;; 7367 solaris*) 7368 symcode='[BDRT]' 7369 ;; 7370 sco3.2v5*) 7371 symcode='[DT]' 7372 ;; 7373 sysv4.2uw2*) 7374 symcode='[DT]' 7375 ;; 7376 sysv5* | sco5v6* | unixware* | OpenUNIX*) 7377 symcode='[ABDT]' 7378 ;; 7379 sysv4) 7380 symcode='[DFNSTU]' 7381 ;; 7382 esac 7383 7384 # If we're using GNU nm, then use its standard symbol codes. 7385 case `$NM -V 2>&1` in 7386 *GNU* | *'with BFD'*) 7387 symcode='[ABCDGIRSTW]' ;; 7388 esac 7389 7390 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7391 # Gets list of data symbols to import. 7392 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 7393 # Adjust the below global symbol transforms to fixup imported variables. 7394 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7395 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7396 lt_c_name_lib_hook="\ 7397 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7398 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7399 else 7400 # Disable hooks by default. 7401 lt_cv_sys_global_symbol_to_import= 7402 lt_cdecl_hook= 7403 lt_c_name_hook= 7404 lt_c_name_lib_hook= 7405 fi 7406 7407 # Transform an extracted symbol line into a proper C declaration. 7408 # Some systems (esp. on ia64) link data and code symbols differently, 7409 # so use this general approach. 7410 lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 7411 $lt_cdecl_hook\ 7412 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7413 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7414 7415 # Transform an extracted symbol line into symbol name and symbol address 7416 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 7417 $lt_c_name_hook\ 7418 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7419 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7420 7421 # Transform an extracted symbol line into symbol name with lib prefix and 7422 # symbol address. 7423 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 7424 $lt_c_name_lib_hook\ 7425 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7426 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7427 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7428 7429 # Handle CRLF in mingw tool chain 7430 opt_cr= 7431 case $build_os in 7432 mingw*) 7433 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7434 ;; 7435 esac 7436 7437 # Try without a prefix underscore, then with it. 7438 for ac_symprfx in "" "_"; do 7439 7440 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7441 symxfrm="\\1 $ac_symprfx\\2 \\2" 7442 7443 # Write the raw and C identifiers. 7444 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7445 # Fake it for dumpbin and say T for any non-static function, 7446 # D for any global variable and I for any imported variable. 7447 # Also find C++ and __fastcall symbols from MSVC++, 7448 # which start with @ or ?. 7449 lt_cv_sys_global_symbol_pipe="$AWK '"\ 7450 " {last_section=section; section=\$ 3};"\ 7451 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7452 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7453 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7454 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7455 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7456 " \$ 0!~/External *\|/{next};"\ 7457 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7458 " {if(hide[section]) next};"\ 7459 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7460 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7461 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7462 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7463 " ' prfx=^$ac_symprfx" 7464 else 7465 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7466 fi 7467 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 7468 7469 # Check to see that the pipe works correctly. 7470 pipe_works=no 7471 7472 rm -f conftest* 7473 cat > conftest.$ac_ext <<_LT_EOF 7474 #ifdef __cplusplus 7475 extern "C" { 7476 #endif 7477 char nm_test_var; 7478 void nm_test_func(void); 7479 void nm_test_func(void){} 7480 #ifdef __cplusplus 7481 } 7482 #endif 7483 int main(){nm_test_var='a';nm_test_func();return(0);} 7484 _LT_EOF 7485 7486 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7487 (eval $ac_compile) 2>&5 7488 ac_status=$? 7489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7490 test $ac_status = 0; }; then 7491 # Now try to grab the symbols. 7492 nlist=conftest.nm 7493 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 7494 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 7495 ac_status=$? 7496 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7497 test $ac_status = 0; } && test -s "$nlist"; then 7498 # Try sorting and uniquifying the output. 7499 if sort "$nlist" | uniq > "$nlist"T; then 7500 mv -f "$nlist"T "$nlist" 7501 else 7502 rm -f "$nlist"T 7503 fi 7504 7505 # Make sure that we snagged all the symbols we need. 7506 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7507 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7508 cat <<_LT_EOF > conftest.$ac_ext 7509 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7510 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7511 /* DATA imports from DLLs on WIN32 can't be const, because runtime 7512 relocations are performed -- see ld's documentation on pseudo-relocs. */ 7513 # define LT_DLSYM_CONST 7514 #elif defined __osf__ 7515 /* This system does not cope well with relocations in const data. */ 7516 # define LT_DLSYM_CONST 7517 #else 7518 # define LT_DLSYM_CONST const 7519 #endif 7520 7521 #ifdef __cplusplus 7522 extern "C" { 7523 #endif 7524 7525 _LT_EOF 7526 # Now generate the symbol file. 7527 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7528 7529 cat <<_LT_EOF >> conftest.$ac_ext 7530 7531 /* The mapping between symbol names and symbols. */ 7532 LT_DLSYM_CONST struct { 7533 const char *name; 7534 void *address; 7535 } 7536 lt__PROGRAM__LTX_preloaded_symbols[] = 7537 { 7538 { "@PROGRAM@", (void *) 0 }, 7539 _LT_EOF 7540 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7541 cat <<\_LT_EOF >> conftest.$ac_ext 7542 {0, (void *) 0} 7543 }; 7544 7545 /* This works around a problem in FreeBSD linker */ 7546 #ifdef FREEBSD_WORKAROUND 7547 static const void *lt_preloaded_setup() { 7548 return lt__PROGRAM__LTX_preloaded_symbols; 7549 } 7550 #endif 7551 7552 #ifdef __cplusplus 7553 } 7554 #endif 7555 _LT_EOF 7556 # Now try linking the two files. 7557 mv conftest.$ac_objext conftstm.$ac_objext 7558 lt_globsym_save_LIBS=$LIBS 7559 lt_globsym_save_CFLAGS=$CFLAGS 7560 LIBS=conftstm.$ac_objext 7561 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" 7562 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 7563 (eval $ac_link) 2>&5 7564 ac_status=$? 7565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7566 test $ac_status = 0; } && test -s conftest$ac_exeext; then 7567 pipe_works=yes 7568 fi 7569 LIBS=$lt_globsym_save_LIBS 7570 CFLAGS=$lt_globsym_save_CFLAGS 7571 else 7572 echo "cannot find nm_test_func in $nlist" >&5 7573 fi 7574 else 7575 echo "cannot find nm_test_var in $nlist" >&5 7576 fi 7577 else 7578 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 7579 fi 7580 else 7581 echo "$progname: failed program was:" >&5 7582 cat conftest.$ac_ext >&5 7583 fi 7584 rm -rf conftest* conftst* 7585 7586 # Do not use the global_symbol_pipe unless it works. 7587 if test yes = "$pipe_works"; then 7588 break 7589 else 7590 lt_cv_sys_global_symbol_pipe= 7591 fi 7592 done 7593 7594 fi 7595 7596 if test -z "$lt_cv_sys_global_symbol_pipe"; then 7597 lt_cv_sys_global_symbol_to_cdecl= 7598 fi 7599 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 7601 $as_echo "failed" >&6; } 7602 else 7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 7604 $as_echo "ok" >&6; } 7605 fi 7606 7607 # Response file support. 7608 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7609 nm_file_list_spec='@' 7610 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then 7611 nm_file_list_spec='@' 7612 fi 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 7651 $as_echo_n "checking for sysroot... " >&6; } 7652 7653 # Check whether --with-sysroot was given. 7654 if test "${with_sysroot+set}" = set; then : 7655 withval=$with_sysroot; 7656 else 7657 with_sysroot=no 7658 fi 7659 7660 7661 lt_sysroot= 7662 case $with_sysroot in #( 7663 yes) 7664 if test yes = "$GCC"; then 7665 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 7666 fi 7667 ;; #( 7668 /*) 7669 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 7670 ;; #( 7671 no|'') 7672 ;; #( 7673 *) 7674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 7675 $as_echo "$with_sysroot" >&6; } 7676 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 7677 ;; 7678 esac 7679 7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 7681 $as_echo "${lt_sysroot:-no}" >&6; } 7682 7683 7684 7685 7686 7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 7688 $as_echo_n "checking for a working dd... " >&6; } 7689 if ${ac_cv_path_lt_DD+:} false; then : 7690 $as_echo_n "(cached) " >&6 7691 else 7692 printf 0123456789abcdef0123456789abcdef >conftest.i 7693 cat conftest.i conftest.i >conftest2.i 7694 : ${lt_DD:=$DD} 7695 if test -z "$lt_DD"; then 7696 ac_path_lt_DD_found=false 7697 # Loop through the user's path and test for each of PROGNAME-LIST 7698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7699 for as_dir in $PATH 7700 do 7701 IFS=$as_save_IFS 7702 test -z "$as_dir" && as_dir=. 7703 for ac_prog in dd; do 7704 for ac_exec_ext in '' $ac_executable_extensions; do 7705 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" 7706 as_fn_executable_p "$ac_path_lt_DD" || continue 7707 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7708 cmp -s conftest.i conftest.out \ 7709 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 7710 fi 7711 $ac_path_lt_DD_found && break 3 7712 done 7713 done 7714 done 7715 IFS=$as_save_IFS 7716 if test -z "$ac_cv_path_lt_DD"; then 7717 : 7718 fi 7719 else 7720 ac_cv_path_lt_DD=$lt_DD 7721 fi 7722 7723 rm -f conftest.i conftest2.i conftest.out 7724 fi 7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 7726 $as_echo "$ac_cv_path_lt_DD" >&6; } 7727 7728 7729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 7730 $as_echo_n "checking how to truncate binary pipes... " >&6; } 7731 if ${lt_cv_truncate_bin+:} false; then : 7732 $as_echo_n "(cached) " >&6 7733 else 7734 printf 0123456789abcdef0123456789abcdef >conftest.i 7735 cat conftest.i conftest.i >conftest2.i 7736 lt_cv_truncate_bin= 7737 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7738 cmp -s conftest.i conftest.out \ 7739 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 7740 fi 7741 rm -f conftest.i conftest2.i conftest.out 7742 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" 7743 fi 7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 7745 $as_echo "$lt_cv_truncate_bin" >&6; } 7746 7747 7748 7749 7750 7751 7752 7753 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 7754 func_cc_basename () 7755 { 7756 for cc_temp in $*""; do 7757 case $cc_temp in 7758 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; 7759 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; 7760 \-*) ;; 7761 *) break;; 7762 esac 7763 done 7764 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 7765 } 7766 7767 # Check whether --enable-libtool-lock was given. 7768 if test "${enable_libtool_lock+set}" = set; then : 7769 enableval=$enable_libtool_lock; 7770 fi 7771 7772 test no = "$enable_libtool_lock" || enable_libtool_lock=yes 7773 7774 # Some flags need to be propagated to the compiler or linker for good 7775 # libtool support. 7776 case $host in 7777 ia64-*-hpux*) 7778 # Find out what ABI is being produced by ac_compile, and set mode 7779 # options accordingly. 7780 echo 'int i;' > conftest.$ac_ext 7781 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7782 (eval $ac_compile) 2>&5 7783 ac_status=$? 7784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7785 test $ac_status = 0; }; then 7786 case `/usr/bin/file conftest.$ac_objext` in 7787 *ELF-32*) 7788 HPUX_IA64_MODE=32 7789 ;; 7790 *ELF-64*) 7791 HPUX_IA64_MODE=64 7792 ;; 7793 esac 7794 fi 7795 rm -rf conftest* 7796 ;; 7797 *-*-irix6*) 7798 # Find out what ABI is being produced by ac_compile, and set linker 7799 # options accordingly. 7800 echo '#line '$LINENO' "configure"' > conftest.$ac_ext 7801 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7802 (eval $ac_compile) 2>&5 7803 ac_status=$? 7804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7805 test $ac_status = 0; }; then 7806 if test yes = "$lt_cv_prog_gnu_ld"; then 7807 case `/usr/bin/file conftest.$ac_objext` in 7808 *32-bit*) 7809 LD="${LD-ld} -melf32bsmip" 7810 ;; 7811 *N32*) 7812 LD="${LD-ld} -melf32bmipn32" 7813 ;; 7814 *64-bit*) 7815 LD="${LD-ld} -melf64bmip" 7816 ;; 7817 esac 7818 else 7819 case `/usr/bin/file conftest.$ac_objext` in 7820 *32-bit*) 7821 LD="${LD-ld} -32" 7822 ;; 7823 *N32*) 7824 LD="${LD-ld} -n32" 7825 ;; 7826 *64-bit*) 7827 LD="${LD-ld} -64" 7828 ;; 7829 esac 7830 fi 7831 fi 7832 rm -rf conftest* 7833 ;; 7834 7835 mips64*-*linux*) 7836 # Find out what ABI is being produced by ac_compile, and set linker 7837 # options accordingly. 7838 echo '#line '$LINENO' "configure"' > conftest.$ac_ext 7839 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7840 (eval $ac_compile) 2>&5 7841 ac_status=$? 7842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7843 test $ac_status = 0; }; then 7844 emul=elf 7845 case `/usr/bin/file conftest.$ac_objext` in 7846 *32-bit*) 7847 emul="${emul}32" 7848 ;; 7849 *64-bit*) 7850 emul="${emul}64" 7851 ;; 7852 esac 7853 case `/usr/bin/file conftest.$ac_objext` in 7854 *MSB*) 7855 emul="${emul}btsmip" 7856 ;; 7857 *LSB*) 7858 emul="${emul}ltsmip" 7859 ;; 7860 esac 7861 case `/usr/bin/file conftest.$ac_objext` in 7862 *N32*) 7863 emul="${emul}n32" 7864 ;; 7865 esac 7866 LD="${LD-ld} -m $emul" 7867 fi 7868 rm -rf conftest* 7869 ;; 7870 7871 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 7872 s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 7873 # Find out what ABI is being produced by ac_compile, and set linker 7874 # options accordingly. Note that the listed cases only cover the 7875 # situations where additional linker options are needed (such as when 7876 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 7877 # vice versa); the common cases where no linker options are needed do 7878 # not appear in the list. 7879 echo 'int i;' > conftest.$ac_ext 7880 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7881 (eval $ac_compile) 2>&5 7882 ac_status=$? 7883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7884 test $ac_status = 0; }; then 7885 case `/usr/bin/file conftest.o` in 7886 *32-bit*) 7887 case $host in 7888 x86_64-*kfreebsd*-gnu) 7889 LD="${LD-ld} -m elf_i386_fbsd" 7890 ;; 7891 x86_64-*linux*) 7892 case `/usr/bin/file conftest.o` in 7893 *x86-64*) 7894 LD="${LD-ld} -m elf32_x86_64" 7895 ;; 7896 *) 7897 LD="${LD-ld} -m elf_i386" 7898 ;; 7899 esac 7900 ;; 7901 powerpc64le-*linux*) 7902 LD="${LD-ld} -m elf32lppclinux" 7903 ;; 7904 powerpc64-*linux*) 7905 LD="${LD-ld} -m elf32ppclinux" 7906 ;; 7907 s390x-*linux*) 7908 LD="${LD-ld} -m elf_s390" 7909 ;; 7910 sparc64-*linux*) 7911 LD="${LD-ld} -m elf32_sparc" 7912 ;; 7913 esac 7914 ;; 7915 *64-bit*) 7916 case $host in 7917 x86_64-*kfreebsd*-gnu) 7918 LD="${LD-ld} -m elf_x86_64_fbsd" 7919 ;; 7920 x86_64-*linux*) 7921 LD="${LD-ld} -m elf_x86_64" 7922 ;; 7923 powerpcle-*linux*) 7924 LD="${LD-ld} -m elf64lppc" 7925 ;; 7926 powerpc-*linux*) 7927 LD="${LD-ld} -m elf64ppc" 7928 ;; 7929 s390*-*linux*|s390*-*tpf*) 7930 LD="${LD-ld} -m elf64_s390" 7931 ;; 7932 sparc*-*linux*) 7933 LD="${LD-ld} -m elf64_sparc" 7934 ;; 7935 esac 7936 ;; 7937 esac 7938 fi 7939 rm -rf conftest* 7940 ;; 7941 7942 *-*-sco3.2v5*) 7943 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 7944 SAVE_CFLAGS=$CFLAGS 7945 CFLAGS="$CFLAGS -belf" 7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 7947 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } 7948 if ${lt_cv_cc_needs_belf+:} false; then : 7949 $as_echo_n "(cached) " >&6 7950 else 7951 ac_ext=c 7952 ac_cpp='$CPP $CPPFLAGS' 7953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 7954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 7955 ac_compiler_gnu=$ac_cv_c_compiler_gnu 7956 7957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7958 /* end confdefs.h. */ 7959 7960 int 7961 main () 7962 { 7963 7964 ; 7965 return 0; 7966 } 7967 _ACEOF 7968 if ac_fn_c_try_link "$LINENO"; then : 7969 lt_cv_cc_needs_belf=yes 7970 else 7971 lt_cv_cc_needs_belf=no 7972 fi 7973 rm -f core conftest.err conftest.$ac_objext \ 7974 conftest$ac_exeext conftest.$ac_ext 7975 ac_ext=c 7976 ac_cpp='$CPP $CPPFLAGS' 7977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 7978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 7979 ac_compiler_gnu=$ac_cv_c_compiler_gnu 7980 7981 fi 7982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 7983 $as_echo "$lt_cv_cc_needs_belf" >&6; } 7984 if test yes != "$lt_cv_cc_needs_belf"; then 7985 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 7986 CFLAGS=$SAVE_CFLAGS 7987 fi 7988 ;; 7989 *-*solaris*) 7990 # Find out what ABI is being produced by ac_compile, and set linker 7991 # options accordingly. 7992 echo 'int i;' > conftest.$ac_ext 7993 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7994 (eval $ac_compile) 2>&5 7995 ac_status=$? 7996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7997 test $ac_status = 0; }; then 7998 case `/usr/bin/file conftest.o` in 7999 *64-bit*) 8000 case $lt_cv_prog_gnu_ld in 8001 yes*) 8002 case $host in 8003 i?86-*-solaris*|x86_64-*-solaris*) 8004 LD="${LD-ld} -m elf_x86_64" 8005 ;; 8006 sparc*-*-solaris*) 8007 LD="${LD-ld} -m elf64_sparc" 8008 ;; 8009 esac 8010 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 8011 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 8012 LD=${LD-ld}_sol2 8013 fi 8014 ;; 8015 *) 8016 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 8017 LD="${LD-ld} -64" 8018 fi 8019 ;; 8020 esac 8021 ;; 8022 esac 8023 fi 8024 rm -rf conftest* 8025 ;; 8026 esac 8027 8028 need_locks=$enable_libtool_lock 8029 8030 if test -n "$ac_tool_prefix"; then 8031 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. 8032 set dummy ${ac_tool_prefix}mt; ac_word=$2 8033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8034 $as_echo_n "checking for $ac_word... " >&6; } 8035 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : 8036 $as_echo_n "(cached) " >&6 8037 else 8038 if test -n "$MANIFEST_TOOL"; then 8039 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. 8040 else 8041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8042 for as_dir in $PATH 8043 do 8044 IFS=$as_save_IFS 8045 test -z "$as_dir" && as_dir=. 8046 for ac_exec_ext in '' $ac_executable_extensions; do 8047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8048 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" 8049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8050 break 2 8051 fi 8052 done 8053 done 8054 IFS=$as_save_IFS 8055 8056 fi 8057 fi 8058 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL 8059 if test -n "$MANIFEST_TOOL"; then 8060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 8061 $as_echo "$MANIFEST_TOOL" >&6; } 8062 else 8063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8064 $as_echo "no" >&6; } 8065 fi 8066 8067 8068 fi 8069 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then 8070 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL 8071 # Extract the first word of "mt", so it can be a program name with args. 8072 set dummy mt; ac_word=$2 8073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8074 $as_echo_n "checking for $ac_word... " >&6; } 8075 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : 8076 $as_echo_n "(cached) " >&6 8077 else 8078 if test -n "$ac_ct_MANIFEST_TOOL"; then 8079 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. 8080 else 8081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8082 for as_dir in $PATH 8083 do 8084 IFS=$as_save_IFS 8085 test -z "$as_dir" && as_dir=. 8086 for ac_exec_ext in '' $ac_executable_extensions; do 8087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8088 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" 8089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8090 break 2 8091 fi 8092 done 8093 done 8094 IFS=$as_save_IFS 8095 8096 fi 8097 fi 8098 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL 8099 if test -n "$ac_ct_MANIFEST_TOOL"; then 8100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 8101 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } 8102 else 8103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8104 $as_echo "no" >&6; } 8105 fi 8106 8107 if test "x$ac_ct_MANIFEST_TOOL" = x; then 8108 MANIFEST_TOOL=":" 8109 else 8110 case $cross_compiling:$ac_tool_warned in 8111 yes:) 8112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8114 ac_tool_warned=yes ;; 8115 esac 8116 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL 8117 fi 8118 else 8119 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" 8120 fi 8121 8122 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 8123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 8124 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } 8125 if ${lt_cv_path_mainfest_tool+:} false; then : 8126 $as_echo_n "(cached) " >&6 8127 else 8128 lt_cv_path_mainfest_tool=no 8129 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 8130 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 8131 cat conftest.err >&5 8132 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 8133 lt_cv_path_mainfest_tool=yes 8134 fi 8135 rm -f conftest* 8136 fi 8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 8138 $as_echo "$lt_cv_path_mainfest_tool" >&6; } 8139 if test yes != "$lt_cv_path_mainfest_tool"; then 8140 MANIFEST_TOOL=: 8141 fi 8142 8143 8144 8145 8146 8147 8148 case $host_os in 8149 rhapsody* | darwin*) 8150 if test -n "$ac_tool_prefix"; then 8151 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. 8152 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 8153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8154 $as_echo_n "checking for $ac_word... " >&6; } 8155 if ${ac_cv_prog_DSYMUTIL+:} false; then : 8156 $as_echo_n "(cached) " >&6 8157 else 8158 if test -n "$DSYMUTIL"; then 8159 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. 8160 else 8161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8162 for as_dir in $PATH 8163 do 8164 IFS=$as_save_IFS 8165 test -z "$as_dir" && as_dir=. 8166 for ac_exec_ext in '' $ac_executable_extensions; do 8167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8168 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" 8169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8170 break 2 8171 fi 8172 done 8173 done 8174 IFS=$as_save_IFS 8175 8176 fi 8177 fi 8178 DSYMUTIL=$ac_cv_prog_DSYMUTIL 8179 if test -n "$DSYMUTIL"; then 8180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 8181 $as_echo "$DSYMUTIL" >&6; } 8182 else 8183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8184 $as_echo "no" >&6; } 8185 fi 8186 8187 8188 fi 8189 if test -z "$ac_cv_prog_DSYMUTIL"; then 8190 ac_ct_DSYMUTIL=$DSYMUTIL 8191 # Extract the first word of "dsymutil", so it can be a program name with args. 8192 set dummy dsymutil; ac_word=$2 8193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8194 $as_echo_n "checking for $ac_word... " >&6; } 8195 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : 8196 $as_echo_n "(cached) " >&6 8197 else 8198 if test -n "$ac_ct_DSYMUTIL"; then 8199 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. 8200 else 8201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8202 for as_dir in $PATH 8203 do 8204 IFS=$as_save_IFS 8205 test -z "$as_dir" && as_dir=. 8206 for ac_exec_ext in '' $ac_executable_extensions; do 8207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8208 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" 8209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8210 break 2 8211 fi 8212 done 8213 done 8214 IFS=$as_save_IFS 8215 8216 fi 8217 fi 8218 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL 8219 if test -n "$ac_ct_DSYMUTIL"; then 8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 8221 $as_echo "$ac_ct_DSYMUTIL" >&6; } 8222 else 8223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8224 $as_echo "no" >&6; } 8225 fi 8226 8227 if test "x$ac_ct_DSYMUTIL" = x; then 8228 DSYMUTIL=":" 8229 else 8230 case $cross_compiling:$ac_tool_warned in 8231 yes:) 8232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8233 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8234 ac_tool_warned=yes ;; 8235 esac 8236 DSYMUTIL=$ac_ct_DSYMUTIL 8237 fi 8238 else 8239 DSYMUTIL="$ac_cv_prog_DSYMUTIL" 8240 fi 8241 8242 if test -n "$ac_tool_prefix"; then 8243 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. 8244 set dummy ${ac_tool_prefix}nmedit; ac_word=$2 8245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8246 $as_echo_n "checking for $ac_word... " >&6; } 8247 if ${ac_cv_prog_NMEDIT+:} false; then : 8248 $as_echo_n "(cached) " >&6 8249 else 8250 if test -n "$NMEDIT"; then 8251 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. 8252 else 8253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8254 for as_dir in $PATH 8255 do 8256 IFS=$as_save_IFS 8257 test -z "$as_dir" && as_dir=. 8258 for ac_exec_ext in '' $ac_executable_extensions; do 8259 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8260 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" 8261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8262 break 2 8263 fi 8264 done 8265 done 8266 IFS=$as_save_IFS 8267 8268 fi 8269 fi 8270 NMEDIT=$ac_cv_prog_NMEDIT 8271 if test -n "$NMEDIT"; then 8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 8273 $as_echo "$NMEDIT" >&6; } 8274 else 8275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8276 $as_echo "no" >&6; } 8277 fi 8278 8279 8280 fi 8281 if test -z "$ac_cv_prog_NMEDIT"; then 8282 ac_ct_NMEDIT=$NMEDIT 8283 # Extract the first word of "nmedit", so it can be a program name with args. 8284 set dummy nmedit; ac_word=$2 8285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8286 $as_echo_n "checking for $ac_word... " >&6; } 8287 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : 8288 $as_echo_n "(cached) " >&6 8289 else 8290 if test -n "$ac_ct_NMEDIT"; then 8291 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. 8292 else 8293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8294 for as_dir in $PATH 8295 do 8296 IFS=$as_save_IFS 8297 test -z "$as_dir" && as_dir=. 8298 for ac_exec_ext in '' $ac_executable_extensions; do 8299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8300 ac_cv_prog_ac_ct_NMEDIT="nmedit" 8301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8302 break 2 8303 fi 8304 done 8305 done 8306 IFS=$as_save_IFS 8307 8308 fi 8309 fi 8310 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT 8311 if test -n "$ac_ct_NMEDIT"; then 8312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 8313 $as_echo "$ac_ct_NMEDIT" >&6; } 8314 else 8315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8316 $as_echo "no" >&6; } 8317 fi 8318 8319 if test "x$ac_ct_NMEDIT" = x; then 8320 NMEDIT=":" 8321 else 8322 case $cross_compiling:$ac_tool_warned in 8323 yes:) 8324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8325 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8326 ac_tool_warned=yes ;; 8327 esac 8328 NMEDIT=$ac_ct_NMEDIT 8329 fi 8330 else 8331 NMEDIT="$ac_cv_prog_NMEDIT" 8332 fi 8333 8334 if test -n "$ac_tool_prefix"; then 8335 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. 8336 set dummy ${ac_tool_prefix}lipo; ac_word=$2 8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8338 $as_echo_n "checking for $ac_word... " >&6; } 8339 if ${ac_cv_prog_LIPO+:} false; then : 8340 $as_echo_n "(cached) " >&6 8341 else 8342 if test -n "$LIPO"; then 8343 ac_cv_prog_LIPO="$LIPO" # Let the user override the test. 8344 else 8345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8346 for as_dir in $PATH 8347 do 8348 IFS=$as_save_IFS 8349 test -z "$as_dir" && as_dir=. 8350 for ac_exec_ext in '' $ac_executable_extensions; do 8351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8352 ac_cv_prog_LIPO="${ac_tool_prefix}lipo" 8353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8354 break 2 8355 fi 8356 done 8357 done 8358 IFS=$as_save_IFS 8359 8360 fi 8361 fi 8362 LIPO=$ac_cv_prog_LIPO 8363 if test -n "$LIPO"; then 8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 8365 $as_echo "$LIPO" >&6; } 8366 else 8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8368 $as_echo "no" >&6; } 8369 fi 8370 8371 8372 fi 8373 if test -z "$ac_cv_prog_LIPO"; then 8374 ac_ct_LIPO=$LIPO 8375 # Extract the first word of "lipo", so it can be a program name with args. 8376 set dummy lipo; ac_word=$2 8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8378 $as_echo_n "checking for $ac_word... " >&6; } 8379 if ${ac_cv_prog_ac_ct_LIPO+:} false; then : 8380 $as_echo_n "(cached) " >&6 8381 else 8382 if test -n "$ac_ct_LIPO"; then 8383 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. 8384 else 8385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8386 for as_dir in $PATH 8387 do 8388 IFS=$as_save_IFS 8389 test -z "$as_dir" && as_dir=. 8390 for ac_exec_ext in '' $ac_executable_extensions; do 8391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8392 ac_cv_prog_ac_ct_LIPO="lipo" 8393 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8394 break 2 8395 fi 8396 done 8397 done 8398 IFS=$as_save_IFS 8399 8400 fi 8401 fi 8402 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO 8403 if test -n "$ac_ct_LIPO"; then 8404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 8405 $as_echo "$ac_ct_LIPO" >&6; } 8406 else 8407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8408 $as_echo "no" >&6; } 8409 fi 8410 8411 if test "x$ac_ct_LIPO" = x; then 8412 LIPO=":" 8413 else 8414 case $cross_compiling:$ac_tool_warned in 8415 yes:) 8416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8417 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8418 ac_tool_warned=yes ;; 8419 esac 8420 LIPO=$ac_ct_LIPO 8421 fi 8422 else 8423 LIPO="$ac_cv_prog_LIPO" 8424 fi 8425 8426 if test -n "$ac_tool_prefix"; then 8427 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. 8428 set dummy ${ac_tool_prefix}otool; ac_word=$2 8429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8430 $as_echo_n "checking for $ac_word... " >&6; } 8431 if ${ac_cv_prog_OTOOL+:} false; then : 8432 $as_echo_n "(cached) " >&6 8433 else 8434 if test -n "$OTOOL"; then 8435 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. 8436 else 8437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8438 for as_dir in $PATH 8439 do 8440 IFS=$as_save_IFS 8441 test -z "$as_dir" && as_dir=. 8442 for ac_exec_ext in '' $ac_executable_extensions; do 8443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8444 ac_cv_prog_OTOOL="${ac_tool_prefix}otool" 8445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8446 break 2 8447 fi 8448 done 8449 done 8450 IFS=$as_save_IFS 8451 8452 fi 8453 fi 8454 OTOOL=$ac_cv_prog_OTOOL 8455 if test -n "$OTOOL"; then 8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 8457 $as_echo "$OTOOL" >&6; } 8458 else 8459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8460 $as_echo "no" >&6; } 8461 fi 8462 8463 8464 fi 8465 if test -z "$ac_cv_prog_OTOOL"; then 8466 ac_ct_OTOOL=$OTOOL 8467 # Extract the first word of "otool", so it can be a program name with args. 8468 set dummy otool; ac_word=$2 8469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8470 $as_echo_n "checking for $ac_word... " >&6; } 8471 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : 8472 $as_echo_n "(cached) " >&6 8473 else 8474 if test -n "$ac_ct_OTOOL"; then 8475 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. 8476 else 8477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8478 for as_dir in $PATH 8479 do 8480 IFS=$as_save_IFS 8481 test -z "$as_dir" && as_dir=. 8482 for ac_exec_ext in '' $ac_executable_extensions; do 8483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8484 ac_cv_prog_ac_ct_OTOOL="otool" 8485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8486 break 2 8487 fi 8488 done 8489 done 8490 IFS=$as_save_IFS 8491 8492 fi 8493 fi 8494 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL 8495 if test -n "$ac_ct_OTOOL"; then 8496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 8497 $as_echo "$ac_ct_OTOOL" >&6; } 8498 else 8499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8500 $as_echo "no" >&6; } 8501 fi 8502 8503 if test "x$ac_ct_OTOOL" = x; then 8504 OTOOL=":" 8505 else 8506 case $cross_compiling:$ac_tool_warned in 8507 yes:) 8508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8510 ac_tool_warned=yes ;; 8511 esac 8512 OTOOL=$ac_ct_OTOOL 8513 fi 8514 else 8515 OTOOL="$ac_cv_prog_OTOOL" 8516 fi 8517 8518 if test -n "$ac_tool_prefix"; then 8519 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. 8520 set dummy ${ac_tool_prefix}otool64; ac_word=$2 8521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8522 $as_echo_n "checking for $ac_word... " >&6; } 8523 if ${ac_cv_prog_OTOOL64+:} false; then : 8524 $as_echo_n "(cached) " >&6 8525 else 8526 if test -n "$OTOOL64"; then 8527 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. 8528 else 8529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8530 for as_dir in $PATH 8531 do 8532 IFS=$as_save_IFS 8533 test -z "$as_dir" && as_dir=. 8534 for ac_exec_ext in '' $ac_executable_extensions; do 8535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8536 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" 8537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8538 break 2 8539 fi 8540 done 8541 done 8542 IFS=$as_save_IFS 8543 8544 fi 8545 fi 8546 OTOOL64=$ac_cv_prog_OTOOL64 8547 if test -n "$OTOOL64"; then 8548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 8549 $as_echo "$OTOOL64" >&6; } 8550 else 8551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8552 $as_echo "no" >&6; } 8553 fi 8554 8555 8556 fi 8557 if test -z "$ac_cv_prog_OTOOL64"; then 8558 ac_ct_OTOOL64=$OTOOL64 8559 # Extract the first word of "otool64", so it can be a program name with args. 8560 set dummy otool64; ac_word=$2 8561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8562 $as_echo_n "checking for $ac_word... " >&6; } 8563 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : 8564 $as_echo_n "(cached) " >&6 8565 else 8566 if test -n "$ac_ct_OTOOL64"; then 8567 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. 8568 else 8569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8570 for as_dir in $PATH 8571 do 8572 IFS=$as_save_IFS 8573 test -z "$as_dir" && as_dir=. 8574 for ac_exec_ext in '' $ac_executable_extensions; do 8575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8576 ac_cv_prog_ac_ct_OTOOL64="otool64" 8577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8578 break 2 8579 fi 8580 done 8581 done 8582 IFS=$as_save_IFS 8583 8584 fi 8585 fi 8586 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 8587 if test -n "$ac_ct_OTOOL64"; then 8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 8589 $as_echo "$ac_ct_OTOOL64" >&6; } 8590 else 8591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8592 $as_echo "no" >&6; } 8593 fi 8594 8595 if test "x$ac_ct_OTOOL64" = x; then 8596 OTOOL64=":" 8597 else 8598 case $cross_compiling:$ac_tool_warned in 8599 yes:) 8600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8601 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8602 ac_tool_warned=yes ;; 8603 esac 8604 OTOOL64=$ac_ct_OTOOL64 8605 fi 8606 else 8607 OTOOL64="$ac_cv_prog_OTOOL64" 8608 fi 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 8637 $as_echo_n "checking for -single_module linker flag... " >&6; } 8638 if ${lt_cv_apple_cc_single_mod+:} false; then : 8639 $as_echo_n "(cached) " >&6 8640 else 8641 lt_cv_apple_cc_single_mod=no 8642 if test -z "$LT_MULTI_MODULE"; then 8643 # By default we will add the -single_module flag. You can override 8644 # by either setting the environment variable LT_MULTI_MODULE 8645 # non-empty at configure time, or by adding -multi_module to the 8646 # link flags. 8647 rm -rf libconftest.dylib* 8648 echo "int foo(void){return 1;}" > conftest.c 8649 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 8650 -dynamiclib -Wl,-single_module conftest.c" >&5 8651 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 8652 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 8653 _lt_result=$? 8654 # If there is a non-empty error log, and "single_module" 8655 # appears in it, assume the flag caused a linker warning 8656 if test -s conftest.err && $GREP single_module conftest.err; then 8657 cat conftest.err >&5 8658 # Otherwise, if the output was created with a 0 exit code from 8659 # the compiler, it worked. 8660 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 8661 lt_cv_apple_cc_single_mod=yes 8662 else 8663 cat conftest.err >&5 8664 fi 8665 rm -rf libconftest.dylib* 8666 rm -f conftest.* 8667 fi 8668 fi 8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 8670 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } 8671 8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 8673 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } 8674 if ${lt_cv_ld_exported_symbols_list+:} false; then : 8675 $as_echo_n "(cached) " >&6 8676 else 8677 lt_cv_ld_exported_symbols_list=no 8678 save_LDFLAGS=$LDFLAGS 8679 echo "_main" > conftest.sym 8680 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8682 /* end confdefs.h. */ 8683 8684 int 8685 main () 8686 { 8687 8688 ; 8689 return 0; 8690 } 8691 _ACEOF 8692 if ac_fn_c_try_link "$LINENO"; then : 8693 lt_cv_ld_exported_symbols_list=yes 8694 else 8695 lt_cv_ld_exported_symbols_list=no 8696 fi 8697 rm -f core conftest.err conftest.$ac_objext \ 8698 conftest$ac_exeext conftest.$ac_ext 8699 LDFLAGS=$save_LDFLAGS 8700 8701 fi 8702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 8703 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } 8704 8705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 8706 $as_echo_n "checking for -force_load linker flag... " >&6; } 8707 if ${lt_cv_ld_force_load+:} false; then : 8708 $as_echo_n "(cached) " >&6 8709 else 8710 lt_cv_ld_force_load=no 8711 cat > conftest.c << _LT_EOF 8712 int forced_loaded() { return 2;} 8713 _LT_EOF 8714 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 8715 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 8716 echo "$AR cru libconftest.a conftest.o" >&5 8717 $AR cru libconftest.a conftest.o 2>&5 8718 echo "$RANLIB libconftest.a" >&5 8719 $RANLIB libconftest.a 2>&5 8720 cat > conftest.c << _LT_EOF 8721 int main() { return 0;} 8722 _LT_EOF 8723 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 8724 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 8725 _lt_result=$? 8726 if test -s conftest.err && $GREP force_load conftest.err; then 8727 cat conftest.err >&5 8728 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 8729 lt_cv_ld_force_load=yes 8730 else 8731 cat conftest.err >&5 8732 fi 8733 rm -f conftest.err libconftest.a conftest conftest.c 8734 rm -rf conftest.dSYM 8735 8736 fi 8737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 8738 $as_echo "$lt_cv_ld_force_load" >&6; } 8739 case $host_os in 8740 rhapsody* | darwin1.[012]) 8741 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 8742 darwin1.*) 8743 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 8744 darwin*) # darwin 5.x on 8745 # if running on 10.5 or later, the deployment target defaults 8746 # to the OS version, if on x86, and 10.4, the deployment 8747 # target defaults to 10.4. Don't you love it? 8748 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 8749 10.0,*86*-darwin8*|10.0,*-darwin[91]*) 8750 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 8751 10.[012][,.]*) 8752 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 8753 10.*) 8754 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 8755 esac 8756 ;; 8757 esac 8758 if test yes = "$lt_cv_apple_cc_single_mod"; then 8759 _lt_dar_single_mod='$single_module' 8760 fi 8761 if test yes = "$lt_cv_ld_exported_symbols_list"; then 8762 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 8763 else 8764 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 8765 fi 8766 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 8767 _lt_dsymutil='~$DSYMUTIL $lib || :' 8768 else 8769 _lt_dsymutil= 8770 fi 8771 ;; 8772 esac 8773 8774 # func_munge_path_list VARIABLE PATH 8775 # ----------------------------------- 8776 # VARIABLE is name of variable containing _space_ separated list of 8777 # directories to be munged by the contents of PATH, which is string 8778 # having a format: 8779 # "DIR[:DIR]:" 8780 # string "DIR[ DIR]" will be prepended to VARIABLE 8781 # ":DIR[:DIR]" 8782 # string "DIR[ DIR]" will be appended to VARIABLE 8783 # "DIRP[:DIRP]::[DIRA:]DIRA" 8784 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string 8785 # "DIRA[ DIRA]" will be appended to VARIABLE 8786 # "DIR[:DIR]" 8787 # VARIABLE will be replaced by "DIR[ DIR]" 8788 func_munge_path_list () 8789 { 8790 case x$2 in 8791 x) 8792 ;; 8793 *:) 8794 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" 8795 ;; 8796 x:*) 8797 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" 8798 ;; 8799 *::*) 8800 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 8801 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" 8802 ;; 8803 *) 8804 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" 8805 ;; 8806 esac 8807 } 8808 8809 ac_ext=c 8810 ac_cpp='$CPP $CPPFLAGS' 8811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8813 ac_compiler_gnu=$ac_cv_c_compiler_gnu 8814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 8815 $as_echo_n "checking how to run the C preprocessor... " >&6; } 8816 # On Suns, sometimes $CPP names a directory. 8817 if test -n "$CPP" && test -d "$CPP"; then 8818 CPP= 8819 fi 8820 if test -z "$CPP"; then 8821 if ${ac_cv_prog_CPP+:} false; then : 8822 $as_echo_n "(cached) " >&6 8823 else 8824 # Double quotes because CPP needs to be expanded 8825 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 8826 do 8827 ac_preproc_ok=false 8828 for ac_c_preproc_warn_flag in '' yes 8829 do 8830 # Use a header file that comes with gcc, so configuring glibc 8831 # with a fresh cross-compiler works. 8832 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 8833 # <limits.h> exists even on freestanding compilers. 8834 # On the NeXT, cc -E runs the code through the compiler's parser, 8835 # not just through cpp. "Syntax error" is here to catch this case. 8836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8837 /* end confdefs.h. */ 8838 #ifdef __STDC__ 8839 # include <limits.h> 8840 #else 8841 # include <assert.h> 8842 #endif 8843 Syntax error 8844 _ACEOF 8845 if ac_fn_c_try_cpp "$LINENO"; then : 8846 8847 else 8848 # Broken: fails on valid input. 8849 continue 8850 fi 8851 rm -f conftest.err conftest.i conftest.$ac_ext 8852 8853 # OK, works on sane cases. Now check whether nonexistent headers 8854 # can be detected and how. 8855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8856 /* end confdefs.h. */ 8857 #include <ac_nonexistent.h> 8858 _ACEOF 8859 if ac_fn_c_try_cpp "$LINENO"; then : 8860 # Broken: success on invalid input. 8861 continue 8862 else 8863 # Passes both tests. 8864 ac_preproc_ok=: 8865 break 8866 fi 8867 rm -f conftest.err conftest.i conftest.$ac_ext 8868 8869 done 8870 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 8871 rm -f conftest.i conftest.err conftest.$ac_ext 8872 if $ac_preproc_ok; then : 8873 break 8874 fi 8875 8876 done 8877 ac_cv_prog_CPP=$CPP 8878 8879 fi 8880 CPP=$ac_cv_prog_CPP 8881 else 8882 ac_cv_prog_CPP=$CPP 8883 fi 8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 8885 $as_echo "$CPP" >&6; } 8886 ac_preproc_ok=false 8887 for ac_c_preproc_warn_flag in '' yes 8888 do 8889 # Use a header file that comes with gcc, so configuring glibc 8890 # with a fresh cross-compiler works. 8891 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 8892 # <limits.h> exists even on freestanding compilers. 8893 # On the NeXT, cc -E runs the code through the compiler's parser, 8894 # not just through cpp. "Syntax error" is here to catch this case. 8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8896 /* end confdefs.h. */ 8897 #ifdef __STDC__ 8898 # include <limits.h> 8899 #else 8900 # include <assert.h> 8901 #endif 8902 Syntax error 8903 _ACEOF 8904 if ac_fn_c_try_cpp "$LINENO"; then : 8905 8906 else 8907 # Broken: fails on valid input. 8908 continue 8909 fi 8910 rm -f conftest.err conftest.i conftest.$ac_ext 8911 8912 # OK, works on sane cases. Now check whether nonexistent headers 8913 # can be detected and how. 8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8915 /* end confdefs.h. */ 8916 #include <ac_nonexistent.h> 8917 _ACEOF 8918 if ac_fn_c_try_cpp "$LINENO"; then : 8919 # Broken: success on invalid input. 8920 continue 8921 else 8922 # Passes both tests. 8923 ac_preproc_ok=: 8924 break 8925 fi 8926 rm -f conftest.err conftest.i conftest.$ac_ext 8927 8928 done 8929 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 8930 rm -f conftest.i conftest.err conftest.$ac_ext 8931 if $ac_preproc_ok; then : 8932 8933 else 8934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 8935 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 8936 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 8937 See \`config.log' for more details" "$LINENO" 5; } 8938 fi 8939 8940 ac_ext=c 8941 ac_cpp='$CPP $CPPFLAGS' 8942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8944 ac_compiler_gnu=$ac_cv_c_compiler_gnu 8945 8946 5764 8947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 5765 8948 $as_echo_n "checking for ANSI C header files... " >&6; } … … 5891 9074 5892 9075 9076 for ac_header in dlfcn.h 9077 do : 9078 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default 9079 " 9080 if test "x$ac_cv_header_dlfcn_h" = xyes; then : 9081 cat >>confdefs.h <<_ACEOF 9082 #define HAVE_DLFCN_H 1 9083 _ACEOF 9084 9085 fi 9086 9087 done 9088 9089 9090 9091 9092 func_stripname_cnf () 9093 { 9094 case $2 in 9095 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; 9096 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; 9097 esac 9098 } # func_stripname_cnf 9099 9100 9101 9102 9103 9104 # Set options 9105 9106 9107 9108 enable_dlopen=no 9109 9110 9111 enable_win32_dll=no 9112 9113 9114 # Check whether --enable-shared was given. 9115 if test "${enable_shared+set}" = set; then : 9116 enableval=$enable_shared; p=${PACKAGE-default} 9117 case $enableval in 9118 yes) enable_shared=yes ;; 9119 no) enable_shared=no ;; 9120 *) 9121 enable_shared=no 9122 # Look at the argument we got. We use all the common list separators. 9123 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9124 for pkg in $enableval; do 9125 IFS=$lt_save_ifs 9126 if test "X$pkg" = "X$p"; then 9127 enable_shared=yes 9128 fi 9129 done 9130 IFS=$lt_save_ifs 9131 ;; 9132 esac 9133 else 9134 enable_shared=yes 9135 fi 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 # Check whether --enable-static was given. 9146 if test "${enable_static+set}" = set; then : 9147 enableval=$enable_static; p=${PACKAGE-default} 9148 case $enableval in 9149 yes) enable_static=yes ;; 9150 no) enable_static=no ;; 9151 *) 9152 enable_static=no 9153 # Look at the argument we got. We use all the common list separators. 9154 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9155 for pkg in $enableval; do 9156 IFS=$lt_save_ifs 9157 if test "X$pkg" = "X$p"; then 9158 enable_static=yes 9159 fi 9160 done 9161 IFS=$lt_save_ifs 9162 ;; 9163 esac 9164 else 9165 enable_static=yes 9166 fi 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 # Check whether --with-pic was given. 9178 if test "${with_pic+set}" = set; then : 9179 withval=$with_pic; lt_p=${PACKAGE-default} 9180 case $withval in 9181 yes|no) pic_mode=$withval ;; 9182 *) 9183 pic_mode=default 9184 # Look at the argument we got. We use all the common list separators. 9185 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9186 for lt_pkg in $withval; do 9187 IFS=$lt_save_ifs 9188 if test "X$lt_pkg" = "X$lt_p"; then 9189 pic_mode=yes 9190 fi 9191 done 9192 IFS=$lt_save_ifs 9193 ;; 9194 esac 9195 else 9196 pic_mode=default 9197 fi 9198 9199 9200 9201 9202 9203 9204 9205 9206 # Check whether --enable-fast-install was given. 9207 if test "${enable_fast_install+set}" = set; then : 9208 enableval=$enable_fast_install; p=${PACKAGE-default} 9209 case $enableval in 9210 yes) enable_fast_install=yes ;; 9211 no) enable_fast_install=no ;; 9212 *) 9213 enable_fast_install=no 9214 # Look at the argument we got. We use all the common list separators. 9215 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 9216 for pkg in $enableval; do 9217 IFS=$lt_save_ifs 9218 if test "X$pkg" = "X$p"; then 9219 enable_fast_install=yes 9220 fi 9221 done 9222 IFS=$lt_save_ifs 9223 ;; 9224 esac 9225 else 9226 enable_fast_install=yes 9227 fi 9228 9229 9230 9231 9232 9233 9234 9235 9236 shared_archive_member_spec= 9237 case $host,$enable_shared in 9238 power*-*-aix[5-9]*,yes) 9239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 9240 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } 9241 9242 # Check whether --with-aix-soname was given. 9243 if test "${with_aix_soname+set}" = set; then : 9244 withval=$with_aix_soname; case $withval in 9245 aix|svr4|both) 9246 ;; 9247 *) 9248 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 9249 ;; 9250 esac 9251 lt_cv_with_aix_soname=$with_aix_soname 9252 else 9253 if ${lt_cv_with_aix_soname+:} false; then : 9254 $as_echo_n "(cached) " >&6 9255 else 9256 lt_cv_with_aix_soname=aix 9257 fi 9258 9259 with_aix_soname=$lt_cv_with_aix_soname 9260 fi 9261 9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 9263 $as_echo "$with_aix_soname" >&6; } 9264 if test aix != "$with_aix_soname"; then 9265 # For the AIX way of multilib, we name the shared archive member 9266 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 9267 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 9268 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 9269 # the AIX toolchain works better with OBJECT_MODE set (default 32). 9270 if test 64 = "${OBJECT_MODE-32}"; then 9271 shared_archive_member_spec=shr_64 9272 else 9273 shared_archive_member_spec=shr 9274 fi 9275 fi 9276 ;; 9277 *) 9278 with_aix_soname=aix 9279 ;; 9280 esac 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 # This can be used to rebuild libtool when needed 9292 LIBTOOL_DEPS=$ltmain 9293 9294 # Always use our own libtool. 9295 LIBTOOL='$(SHELL) $(top_builddir)/libtool' 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 test -z "$LN_S" && LN_S="ln -s" 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 if test -n "${ZSH_VERSION+set}"; then 9342 setopt NO_GLOB_SUBST 9343 fi 9344 9345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 9346 $as_echo_n "checking for objdir... " >&6; } 9347 if ${lt_cv_objdir+:} false; then : 9348 $as_echo_n "(cached) " >&6 9349 else 9350 rm -f .libs 2>/dev/null 9351 mkdir .libs 2>/dev/null 9352 if test -d .libs; then 9353 lt_cv_objdir=.libs 9354 else 9355 # MS-DOS does not allow filenames that begin with a dot. 9356 lt_cv_objdir=_libs 9357 fi 9358 rmdir .libs 2>/dev/null 9359 fi 9360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 9361 $as_echo "$lt_cv_objdir" >&6; } 9362 objdir=$lt_cv_objdir 9363 9364 9365 9366 9367 9368 cat >>confdefs.h <<_ACEOF 9369 #define LT_OBJDIR "$lt_cv_objdir/" 9370 _ACEOF 9371 9372 9373 9374 9375 case $host_os in 9376 aix3*) 9377 # AIX sometimes has problems with the GCC collect2 program. For some 9378 # reason, if we set the COLLECT_NAMES environment variable, the problems 9379 # vanish in a puff of smoke. 9380 if test set != "${COLLECT_NAMES+set}"; then 9381 COLLECT_NAMES= 9382 export COLLECT_NAMES 9383 fi 9384 ;; 9385 esac 9386 9387 # Global variables: 9388 ofile=libtool 9389 can_build_shared=yes 9390 9391 # All known linkers require a '.a' archive for static linking (except MSVC, 9392 # which needs '.lib'). 9393 libext=a 9394 9395 with_gnu_ld=$lt_cv_prog_gnu_ld 9396 9397 old_CC=$CC 9398 old_CFLAGS=$CFLAGS 9399 9400 # Set sane defaults for various variables 9401 test -z "$CC" && CC=cc 9402 test -z "$LTCC" && LTCC=$CC 9403 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 9404 test -z "$LD" && LD=ld 9405 test -z "$ac_objext" && ac_objext=o 9406 9407 func_cc_basename $compiler 9408 cc_basename=$func_cc_basename_result 9409 9410 9411 # Only perform the check for file, if the check method requires it 9412 test -z "$MAGIC_CMD" && MAGIC_CMD=file 9413 case $deplibs_check_method in 9414 file_magic*) 9415 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 9416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 9417 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } 9418 if ${lt_cv_path_MAGIC_CMD+:} false; then : 9419 $as_echo_n "(cached) " >&6 9420 else 9421 case $MAGIC_CMD in 9422 [\\/*] | ?:[\\/]*) 9423 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 9424 ;; 9425 *) 9426 lt_save_MAGIC_CMD=$MAGIC_CMD 9427 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 9428 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" 9429 for ac_dir in $ac_dummy; do 9430 IFS=$lt_save_ifs 9431 test -z "$ac_dir" && ac_dir=. 9432 if test -f "$ac_dir/${ac_tool_prefix}file"; then 9433 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" 9434 if test -n "$file_magic_test_file"; then 9435 case $deplibs_check_method in 9436 "file_magic "*) 9437 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 9438 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 9439 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 9440 $EGREP "$file_magic_regex" > /dev/null; then 9441 : 9442 else 9443 cat <<_LT_EOF 1>&2 9444 9445 *** Warning: the command libtool uses to detect shared libraries, 9446 *** $file_magic_cmd, produces output that libtool cannot recognize. 9447 *** The result is that libtool may fail to recognize shared libraries 9448 *** as such. This will affect the creation of libtool libraries that 9449 *** depend on shared libraries, but programs linked with such libtool 9450 *** libraries will work regardless of this problem. Nevertheless, you 9451 *** may want to report the problem to your system manager and/or to 9452 *** bug-libtool@gnu.org 9453 9454 _LT_EOF 9455 fi ;; 9456 esac 9457 fi 9458 break 9459 fi 9460 done 9461 IFS=$lt_save_ifs 9462 MAGIC_CMD=$lt_save_MAGIC_CMD 9463 ;; 9464 esac 9465 fi 9466 9467 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 9468 if test -n "$MAGIC_CMD"; then 9469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 9470 $as_echo "$MAGIC_CMD" >&6; } 9471 else 9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9473 $as_echo "no" >&6; } 9474 fi 9475 9476 9477 9478 9479 9480 if test -z "$lt_cv_path_MAGIC_CMD"; then 9481 if test -n "$ac_tool_prefix"; then 9482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 9483 $as_echo_n "checking for file... " >&6; } 9484 if ${lt_cv_path_MAGIC_CMD+:} false; then : 9485 $as_echo_n "(cached) " >&6 9486 else 9487 case $MAGIC_CMD in 9488 [\\/*] | ?:[\\/]*) 9489 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 9490 ;; 9491 *) 9492 lt_save_MAGIC_CMD=$MAGIC_CMD 9493 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 9494 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" 9495 for ac_dir in $ac_dummy; do 9496 IFS=$lt_save_ifs 9497 test -z "$ac_dir" && ac_dir=. 9498 if test -f "$ac_dir/file"; then 9499 lt_cv_path_MAGIC_CMD=$ac_dir/"file" 9500 if test -n "$file_magic_test_file"; then 9501 case $deplibs_check_method in 9502 "file_magic "*) 9503 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 9504 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 9505 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 9506 $EGREP "$file_magic_regex" > /dev/null; then 9507 : 9508 else 9509 cat <<_LT_EOF 1>&2 9510 9511 *** Warning: the command libtool uses to detect shared libraries, 9512 *** $file_magic_cmd, produces output that libtool cannot recognize. 9513 *** The result is that libtool may fail to recognize shared libraries 9514 *** as such. This will affect the creation of libtool libraries that 9515 *** depend on shared libraries, but programs linked with such libtool 9516 *** libraries will work regardless of this problem. Nevertheless, you 9517 *** may want to report the problem to your system manager and/or to 9518 *** bug-libtool@gnu.org 9519 9520 _LT_EOF 9521 fi ;; 9522 esac 9523 fi 9524 break 9525 fi 9526 done 9527 IFS=$lt_save_ifs 9528 MAGIC_CMD=$lt_save_MAGIC_CMD 9529 ;; 9530 esac 9531 fi 9532 9533 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 9534 if test -n "$MAGIC_CMD"; then 9535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 9536 $as_echo "$MAGIC_CMD" >&6; } 9537 else 9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9539 $as_echo "no" >&6; } 9540 fi 9541 9542 9543 else 9544 MAGIC_CMD=: 9545 fi 9546 fi 9547 9548 fi 9549 ;; 9550 esac 9551 9552 # Use C for the default configuration in the libtool script 9553 9554 lt_save_CC=$CC 9555 ac_ext=c 9556 ac_cpp='$CPP $CPPFLAGS' 9557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 9558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 9559 ac_compiler_gnu=$ac_cv_c_compiler_gnu 9560 9561 9562 # Source file extension for C test sources. 9563 ac_ext=c 9564 9565 # Object file extension for compiled C test sources. 9566 objext=o 9567 objext=$objext 9568 9569 # Code to be used in simple compile tests 9570 lt_simple_compile_test_code="int some_variable = 0;" 9571 9572 # Code to be used in simple link tests 9573 lt_simple_link_test_code='int main(){return(0);}' 9574 9575 9576 9577 9578 9579 9580 9581 # If no C compiler was specified, use CC. 9582 LTCC=${LTCC-"$CC"} 9583 9584 # If no C compiler flags were specified, use CFLAGS. 9585 LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9586 9587 # Allow CC to be a program name with arguments. 9588 compiler=$CC 9589 9590 # Save the default compiler, since it gets overwritten when the other 9591 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9592 compiler_DEFAULT=$CC 9593 9594 # save warnings/boilerplate of simple test code 9595 ac_outfile=conftest.$ac_objext 9596 echo "$lt_simple_compile_test_code" >conftest.$ac_ext 9597 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9598 _lt_compiler_boilerplate=`cat conftest.err` 9599 $RM conftest* 9600 9601 ac_outfile=conftest.$ac_objext 9602 echo "$lt_simple_link_test_code" >conftest.$ac_ext 9603 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9604 _lt_linker_boilerplate=`cat conftest.err` 9605 $RM -r conftest* 9606 9607 9608 ## CAVEAT EMPTOR: 9609 ## There is no encapsulation within the following macros, do not change 9610 ## the running order or otherwise move them around unless you know exactly 9611 ## what you are doing... 9612 if test -n "$compiler"; then 9613 9614 lt_prog_compiler_no_builtin_flag= 9615 9616 if test yes = "$GCC"; then 9617 case $cc_basename in 9618 nvcc*) 9619 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; 9620 *) 9621 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; 9622 esac 9623 9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 9625 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } 9626 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : 9627 $as_echo_n "(cached) " >&6 9628 else 9629 lt_cv_prog_compiler_rtti_exceptions=no 9630 ac_outfile=conftest.$ac_objext 9631 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9632 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment 9633 # Insert the option either (1) after the last *FLAGS variable, or 9634 # (2) before a word containing "conftest.", or (3) at the end. 9635 # Note that $ac_compile itself does not contain backslashes and begins 9636 # with a dollar sign (not a hyphen), so the echo should work correctly. 9637 # The option is referenced via a variable to avoid confusing sed. 9638 lt_compile=`echo "$ac_compile" | $SED \ 9639 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 9640 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 9641 -e 's:$: $lt_compiler_flag:'` 9642 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 9643 (eval "$lt_compile" 2>conftest.err) 9644 ac_status=$? 9645 cat conftest.err >&5 9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9647 if (exit $ac_status) && test -s "$ac_outfile"; then 9648 # The compiler can only warn and ignore the option if not recognized 9649 # So say no if there are warnings other than the usual output. 9650 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 9651 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 9652 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 9653 lt_cv_prog_compiler_rtti_exceptions=yes 9654 fi 9655 fi 9656 $RM conftest* 9657 9658 fi 9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 9660 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } 9661 9662 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then 9663 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" 9664 else 9665 : 9666 fi 9667 9668 fi 9669 9670 9671 9672 9673 9674 9675 lt_prog_compiler_wl= 9676 lt_prog_compiler_pic= 9677 lt_prog_compiler_static= 9678 9679 9680 if test yes = "$GCC"; then 9681 lt_prog_compiler_wl='-Wl,' 9682 lt_prog_compiler_static='-static' 9683 9684 case $host_os in 9685 aix*) 9686 # All AIX code is PIC. 9687 if test ia64 = "$host_cpu"; then 9688 # AIX 5 now supports IA64 processor 9689 lt_prog_compiler_static='-Bstatic' 9690 fi 9691 lt_prog_compiler_pic='-fPIC' 9692 ;; 9693 9694 amigaos*) 9695 case $host_cpu in 9696 powerpc) 9697 # see comment about AmigaOS4 .so support 9698 lt_prog_compiler_pic='-fPIC' 9699 ;; 9700 m68k) 9701 # FIXME: we need at least 68020 code to build shared libraries, but 9702 # adding the '-m68020' flag to GCC prevents building anything better, 9703 # like '-m68040'. 9704 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' 9705 ;; 9706 esac 9707 ;; 9708 9709 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 9710 # PIC is the default for these OSes. 9711 ;; 9712 9713 mingw* | cygwin* | pw32* | os2* | cegcc*) 9714 # This hack is so that the source file can tell whether it is being 9715 # built for inclusion in a dll (and should export symbols for example). 9716 # Although the cygwin gcc ignores -fPIC, still need this for old-style 9717 # (--disable-auto-import) libraries 9718 lt_prog_compiler_pic='-DDLL_EXPORT' 9719 case $host_os in 9720 os2*) 9721 lt_prog_compiler_static='$wl-static' 9722 ;; 9723 esac 9724 ;; 9725 9726 darwin* | rhapsody*) 9727 # PIC is the default on this platform 9728 # Common symbols not allowed in MH_DYLIB files 9729 lt_prog_compiler_pic='-fno-common' 9730 ;; 9731 9732 haiku*) 9733 # PIC is the default for Haiku. 9734 # The "-static" flag exists, but is broken. 9735 lt_prog_compiler_static= 9736 ;; 9737 9738 hpux*) 9739 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 9740 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 9741 # sets the default TLS model and affects inlining. 9742 case $host_cpu in 9743 hppa*64*) 9744 # +Z the default 9745 ;; 9746 *) 9747 lt_prog_compiler_pic='-fPIC' 9748 ;; 9749 esac 9750 ;; 9751 9752 interix[3-9]*) 9753 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 9754 # Instead, we relocate shared libraries at runtime. 9755 ;; 9756 9757 msdosdjgpp*) 9758 # Just because we use GCC doesn't mean we suddenly get shared libraries 9759 # on systems that don't support them. 9760 lt_prog_compiler_can_build_shared=no 9761 enable_shared=no 9762 ;; 9763 9764 *nto* | *qnx*) 9765 # QNX uses GNU C++, but need to define -shared option too, otherwise 9766 # it will coredump. 9767 lt_prog_compiler_pic='-fPIC -shared' 9768 ;; 9769 9770 sysv4*MP*) 9771 if test -d /usr/nec; then 9772 lt_prog_compiler_pic=-Kconform_pic 9773 fi 9774 ;; 9775 9776 *) 9777 lt_prog_compiler_pic='-fPIC' 9778 ;; 9779 esac 9780 9781 case $cc_basename in 9782 nvcc*) # Cuda Compiler Driver 2.2 9783 lt_prog_compiler_wl='-Xlinker ' 9784 if test -n "$lt_prog_compiler_pic"; then 9785 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" 9786 fi 9787 ;; 9788 esac 9789 else 9790 # PORTME Check for flag to pass linker flags through the system compiler. 9791 case $host_os in 9792 aix*) 9793 lt_prog_compiler_wl='-Wl,' 9794 if test ia64 = "$host_cpu"; then 9795 # AIX 5 now supports IA64 processor 9796 lt_prog_compiler_static='-Bstatic' 9797 else 9798 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' 9799 fi 9800 ;; 9801 9802 darwin* | rhapsody*) 9803 # PIC is the default on this platform 9804 # Common symbols not allowed in MH_DYLIB files 9805 lt_prog_compiler_pic='-fno-common' 9806 case $cc_basename in 9807 nagfor*) 9808 # NAG Fortran compiler 9809 lt_prog_compiler_wl='-Wl,-Wl,,' 9810 lt_prog_compiler_pic='-PIC' 9811 lt_prog_compiler_static='-Bstatic' 9812 ;; 9813 esac 9814 ;; 9815 9816 mingw* | cygwin* | pw32* | os2* | cegcc*) 9817 # This hack is so that the source file can tell whether it is being 9818 # built for inclusion in a dll (and should export symbols for example). 9819 lt_prog_compiler_pic='-DDLL_EXPORT' 9820 case $host_os in 9821 os2*) 9822 lt_prog_compiler_static='$wl-static' 9823 ;; 9824 esac 9825 ;; 9826 9827 hpux9* | hpux10* | hpux11*) 9828 lt_prog_compiler_wl='-Wl,' 9829 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 9830 # not for PA HP-UX. 9831 case $host_cpu in 9832 hppa*64*|ia64*) 9833 # +Z the default 9834 ;; 9835 *) 9836 lt_prog_compiler_pic='+Z' 9837 ;; 9838 esac 9839 # Is there a better lt_prog_compiler_static that works with the bundled CC? 9840 lt_prog_compiler_static='$wl-a ${wl}archive' 9841 ;; 9842 9843 irix5* | irix6* | nonstopux*) 9844 lt_prog_compiler_wl='-Wl,' 9845 # PIC (with -KPIC) is the default. 9846 lt_prog_compiler_static='-non_shared' 9847 ;; 9848 9849 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 9850 case $cc_basename in 9851 # old Intel for x86_64, which still supported -KPIC. 9852 ecc*) 9853 lt_prog_compiler_wl='-Wl,' 9854 lt_prog_compiler_pic='-KPIC' 9855 lt_prog_compiler_static='-static' 9856 ;; 9857 # icc used to be incompatible with GCC. 9858 # ICC 10 doesn't accept -KPIC any more. 9859 icc* | ifort*) 9860 lt_prog_compiler_wl='-Wl,' 9861 lt_prog_compiler_pic='-fPIC' 9862 lt_prog_compiler_static='-static' 9863 ;; 9864 # Lahey Fortran 8.1. 9865 lf95*) 9866 lt_prog_compiler_wl='-Wl,' 9867 lt_prog_compiler_pic='--shared' 9868 lt_prog_compiler_static='--static' 9869 ;; 9870 nagfor*) 9871 # NAG Fortran compiler 9872 lt_prog_compiler_wl='-Wl,-Wl,,' 9873 lt_prog_compiler_pic='-PIC' 9874 lt_prog_compiler_static='-Bstatic' 9875 ;; 9876 tcc*) 9877 # Fabrice Bellard et al's Tiny C Compiler 9878 lt_prog_compiler_wl='-Wl,' 9879 lt_prog_compiler_pic='-fPIC' 9880 lt_prog_compiler_static='-static' 9881 ;; 9882 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 9883 # Portland Group compilers (*not* the Pentium gcc compiler, 9884 # which looks to be a dead project) 9885 lt_prog_compiler_wl='-Wl,' 9886 lt_prog_compiler_pic='-fpic' 9887 lt_prog_compiler_static='-Bstatic' 9888 ;; 9889 ccc*) 9890 lt_prog_compiler_wl='-Wl,' 9891 # All Alpha code is PIC. 9892 lt_prog_compiler_static='-non_shared' 9893 ;; 9894 xl* | bgxl* | bgf* | mpixl*) 9895 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 9896 lt_prog_compiler_wl='-Wl,' 9897 lt_prog_compiler_pic='-qpic' 9898 lt_prog_compiler_static='-qstaticlink' 9899 ;; 9900 *) 9901 case `$CC -V 2>&1 | sed 5q` in 9902 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) 9903 # Sun Fortran 8.3 passes all unrecognized flags to the linker 9904 lt_prog_compiler_pic='-KPIC' 9905 lt_prog_compiler_static='-Bstatic' 9906 lt_prog_compiler_wl='' 9907 ;; 9908 *Sun\ F* | *Sun*Fortran*) 9909 lt_prog_compiler_pic='-KPIC' 9910 lt_prog_compiler_static='-Bstatic' 9911 lt_prog_compiler_wl='-Qoption ld ' 9912 ;; 9913 *Sun\ C*) 9914 # Sun C 5.9 9915 lt_prog_compiler_pic='-KPIC' 9916 lt_prog_compiler_static='-Bstatic' 9917 lt_prog_compiler_wl='-Wl,' 9918 ;; 9919 *Intel*\ [CF]*Compiler*) 9920 lt_prog_compiler_wl='-Wl,' 9921 lt_prog_compiler_pic='-fPIC' 9922 lt_prog_compiler_static='-static' 9923 ;; 9924 *Portland\ Group*) 9925 lt_prog_compiler_wl='-Wl,' 9926 lt_prog_compiler_pic='-fpic' 9927 lt_prog_compiler_static='-Bstatic' 9928 ;; 9929 esac 9930 ;; 9931 esac 9932 ;; 9933 9934 newsos6) 9935 lt_prog_compiler_pic='-KPIC' 9936 lt_prog_compiler_static='-Bstatic' 9937 ;; 9938 9939 *nto* | *qnx*) 9940 # QNX uses GNU C++, but need to define -shared option too, otherwise 9941 # it will coredump. 9942 lt_prog_compiler_pic='-fPIC -shared' 9943 ;; 9944 9945 osf3* | osf4* | osf5*) 9946 lt_prog_compiler_wl='-Wl,' 9947 # All OSF/1 code is PIC. 9948 lt_prog_compiler_static='-non_shared' 9949 ;; 9950 9951 rdos*) 9952 lt_prog_compiler_static='-non_shared' 9953 ;; 9954 9955 solaris*) 9956 lt_prog_compiler_pic='-KPIC' 9957 lt_prog_compiler_static='-Bstatic' 9958 case $cc_basename in 9959 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 9960 lt_prog_compiler_wl='-Qoption ld ';; 9961 *) 9962 lt_prog_compiler_wl='-Wl,';; 9963 esac 9964 ;; 9965 9966 sunos4*) 9967 lt_prog_compiler_wl='-Qoption ld ' 9968 lt_prog_compiler_pic='-PIC' 9969 lt_prog_compiler_static='-Bstatic' 9970 ;; 9971 9972 sysv4 | sysv4.2uw2* | sysv4.3*) 9973 lt_prog_compiler_wl='-Wl,' 9974 lt_prog_compiler_pic='-KPIC' 9975 lt_prog_compiler_static='-Bstatic' 9976 ;; 9977 9978 sysv4*MP*) 9979 if test -d /usr/nec; then 9980 lt_prog_compiler_pic='-Kconform_pic' 9981 lt_prog_compiler_static='-Bstatic' 9982 fi 9983 ;; 9984 9985 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 9986 lt_prog_compiler_wl='-Wl,' 9987 lt_prog_compiler_pic='-KPIC' 9988 lt_prog_compiler_static='-Bstatic' 9989 ;; 9990 9991 unicos*) 9992 lt_prog_compiler_wl='-Wl,' 9993 lt_prog_compiler_can_build_shared=no 9994 ;; 9995 9996 uts4*) 9997 lt_prog_compiler_pic='-pic' 9998 lt_prog_compiler_static='-Bstatic' 9999 ;; 10000 10001 *) 10002 lt_prog_compiler_can_build_shared=no 10003 ;; 10004 esac 10005 fi 10006 10007 case $host_os in 10008 # For platforms that do not support PIC, -DPIC is meaningless: 10009 *djgpp*) 10010 lt_prog_compiler_pic= 10011 ;; 10012 *) 10013 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" 10014 ;; 10015 esac 10016 10017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 10018 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } 10019 if ${lt_cv_prog_compiler_pic+:} false; then : 10020 $as_echo_n "(cached) " >&6 10021 else 10022 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic 10023 fi 10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 10025 $as_echo "$lt_cv_prog_compiler_pic" >&6; } 10026 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic 10027 10028 # 10029 # Check to make sure the PIC flag actually works. 10030 # 10031 if test -n "$lt_prog_compiler_pic"; then 10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 10033 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } 10034 if ${lt_cv_prog_compiler_pic_works+:} false; then : 10035 $as_echo_n "(cached) " >&6 10036 else 10037 lt_cv_prog_compiler_pic_works=no 10038 ac_outfile=conftest.$ac_objext 10039 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 10040 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment 10041 # Insert the option either (1) after the last *FLAGS variable, or 10042 # (2) before a word containing "conftest.", or (3) at the end. 10043 # Note that $ac_compile itself does not contain backslashes and begins 10044 # with a dollar sign (not a hyphen), so the echo should work correctly. 10045 # The option is referenced via a variable to avoid confusing sed. 10046 lt_compile=`echo "$ac_compile" | $SED \ 10047 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 10048 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 10049 -e 's:$: $lt_compiler_flag:'` 10050 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 10051 (eval "$lt_compile" 2>conftest.err) 10052 ac_status=$? 10053 cat conftest.err >&5 10054 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10055 if (exit $ac_status) && test -s "$ac_outfile"; then 10056 # The compiler can only warn and ignore the option if not recognized 10057 # So say no if there are warnings other than the usual output. 10058 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 10059 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 10060 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 10061 lt_cv_prog_compiler_pic_works=yes 10062 fi 10063 fi 10064 $RM conftest* 10065 10066 fi 10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 10068 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } 10069 10070 if test yes = "$lt_cv_prog_compiler_pic_works"; then 10071 case $lt_prog_compiler_pic in 10072 "" | " "*) ;; 10073 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; 10074 esac 10075 else 10076 lt_prog_compiler_pic= 10077 lt_prog_compiler_can_build_shared=no 10078 fi 10079 10080 fi 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 # 10093 # Check to make sure the static flag actually works. 10094 # 10095 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" 10096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 10097 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } 10098 if ${lt_cv_prog_compiler_static_works+:} false; then : 10099 $as_echo_n "(cached) " >&6 10100 else 10101 lt_cv_prog_compiler_static_works=no 10102 save_LDFLAGS=$LDFLAGS 10103 LDFLAGS="$LDFLAGS $lt_tmp_static_flag" 10104 echo "$lt_simple_link_test_code" > conftest.$ac_ext 10105 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 10106 # The linker can only warn and ignore the option if not recognized 10107 # So say no if there are warnings 10108 if test -s conftest.err; then 10109 # Append any errors to the config.log. 10110 cat conftest.err 1>&5 10111 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 10112 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 10113 if diff conftest.exp conftest.er2 >/dev/null; then 10114 lt_cv_prog_compiler_static_works=yes 10115 fi 10116 else 10117 lt_cv_prog_compiler_static_works=yes 10118 fi 10119 fi 10120 $RM -r conftest* 10121 LDFLAGS=$save_LDFLAGS 10122 10123 fi 10124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 10125 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } 10126 10127 if test yes = "$lt_cv_prog_compiler_static_works"; then 10128 : 10129 else 10130 lt_prog_compiler_static= 10131 fi 10132 10133 10134 10135 10136 10137 10138 10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 10140 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } 10141 if ${lt_cv_prog_compiler_c_o+:} false; then : 10142 $as_echo_n "(cached) " >&6 10143 else 10144 lt_cv_prog_compiler_c_o=no 10145 $RM -r conftest 2>/dev/null 10146 mkdir conftest 10147 cd conftest 10148 mkdir out 10149 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 10150 10151 lt_compiler_flag="-o out/conftest2.$ac_objext" 10152 # Insert the option either (1) after the last *FLAGS variable, or 10153 # (2) before a word containing "conftest.", or (3) at the end. 10154 # Note that $ac_compile itself does not contain backslashes and begins 10155 # with a dollar sign (not a hyphen), so the echo should work correctly. 10156 lt_compile=`echo "$ac_compile" | $SED \ 10157 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 10158 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 10159 -e 's:$: $lt_compiler_flag:'` 10160 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 10161 (eval "$lt_compile" 2>out/conftest.err) 10162 ac_status=$? 10163 cat out/conftest.err >&5 10164 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10165 if (exit $ac_status) && test -s out/conftest2.$ac_objext 10166 then 10167 # The compiler can only warn and ignore the option if not recognized 10168 # So say no if there are warnings 10169 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 10170 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 10171 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 10172 lt_cv_prog_compiler_c_o=yes 10173 fi 10174 fi 10175 chmod u+w . 2>&5 10176 $RM conftest* 10177 # SGI C++ compiler will create directory out/ii_files/ for 10178 # template instantiation 10179 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 10180 $RM out/* && rmdir out 10181 cd .. 10182 $RM -r conftest 10183 $RM conftest* 10184 10185 fi 10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 10187 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } 10188 10189 10190 10191 10192 10193 10194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 10195 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } 10196 if ${lt_cv_prog_compiler_c_o+:} false; then : 10197 $as_echo_n "(cached) " >&6 10198 else 10199 lt_cv_prog_compiler_c_o=no 10200 $RM -r conftest 2>/dev/null 10201 mkdir conftest 10202 cd conftest 10203 mkdir out 10204 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 10205 10206 lt_compiler_flag="-o out/conftest2.$ac_objext" 10207 # Insert the option either (1) after the last *FLAGS variable, or 10208 # (2) before a word containing "conftest.", or (3) at the end. 10209 # Note that $ac_compile itself does not contain backslashes and begins 10210 # with a dollar sign (not a hyphen), so the echo should work correctly. 10211 lt_compile=`echo "$ac_compile" | $SED \ 10212 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 10213 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 10214 -e 's:$: $lt_compiler_flag:'` 10215 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 10216 (eval "$lt_compile" 2>out/conftest.err) 10217 ac_status=$? 10218 cat out/conftest.err >&5 10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10220 if (exit $ac_status) && test -s out/conftest2.$ac_objext 10221 then 10222 # The compiler can only warn and ignore the option if not recognized 10223 # So say no if there are warnings 10224 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 10225 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 10226 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 10227 lt_cv_prog_compiler_c_o=yes 10228 fi 10229 fi 10230 chmod u+w . 2>&5 10231 $RM conftest* 10232 # SGI C++ compiler will create directory out/ii_files/ for 10233 # template instantiation 10234 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 10235 $RM out/* && rmdir out 10236 cd .. 10237 $RM -r conftest 10238 $RM conftest* 10239 10240 fi 10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 10242 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } 10243 10244 10245 10246 10247 hard_links=nottested 10248 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then 10249 # do not overwrite the value of need_locks provided by the user 10250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 10251 $as_echo_n "checking if we can lock with hard links... " >&6; } 10252 hard_links=yes 10253 $RM conftest* 10254 ln conftest.a conftest.b 2>/dev/null && hard_links=no 10255 touch conftest.a 10256 ln conftest.a conftest.b 2>&5 || hard_links=no 10257 ln conftest.a conftest.b 2>/dev/null && hard_links=no 10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 10259 $as_echo "$hard_links" >&6; } 10260 if test no = "$hard_links"; then 10261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 10262 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} 10263 need_locks=warn 10264 fi 10265 else 10266 need_locks=no 10267 fi 10268 10269 10270 10271 10272 10273 10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 10275 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } 10276 10277 runpath_var= 10278 allow_undefined_flag= 10279 always_export_symbols=no 10280 archive_cmds= 10281 archive_expsym_cmds= 10282 compiler_needs_object=no 10283 enable_shared_with_static_runtimes=no 10284 export_dynamic_flag_spec= 10285 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 10286 hardcode_automatic=no 10287 hardcode_direct=no 10288 hardcode_direct_absolute=no 10289 hardcode_libdir_flag_spec= 10290 hardcode_libdir_separator= 10291 hardcode_minus_L=no 10292 hardcode_shlibpath_var=unsupported 10293 inherit_rpath=no 10294 link_all_deplibs=unknown 10295 module_cmds= 10296 module_expsym_cmds= 10297 old_archive_from_new_cmds= 10298 old_archive_from_expsyms_cmds= 10299 thread_safe_flag_spec= 10300 whole_archive_flag_spec= 10301 # include_expsyms should be a list of space-separated symbols to be *always* 10302 # included in the symbol list 10303 include_expsyms= 10304 # exclude_expsyms can be an extended regexp of symbols to exclude 10305 # it will be wrapped by ' (' and ')$', so one must not match beginning or 10306 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 10307 # as well as any symbol that contains 'd'. 10308 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' 10309 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 10310 # platforms (ab)use it in PIC code, but their linkers get confused if 10311 # the symbol is explicitly referenced. Since portable code cannot 10312 # rely on this symbol name, it's probably fine to never include it in 10313 # preloaded symbol tables. 10314 # Exclude shared library initialization/finalization symbols. 10315 extract_expsyms_cmds= 10316 10317 case $host_os in 10318 cygwin* | mingw* | pw32* | cegcc*) 10319 # FIXME: the MSVC++ port hasn't been tested in a loooong time 10320 # When not using gcc, we currently assume that we are using 10321 # Microsoft Visual C++. 10322 if test yes != "$GCC"; then 10323 with_gnu_ld=no 10324 fi 10325 ;; 10326 interix*) 10327 # we just hope/assume this is gcc and not c89 (= MSVC++) 10328 with_gnu_ld=yes 10329 ;; 10330 openbsd* | bitrig*) 10331 with_gnu_ld=no 10332 ;; 10333 linux* | k*bsd*-gnu | gnu*) 10334 link_all_deplibs=no 10335 ;; 10336 esac 10337 10338 ld_shlibs=yes 10339 10340 # On some targets, GNU ld is compatible enough with the native linker 10341 # that we're better off using the native interface for both. 10342 lt_use_gnu_ld_interface=no 10343 if test yes = "$with_gnu_ld"; then 10344 case $host_os in 10345 aix*) 10346 # The AIX port of GNU ld has always aspired to compatibility 10347 # with the native linker. However, as the warning in the GNU ld 10348 # block says, versions before 2.19.5* couldn't really create working 10349 # shared libraries, regardless of the interface used. 10350 case `$LD -v 2>&1` in 10351 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 10352 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; 10353 *\ \(GNU\ Binutils\)\ [3-9]*) ;; 10354 *) 10355 lt_use_gnu_ld_interface=yes 10356 ;; 10357 esac 10358 ;; 10359 *) 10360 lt_use_gnu_ld_interface=yes 10361 ;; 10362 esac 10363 fi 10364 10365 if test yes = "$lt_use_gnu_ld_interface"; then 10366 # If archive_cmds runs LD, not CC, wlarc should be empty 10367 wlarc='$wl' 10368 10369 # Set some defaults for GNU ld with shared library support. These 10370 # are reset later if shared libraries are not supported. Putting them 10371 # here allows them to be overridden if necessary. 10372 runpath_var=LD_RUN_PATH 10373 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 10374 export_dynamic_flag_spec='$wl--export-dynamic' 10375 # ancient GNU ld didn't support --whole-archive et. al. 10376 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 10377 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10378 else 10379 whole_archive_flag_spec= 10380 fi 10381 supports_anon_versioning=no 10382 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in 10383 *GNU\ gold*) supports_anon_versioning=yes ;; 10384 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 10385 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 10386 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 10387 *\ 2.11.*) ;; # other 2.11 versions 10388 *) supports_anon_versioning=yes ;; 10389 esac 10390 10391 # See if GNU ld supports shared libraries. 10392 case $host_os in 10393 aix[3-9]*) 10394 # On AIX/PPC, the GNU linker is very broken 10395 if test ia64 != "$host_cpu"; then 10396 ld_shlibs=no 10397 cat <<_LT_EOF 1>&2 10398 10399 *** Warning: the GNU linker, at least up to release 2.19, is reported 10400 *** to be unable to reliably create shared libraries on AIX. 10401 *** Therefore, libtool is disabling shared libraries support. If you 10402 *** really care for shared libraries, you may want to install binutils 10403 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 10404 *** You will then need to restart the configuration process. 10405 10406 _LT_EOF 10407 fi 10408 ;; 10409 10410 amigaos*) 10411 case $host_cpu in 10412 powerpc) 10413 # see comment about AmigaOS4 .so support 10414 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10415 archive_expsym_cmds='' 10416 ;; 10417 m68k) 10418 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)' 10419 hardcode_libdir_flag_spec='-L$libdir' 10420 hardcode_minus_L=yes 10421 ;; 10422 esac 10423 ;; 10424 10425 beos*) 10426 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10427 allow_undefined_flag=unsupported 10428 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10429 # support --undefined. This deserves some investigation. FIXME 10430 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10431 else 10432 ld_shlibs=no 10433 fi 10434 ;; 10435 10436 cygwin* | mingw* | pw32* | cegcc*) 10437 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, 10438 # as there is no search path for DLLs. 10439 hardcode_libdir_flag_spec='-L$libdir' 10440 export_dynamic_flag_spec='$wl--export-all-symbols' 10441 allow_undefined_flag=unsupported 10442 always_export_symbols=no 10443 enable_shared_with_static_runtimes=yes 10444 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' 10445 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 10446 10447 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10448 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10449 # If the export-symbols file already is a .def file, use it as 10450 # is; otherwise, prepend EXPORTS... 10451 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then 10452 cp $export_symbols $output_objdir/$soname.def; 10453 else 10454 echo EXPORTS > $output_objdir/$soname.def; 10455 cat $export_symbols >> $output_objdir/$soname.def; 10456 fi~ 10457 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10458 else 10459 ld_shlibs=no 10460 fi 10461 ;; 10462 10463 haiku*) 10464 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10465 link_all_deplibs=yes 10466 ;; 10467 10468 os2*) 10469 hardcode_libdir_flag_spec='-L$libdir' 10470 hardcode_minus_L=yes 10471 allow_undefined_flag=unsupported 10472 shrext_cmds=.dll 10473 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10474 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10475 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10476 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10477 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10478 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10479 emximp -o $lib $output_objdir/$libname.def' 10480 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10481 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10482 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10483 $ECHO EXPORTS >> $output_objdir/$libname.def~ 10484 prefix_cmds="$SED"~ 10485 if test EXPORTS = "`$SED 1q $export_symbols`"; then 10486 prefix_cmds="$prefix_cmds -e 1d"; 10487 fi~ 10488 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10489 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10490 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10491 emximp -o $lib $output_objdir/$libname.def' 10492 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10493 enable_shared_with_static_runtimes=yes 10494 ;; 10495 10496 interix[3-9]*) 10497 hardcode_direct=no 10498 hardcode_shlibpath_var=no 10499 hardcode_libdir_flag_spec='$wl-rpath,$libdir' 10500 export_dynamic_flag_spec='$wl-E' 10501 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10502 # Instead, shared libraries are loaded at an image base (0x10000000 by 10503 # default) and relocated if they conflict, which is a slow very memory 10504 # consuming and fragmenting process. To avoid this, we pick a random, 10505 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10506 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10507 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 10508 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' 10509 ;; 10510 10511 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 10512 tmp_diet=no 10513 if test linux-dietlibc = "$host_os"; then 10514 case $cc_basename in 10515 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 10516 esac 10517 fi 10518 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 10519 && test no = "$tmp_diet" 10520 then 10521 tmp_addflag=' $pic_flag' 10522 tmp_sharedflag='-shared' 10523 case $cc_basename,$host_cpu in 10524 pgcc*) # Portland Group C compiler 10525 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10526 tmp_addflag=' $pic_flag' 10527 ;; 10528 pgf77* | pgf90* | pgf95* | pgfortran*) 10529 # Portland Group f77 and f90 compilers 10530 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10531 tmp_addflag=' $pic_flag -Mnomain' ;; 10532 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 10533 tmp_addflag=' -i_dynamic' ;; 10534 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 10535 tmp_addflag=' -i_dynamic -nofor_main' ;; 10536 ifc* | ifort*) # Intel Fortran compiler 10537 tmp_addflag=' -nofor_main' ;; 10538 lf95*) # Lahey Fortran 8.1 10539 whole_archive_flag_spec= 10540 tmp_sharedflag='--shared' ;; 10541 nagfor*) # NAGFOR 5.3 10542 tmp_sharedflag='-Wl,-shared' ;; 10543 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) 10544 tmp_sharedflag='-qmkshrobj' 10545 tmp_addflag= ;; 10546 nvcc*) # Cuda Compiler Driver 2.2 10547 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10548 compiler_needs_object=yes 10549 ;; 10550 esac 10551 case `$CC -V 2>&1 | sed 5q` in 10552 *Sun\ C*) # Sun C 5.9 10553 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10554 compiler_needs_object=yes 10555 tmp_sharedflag='-G' ;; 10556 *Sun\ F*) # Sun Fortran 8.3 10557 tmp_sharedflag='-G' ;; 10558 esac 10559 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10560 10561 if test yes = "$supports_anon_versioning"; then 10562 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ 10563 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10564 echo "local: *; };" >> $output_objdir/$libname.ver~ 10565 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10566 fi 10567 10568 case $cc_basename in 10569 tcc*) 10570 export_dynamic_flag_spec='-rdynamic' 10571 ;; 10572 xlf* | bgf* | bgxlf* | mpixlf*) 10573 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 10574 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' 10575 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 10576 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 10577 if test yes = "$supports_anon_versioning"; then 10578 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ 10579 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10580 echo "local: *; };" >> $output_objdir/$libname.ver~ 10581 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 10582 fi 10583 ;; 10584 esac 10585 else 10586 ld_shlibs=no 10587 fi 10588 ;; 10589 10590 netbsd* | netbsdelf*-gnu) 10591 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10592 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 10593 wlarc= 10594 else 10595 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10596 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10597 fi 10598 ;; 10599 10600 solaris*) 10601 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 10602 ld_shlibs=no 10603 cat <<_LT_EOF 1>&2 10604 10605 *** Warning: The releases 2.8.* of the GNU linker cannot reliably 10606 *** create shared libraries on Solaris systems. Therefore, libtool 10607 *** is disabling shared libraries support. We urge you to upgrade GNU 10608 *** binutils to release 2.9.1 or newer. Another option is to modify 10609 *** your PATH or compiler configuration so that the native linker is 10610 *** used, and then restart. 10611 10612 _LT_EOF 10613 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10614 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10615 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10616 else 10617 ld_shlibs=no 10618 fi 10619 ;; 10620 10621 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 10622 case `$LD -v 2>&1` in 10623 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) 10624 ld_shlibs=no 10625 cat <<_LT_EOF 1>&2 10626 10627 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 10628 *** reliably create shared libraries on SCO systems. Therefore, libtool 10629 *** is disabling shared libraries support. We urge you to upgrade GNU 10630 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify 10631 *** your PATH or compiler configuration so that the native linker is 10632 *** used, and then restart. 10633 10634 _LT_EOF 10635 ;; 10636 *) 10637 # For security reasons, it is highly recommended that you always 10638 # use absolute paths for naming shared libraries, and exclude the 10639 # DT_RUNPATH tag from executables and libraries. But doing so 10640 # requires that you compile everything twice, which is a pain. 10641 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10642 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 10643 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10644 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10645 else 10646 ld_shlibs=no 10647 fi 10648 ;; 10649 esac 10650 ;; 10651 10652 sunos4*) 10653 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 10654 wlarc= 10655 hardcode_direct=yes 10656 hardcode_shlibpath_var=no 10657 ;; 10658 10659 *) 10660 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10661 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10662 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10663 else 10664 ld_shlibs=no 10665 fi 10666 ;; 10667 esac 10668 10669 if test no = "$ld_shlibs"; then 10670 runpath_var= 10671 hardcode_libdir_flag_spec= 10672 export_dynamic_flag_spec= 10673 whole_archive_flag_spec= 10674 fi 10675 else 10676 # PORTME fill in a description of your system's linker (not GNU ld) 10677 case $host_os in 10678 aix3*) 10679 allow_undefined_flag=unsupported 10680 always_export_symbols=yes 10681 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' 10682 # Note: this linker hardcodes the directories in LIBPATH if there 10683 # are no directories specified by -L. 10684 hardcode_minus_L=yes 10685 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 10686 # Neither direct hardcoding nor static linking is supported with a 10687 # broken collect2. 10688 hardcode_direct=unsupported 10689 fi 10690 ;; 10691 10692 aix[4-9]*) 10693 if test ia64 = "$host_cpu"; then 10694 # On IA64, the linker does run time linking by default, so we don't 10695 # have to do anything special. 10696 aix_use_runtimelinking=no 10697 exp_sym_flag='-Bexport' 10698 no_entry_flag= 10699 else 10700 # If we're using GNU nm, then we don't want the "-C" option. 10701 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 10702 # Without the "-l" option, or with the "-B" option, AIX nm treats 10703 # weak defined symbols like other global defined symbols, whereas 10704 # GNU nm marks them as "W". 10705 # While the 'weak' keyword is ignored in the Export File, we need 10706 # it in the Import File for the 'aix-soname' feature, so we have 10707 # to replace the "-B" option with "-P" for AIX nm. 10708 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 10709 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 10710 else 10711 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 10712 fi 10713 aix_use_runtimelinking=no 10714 10715 # Test if we are trying to use run time linking or normal 10716 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 10717 # have runtime linking enabled, and use it for executables. 10718 # For shared libraries, we enable/disable runtime linking 10719 # depending on the kind of the shared library created - 10720 # when "with_aix_soname,aix_use_runtimelinking" is: 10721 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 10722 # "aix,yes" lib.so shared, rtl:yes, for executables 10723 # lib.a static archive 10724 # "both,no" lib.so.V(shr.o) shared, rtl:yes 10725 # lib.a(lib.so.V) shared, rtl:no, for executables 10726 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 10727 # lib.a(lib.so.V) shared, rtl:no 10728 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 10729 # lib.a static archive 10730 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) 10731 for ld_flag in $LDFLAGS; do 10732 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 10733 aix_use_runtimelinking=yes 10734 break 10735 fi 10736 done 10737 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 10738 # With aix-soname=svr4, we create the lib.so.V shared archives only, 10739 # so we don't have lib.a shared libs to link our executables. 10740 # We have to force runtime linking in this case. 10741 aix_use_runtimelinking=yes 10742 LDFLAGS="$LDFLAGS -Wl,-brtl" 10743 fi 10744 ;; 10745 esac 10746 10747 exp_sym_flag='-bexport' 10748 no_entry_flag='-bnoentry' 10749 fi 10750 10751 # When large executables or shared objects are built, AIX ld can 10752 # have problems creating the table of contents. If linking a library 10753 # or program results in "error TOC overflow" add -mminimal-toc to 10754 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10755 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10756 10757 archive_cmds='' 10758 hardcode_direct=yes 10759 hardcode_direct_absolute=yes 10760 hardcode_libdir_separator=':' 10761 link_all_deplibs=yes 10762 file_list_spec='$wl-f,' 10763 case $with_aix_soname,$aix_use_runtimelinking in 10764 aix,*) ;; # traditional, no import file 10765 svr4,* | *,yes) # use import file 10766 # The Import File defines what to hardcode. 10767 hardcode_direct=no 10768 hardcode_direct_absolute=no 10769 ;; 10770 esac 10771 10772 if test yes = "$GCC"; then 10773 case $host_os in aix4.[012]|aix4.[012].*) 10774 # We only want to do this on AIX 4.2 and lower, the check 10775 # below for broken collect2 doesn't work under 4.3+ 10776 collect2name=`$CC -print-prog-name=collect2` 10777 if test -f "$collect2name" && 10778 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 10779 then 10780 # We have reworked collect2 10781 : 10782 else 10783 # We have old collect2 10784 hardcode_direct=unsupported 10785 # It fails to find uninstalled libraries when the uninstalled 10786 # path is not listed in the libpath. Setting hardcode_minus_L 10787 # to unsupported forces relinking 10788 hardcode_minus_L=yes 10789 hardcode_libdir_flag_spec='-L$libdir' 10790 hardcode_libdir_separator= 10791 fi 10792 ;; 10793 esac 10794 shared_flag='-shared' 10795 if test yes = "$aix_use_runtimelinking"; then 10796 shared_flag="$shared_flag "'$wl-G' 10797 fi 10798 # Need to ensure runtime linking is disabled for the traditional 10799 # shared library, or the linker may eventually find shared libraries 10800 # /with/ Import File - we do not want to mix them. 10801 shared_flag_aix='-shared' 10802 shared_flag_svr4='-shared $wl-G' 10803 else 10804 # not using gcc 10805 if test ia64 = "$host_cpu"; then 10806 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10807 # chokes on -Wl,-G. The following line is correct: 10808 shared_flag='-G' 10809 else 10810 if test yes = "$aix_use_runtimelinking"; then 10811 shared_flag='$wl-G' 10812 else 10813 shared_flag='$wl-bM:SRE' 10814 fi 10815 shared_flag_aix='$wl-bM:SRE' 10816 shared_flag_svr4='$wl-G' 10817 fi 10818 fi 10819 10820 export_dynamic_flag_spec='$wl-bexpall' 10821 # It seems that -bexpall does not export symbols beginning with 10822 # underscore (_), so it is better to generate a list of symbols to export. 10823 always_export_symbols=yes 10824 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10825 # Warning - without using the other runtime loading flags (-brtl), 10826 # -berok will link without error, but may produce a broken library. 10827 allow_undefined_flag='-berok' 10828 # Determine the default libpath from the value encoded in an 10829 # empty executable. 10830 if test set = "${lt_cv_aix_libpath+set}"; then 10831 aix_libpath=$lt_cv_aix_libpath 10832 else 10833 if ${lt_cv_aix_libpath_+:} false; then : 10834 $as_echo_n "(cached) " >&6 10835 else 10836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10837 /* end confdefs.h. */ 10838 10839 int 10840 main () 10841 { 10842 10843 ; 10844 return 0; 10845 } 10846 _ACEOF 10847 if ac_fn_c_try_link "$LINENO"; then : 10848 10849 lt_aix_libpath_sed=' 10850 /Import File Strings/,/^$/ { 10851 /^0/ { 10852 s/^0 *\([^ ]*\) *$/\1/ 10853 p 10854 } 10855 }' 10856 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10857 # Check for a 64-bit object if we didn't find anything. 10858 if test -z "$lt_cv_aix_libpath_"; then 10859 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10860 fi 10861 fi 10862 rm -f core conftest.err conftest.$ac_objext \ 10863 conftest$ac_exeext conftest.$ac_ext 10864 if test -z "$lt_cv_aix_libpath_"; then 10865 lt_cv_aix_libpath_=/usr/lib:/lib 10866 fi 10867 10868 fi 10869 10870 aix_libpath=$lt_cv_aix_libpath_ 10871 fi 10872 10873 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" 10874 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 10875 else 10876 if test ia64 = "$host_cpu"; then 10877 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' 10878 allow_undefined_flag="-z nodefs" 10879 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" 10880 else 10881 # Determine the default libpath from the value encoded in an 10882 # empty executable. 10883 if test set = "${lt_cv_aix_libpath+set}"; then 10884 aix_libpath=$lt_cv_aix_libpath 10885 else 10886 if ${lt_cv_aix_libpath_+:} false; then : 10887 $as_echo_n "(cached) " >&6 10888 else 10889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10890 /* end confdefs.h. */ 10891 10892 int 10893 main () 10894 { 10895 10896 ; 10897 return 0; 10898 } 10899 _ACEOF 10900 if ac_fn_c_try_link "$LINENO"; then : 10901 10902 lt_aix_libpath_sed=' 10903 /Import File Strings/,/^$/ { 10904 /^0/ { 10905 s/^0 *\([^ ]*\) *$/\1/ 10906 p 10907 } 10908 }' 10909 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10910 # Check for a 64-bit object if we didn't find anything. 10911 if test -z "$lt_cv_aix_libpath_"; then 10912 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10913 fi 10914 fi 10915 rm -f core conftest.err conftest.$ac_objext \ 10916 conftest$ac_exeext conftest.$ac_ext 10917 if test -z "$lt_cv_aix_libpath_"; then 10918 lt_cv_aix_libpath_=/usr/lib:/lib 10919 fi 10920 10921 fi 10922 10923 aix_libpath=$lt_cv_aix_libpath_ 10924 fi 10925 10926 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" 10927 # Warning - without using the other run time loading flags, 10928 # -berok will link without error, but may produce a broken library. 10929 no_undefined_flag=' $wl-bernotok' 10930 allow_undefined_flag=' $wl-berok' 10931 if test yes = "$with_gnu_ld"; then 10932 # We only use this code for GNU lds that support --whole-archive. 10933 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' 10934 else 10935 # Exported symbols can be pulled into shared objects from archives 10936 whole_archive_flag_spec='$convenience' 10937 fi 10938 archive_cmds_need_lc=yes 10939 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10940 # -brtl affects multiple linker settings, -berok does not and is overridden later 10941 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' 10942 if test svr4 != "$with_aix_soname"; then 10943 # This is similar to how AIX traditionally builds its shared libraries. 10944 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 10945 fi 10946 if test aix != "$with_aix_soname"; then 10947 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 10948 else 10949 # used by -dlpreopen to get the symbols 10950 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10951 fi 10952 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' 10953 fi 10954 fi 10955 ;; 10956 10957 amigaos*) 10958 case $host_cpu in 10959 powerpc) 10960 # see comment about AmigaOS4 .so support 10961 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10962 archive_expsym_cmds='' 10963 ;; 10964 m68k) 10965 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)' 10966 hardcode_libdir_flag_spec='-L$libdir' 10967 hardcode_minus_L=yes 10968 ;; 10969 esac 10970 ;; 10971 10972 bsdi[45]*) 10973 export_dynamic_flag_spec=-rdynamic 10974 ;; 10975 10976 cygwin* | mingw* | pw32* | cegcc*) 10977 # When not using gcc, we currently assume that we are using 10978 # Microsoft Visual C++. 10979 # hardcode_libdir_flag_spec is actually meaningless, as there is 10980 # no search path for DLLs. 10981 case $cc_basename in 10982 cl*) 10983 # Native MSVC 10984 hardcode_libdir_flag_spec=' ' 10985 allow_undefined_flag=unsupported 10986 always_export_symbols=yes 10987 file_list_spec='@' 10988 # Tell ltmain to make .lib files, not .a files. 10989 libext=lib 10990 # Tell ltmain to make .dll files, not .so files. 10991 shrext_cmds=.dll 10992 # FIXME: Setting linknames here is a bad hack. 10993 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10994 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then 10995 cp "$export_symbols" "$output_objdir/$soname.def"; 10996 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10997 else 10998 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10999 fi~ 11000 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 11001 linknames=' 11002 # The linker will not automatically build a static lib if we build a DLL. 11003 # _LT_TAGVAR(old_archive_from_new_cmds, )='true' 11004 enable_shared_with_static_runtimes=yes 11005 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 11006 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' 11007 # Don't use ranlib 11008 old_postinstall_cmds='chmod 644 $oldlib' 11009 postlink_cmds='lt_outputfile="@OUTPUT@"~ 11010 lt_tool_outputfile="@TOOL_OUTPUT@"~ 11011 case $lt_outputfile in 11012 *.exe|*.EXE) ;; 11013 *) 11014 lt_outputfile=$lt_outputfile.exe 11015 lt_tool_outputfile=$lt_tool_outputfile.exe 11016 ;; 11017 esac~ 11018 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 11019 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 11020 $RM "$lt_outputfile.manifest"; 11021 fi' 11022 ;; 11023 *) 11024 # Assume MSVC wrapper 11025 hardcode_libdir_flag_spec=' ' 11026 allow_undefined_flag=unsupported 11027 # Tell ltmain to make .lib files, not .a files. 11028 libext=lib 11029 # Tell ltmain to make .dll files, not .so files. 11030 shrext_cmds=.dll 11031 # FIXME: Setting linknames here is a bad hack. 11032 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 11033 # The linker will automatically build a .lib file if we build a DLL. 11034 old_archive_from_new_cmds='true' 11035 # FIXME: Should let the user specify the lib program. 11036 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' 11037 enable_shared_with_static_runtimes=yes 11038 ;; 11039 esac 11040 ;; 11041 11042 darwin* | rhapsody*) 11043 11044 11045 archive_cmds_need_lc=no 11046 hardcode_direct=no 11047 hardcode_automatic=yes 11048 hardcode_shlibpath_var=unsupported 11049 if test yes = "$lt_cv_ld_force_load"; then 11050 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 11051 11052 else 11053 whole_archive_flag_spec='' 11054 fi 11055 link_all_deplibs=yes 11056 allow_undefined_flag=$_lt_dar_allow_undefined 11057 case $cc_basename in 11058 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11059 *) _lt_dar_can_shared=$GCC ;; 11060 esac 11061 if test yes = "$_lt_dar_can_shared"; then 11062 output_verbose_link_cmd=func_echo_all 11063 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 11064 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11065 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" 11066 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" 11067 11068 else 11069 ld_shlibs=no 11070 fi 11071 11072 ;; 11073 11074 dgux*) 11075 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11076 hardcode_libdir_flag_spec='-L$libdir' 11077 hardcode_shlibpath_var=no 11078 ;; 11079 11080 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 11081 # support. Future versions do this automatically, but an explicit c++rt0.o 11082 # does not break anything, and helps significantly (at the cost of a little 11083 # extra space). 11084 freebsd2.2*) 11085 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 11086 hardcode_libdir_flag_spec='-R$libdir' 11087 hardcode_direct=yes 11088 hardcode_shlibpath_var=no 11089 ;; 11090 11091 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 11092 freebsd2.*) 11093 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 11094 hardcode_direct=yes 11095 hardcode_minus_L=yes 11096 hardcode_shlibpath_var=no 11097 ;; 11098 11099 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 11100 freebsd* | dragonfly*) 11101 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 11102 hardcode_libdir_flag_spec='-R$libdir' 11103 hardcode_direct=yes 11104 hardcode_shlibpath_var=no 11105 ;; 11106 11107 hpux9*) 11108 if test yes = "$GCC"; then 11109 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 11110 else 11111 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 11112 fi 11113 hardcode_libdir_flag_spec='$wl+b $wl$libdir' 11114 hardcode_libdir_separator=: 11115 hardcode_direct=yes 11116 11117 # hardcode_minus_L: Not really in the search PATH, 11118 # but as the default location of the library. 11119 hardcode_minus_L=yes 11120 export_dynamic_flag_spec='$wl-E' 11121 ;; 11122 11123 hpux10*) 11124 if test yes,no = "$GCC,$with_gnu_ld"; then 11125 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 11126 else 11127 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 11128 fi 11129 if test no = "$with_gnu_ld"; then 11130 hardcode_libdir_flag_spec='$wl+b $wl$libdir' 11131 hardcode_libdir_separator=: 11132 hardcode_direct=yes 11133 hardcode_direct_absolute=yes 11134 export_dynamic_flag_spec='$wl-E' 11135 # hardcode_minus_L: Not really in the search PATH, 11136 # but as the default location of the library. 11137 hardcode_minus_L=yes 11138 fi 11139 ;; 11140 11141 hpux11*) 11142 if test yes,no = "$GCC,$with_gnu_ld"; then 11143 case $host_cpu in 11144 hppa*64*) 11145 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 11146 ;; 11147 ia64*) 11148 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 11149 ;; 11150 *) 11151 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 11152 ;; 11153 esac 11154 else 11155 case $host_cpu in 11156 hppa*64*) 11157 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 11158 ;; 11159 ia64*) 11160 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 11161 ;; 11162 *) 11163 11164 # Older versions of the 11.00 compiler do not understand -b yet 11165 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 11167 $as_echo_n "checking if $CC understands -b... " >&6; } 11168 if ${lt_cv_prog_compiler__b+:} false; then : 11169 $as_echo_n "(cached) " >&6 11170 else 11171 lt_cv_prog_compiler__b=no 11172 save_LDFLAGS=$LDFLAGS 11173 LDFLAGS="$LDFLAGS -b" 11174 echo "$lt_simple_link_test_code" > conftest.$ac_ext 11175 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 11176 # The linker can only warn and ignore the option if not recognized 11177 # So say no if there are warnings 11178 if test -s conftest.err; then 11179 # Append any errors to the config.log. 11180 cat conftest.err 1>&5 11181 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 11182 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 11183 if diff conftest.exp conftest.er2 >/dev/null; then 11184 lt_cv_prog_compiler__b=yes 11185 fi 11186 else 11187 lt_cv_prog_compiler__b=yes 11188 fi 11189 fi 11190 $RM -r conftest* 11191 LDFLAGS=$save_LDFLAGS 11192 11193 fi 11194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 11195 $as_echo "$lt_cv_prog_compiler__b" >&6; } 11196 11197 if test yes = "$lt_cv_prog_compiler__b"; then 11198 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 11199 else 11200 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 11201 fi 11202 11203 ;; 11204 esac 11205 fi 11206 if test no = "$with_gnu_ld"; then 11207 hardcode_libdir_flag_spec='$wl+b $wl$libdir' 11208 hardcode_libdir_separator=: 11209 11210 case $host_cpu in 11211 hppa*64*|ia64*) 11212 hardcode_direct=no 11213 hardcode_shlibpath_var=no 11214 ;; 11215 *) 11216 hardcode_direct=yes 11217 hardcode_direct_absolute=yes 11218 export_dynamic_flag_spec='$wl-E' 11219 11220 # hardcode_minus_L: Not really in the search PATH, 11221 # but as the default location of the library. 11222 hardcode_minus_L=yes 11223 ;; 11224 esac 11225 fi 11226 ;; 11227 11228 irix5* | irix6* | nonstopux*) 11229 if test yes = "$GCC"; then 11230 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11231 # Try to use the -exported_symbol ld option, if it does not 11232 # work, assume that -exports_file does not work either and 11233 # implicitly export all symbols. 11234 # This should be the same for all languages, so no per-tag cache variable. 11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 11236 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } 11237 if ${lt_cv_irix_exported_symbol+:} false; then : 11238 $as_echo_n "(cached) " >&6 11239 else 11240 save_LDFLAGS=$LDFLAGS 11241 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11243 /* end confdefs.h. */ 11244 int foo (void) { return 0; } 11245 _ACEOF 11246 if ac_fn_c_try_link "$LINENO"; then : 11247 lt_cv_irix_exported_symbol=yes 11248 else 11249 lt_cv_irix_exported_symbol=no 11250 fi 11251 rm -f core conftest.err conftest.$ac_objext \ 11252 conftest$ac_exeext conftest.$ac_ext 11253 LDFLAGS=$save_LDFLAGS 11254 fi 11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 11256 $as_echo "$lt_cv_irix_exported_symbol" >&6; } 11257 if test yes = "$lt_cv_irix_exported_symbol"; then 11258 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 11259 fi 11260 link_all_deplibs=no 11261 else 11262 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11263 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 11264 fi 11265 archive_cmds_need_lc='no' 11266 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 11267 hardcode_libdir_separator=: 11268 inherit_rpath=yes 11269 link_all_deplibs=yes 11270 ;; 11271 11272 linux*) 11273 case $cc_basename in 11274 tcc*) 11275 # Fabrice Bellard et al's Tiny C Compiler 11276 ld_shlibs=yes 11277 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 11278 ;; 11279 esac 11280 ;; 11281 11282 netbsd* | netbsdelf*-gnu) 11283 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 11284 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 11285 else 11286 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 11287 fi 11288 hardcode_libdir_flag_spec='-R$libdir' 11289 hardcode_direct=yes 11290 hardcode_shlibpath_var=no 11291 ;; 11292 11293 newsos6) 11294 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11295 hardcode_direct=yes 11296 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 11297 hardcode_libdir_separator=: 11298 hardcode_shlibpath_var=no 11299 ;; 11300 11301 *nto* | *qnx*) 11302 ;; 11303 11304 openbsd* | bitrig*) 11305 if test -f /usr/libexec/ld.so; then 11306 hardcode_direct=yes 11307 hardcode_shlibpath_var=no 11308 hardcode_direct_absolute=yes 11309 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 11310 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 11311 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 11312 hardcode_libdir_flag_spec='$wl-rpath,$libdir' 11313 export_dynamic_flag_spec='$wl-E' 11314 else 11315 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 11316 hardcode_libdir_flag_spec='$wl-rpath,$libdir' 11317 fi 11318 else 11319 ld_shlibs=no 11320 fi 11321 ;; 11322 11323 os2*) 11324 hardcode_libdir_flag_spec='-L$libdir' 11325 hardcode_minus_L=yes 11326 allow_undefined_flag=unsupported 11327 shrext_cmds=.dll 11328 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 11329 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 11330 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 11331 $ECHO EXPORTS >> $output_objdir/$libname.def~ 11332 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 11333 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 11334 emximp -o $lib $output_objdir/$libname.def' 11335 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 11336 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 11337 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 11338 $ECHO EXPORTS >> $output_objdir/$libname.def~ 11339 prefix_cmds="$SED"~ 11340 if test EXPORTS = "`$SED 1q $export_symbols`"; then 11341 prefix_cmds="$prefix_cmds -e 1d"; 11342 fi~ 11343 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 11344 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 11345 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 11346 emximp -o $lib $output_objdir/$libname.def' 11347 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 11348 enable_shared_with_static_runtimes=yes 11349 ;; 11350 11351 osf3*) 11352 if test yes = "$GCC"; then 11353 allow_undefined_flag=' $wl-expect_unresolved $wl\*' 11354 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11355 else 11356 allow_undefined_flag=' -expect_unresolved \*' 11357 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11358 fi 11359 archive_cmds_need_lc='no' 11360 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 11361 hardcode_libdir_separator=: 11362 ;; 11363 11364 osf4* | osf5*) # as osf3* with the addition of -msym flag 11365 if test yes = "$GCC"; then 11366 allow_undefined_flag=' $wl-expect_unresolved $wl\*' 11367 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11368 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' 11369 else 11370 allow_undefined_flag=' -expect_unresolved \*' 11371 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11372 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 11373 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 11374 11375 # Both c and cxx compiler support -rpath directly 11376 hardcode_libdir_flag_spec='-rpath $libdir' 11377 fi 11378 archive_cmds_need_lc='no' 11379 hardcode_libdir_separator=: 11380 ;; 11381 11382 solaris*) 11383 no_undefined_flag=' -z defs' 11384 if test yes = "$GCC"; then 11385 wlarc='$wl' 11386 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 11387 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11388 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 11389 else 11390 case `$CC -V 2>&1` in 11391 *"Compilers 5.0"*) 11392 wlarc='' 11393 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 11394 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11395 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 11396 ;; 11397 *) 11398 wlarc='$wl' 11399 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 11400 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11401 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 11402 ;; 11403 esac 11404 fi 11405 hardcode_libdir_flag_spec='-R$libdir' 11406 hardcode_shlibpath_var=no 11407 case $host_os in 11408 solaris2.[0-5] | solaris2.[0-5].*) ;; 11409 *) 11410 # The compiler driver will combine and reorder linker options, 11411 # but understands '-z linker_flag'. GCC discards it without '$wl', 11412 # but is careful enough not to reorder. 11413 # Supported since Solaris 2.6 (maybe 2.5.1?) 11414 if test yes = "$GCC"; then 11415 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 11416 else 11417 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' 11418 fi 11419 ;; 11420 esac 11421 link_all_deplibs=yes 11422 ;; 11423 11424 sunos4*) 11425 if test sequent = "$host_vendor"; then 11426 # Use $CC to link under sequent, because it throws in some extra .o 11427 # files that make .init and .fini sections work. 11428 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 11429 else 11430 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 11431 fi 11432 hardcode_libdir_flag_spec='-L$libdir' 11433 hardcode_direct=yes 11434 hardcode_minus_L=yes 11435 hardcode_shlibpath_var=no 11436 ;; 11437 11438 sysv4) 11439 case $host_vendor in 11440 sni) 11441 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11442 hardcode_direct=yes # is this really true??? 11443 ;; 11444 siemens) 11445 ## LD is ld it makes a PLAMLIB 11446 ## CC just makes a GrossModule. 11447 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' 11448 reload_cmds='$CC -r -o $output$reload_objs' 11449 hardcode_direct=no 11450 ;; 11451 motorola) 11452 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11453 hardcode_direct=no #Motorola manual says yes, but my tests say they lie 11454 ;; 11455 esac 11456 runpath_var='LD_RUN_PATH' 11457 hardcode_shlibpath_var=no 11458 ;; 11459 11460 sysv4.3*) 11461 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11462 hardcode_shlibpath_var=no 11463 export_dynamic_flag_spec='-Bexport' 11464 ;; 11465 11466 sysv4*MP*) 11467 if test -d /usr/nec; then 11468 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11469 hardcode_shlibpath_var=no 11470 runpath_var=LD_RUN_PATH 11471 hardcode_runpath_var=yes 11472 ld_shlibs=yes 11473 fi 11474 ;; 11475 11476 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) 11477 no_undefined_flag='$wl-z,text' 11478 archive_cmds_need_lc=no 11479 hardcode_shlibpath_var=no 11480 runpath_var='LD_RUN_PATH' 11481 11482 if test yes = "$GCC"; then 11483 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11484 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11485 else 11486 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11487 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11488 fi 11489 ;; 11490 11491 sysv5* | sco3.2v5* | sco5v6*) 11492 # Note: We CANNOT use -z defs as we might desire, because we do not 11493 # link with -lc, and that would cause any symbols used from libc to 11494 # always be unresolved, which means just about no library would 11495 # ever link correctly. If we're not using GNU ld we use -z text 11496 # though, which does catch some bad symbols but isn't as heavy-handed 11497 # as -z defs. 11498 no_undefined_flag='$wl-z,text' 11499 allow_undefined_flag='$wl-z,nodefs' 11500 archive_cmds_need_lc=no 11501 hardcode_shlibpath_var=no 11502 hardcode_libdir_flag_spec='$wl-R,$libdir' 11503 hardcode_libdir_separator=':' 11504 link_all_deplibs=yes 11505 export_dynamic_flag_spec='$wl-Bexport' 11506 runpath_var='LD_RUN_PATH' 11507 11508 if test yes = "$GCC"; then 11509 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11510 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11511 else 11512 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11513 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11514 fi 11515 ;; 11516 11517 uts4*) 11518 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 11519 hardcode_libdir_flag_spec='-L$libdir' 11520 hardcode_shlibpath_var=no 11521 ;; 11522 11523 *) 11524 ld_shlibs=no 11525 ;; 11526 esac 11527 11528 if test sni = "$host_vendor"; then 11529 case $host in 11530 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 11531 export_dynamic_flag_spec='$wl-Blargedynsym' 11532 ;; 11533 esac 11534 fi 11535 fi 11536 11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 11538 $as_echo "$ld_shlibs" >&6; } 11539 test no = "$ld_shlibs" && can_build_shared=no 11540 11541 with_gnu_ld=$with_gnu_ld 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 # 11558 # Do we need to explicitly link libc? 11559 # 11560 case "x$archive_cmds_need_lc" in 11561 x|xyes) 11562 # Assume -lc should be added 11563 archive_cmds_need_lc=yes 11564 11565 if test yes,yes = "$GCC,$enable_shared"; then 11566 case $archive_cmds in 11567 *'~'*) 11568 # FIXME: we may have to deal with multi-command sequences. 11569 ;; 11570 '$CC '*) 11571 # Test whether the compiler implicitly links with -lc since on some 11572 # systems, -lgcc has to come before -lc. If gcc already passes -lc 11573 # to ld, don't add -lc before -lgcc. 11574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 11575 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } 11576 if ${lt_cv_archive_cmds_need_lc+:} false; then : 11577 $as_echo_n "(cached) " >&6 11578 else 11579 $RM conftest* 11580 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 11581 11582 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 11583 (eval $ac_compile) 2>&5 11584 ac_status=$? 11585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 11586 test $ac_status = 0; } 2>conftest.err; then 11587 soname=conftest 11588 lib=conftest 11589 libobjs=conftest.$ac_objext 11590 deplibs= 11591 wl=$lt_prog_compiler_wl 11592 pic_flag=$lt_prog_compiler_pic 11593 compiler_flags=-v 11594 linker_flags=-v 11595 verstring= 11596 output_objdir=. 11597 libname=conftest 11598 lt_save_allow_undefined_flag=$allow_undefined_flag 11599 allow_undefined_flag= 11600 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 11601 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 11602 ac_status=$? 11603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 11604 test $ac_status = 0; } 11605 then 11606 lt_cv_archive_cmds_need_lc=no 11607 else 11608 lt_cv_archive_cmds_need_lc=yes 11609 fi 11610 allow_undefined_flag=$lt_save_allow_undefined_flag 11611 else 11612 cat conftest.err 1>&5 11613 fi 11614 $RM conftest* 11615 11616 fi 11617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 11618 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } 11619 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc 11620 ;; 11621 esac 11622 fi 11623 ;; 11624 esac 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 11778 $as_echo_n "checking dynamic linker characteristics... " >&6; } 11779 11780 if test yes = "$GCC"; then 11781 case $host_os in 11782 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 11783 *) lt_awk_arg='/^libraries:/' ;; 11784 esac 11785 case $host_os in 11786 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; 11787 *) lt_sed_strip_eq='s|=/|/|g' ;; 11788 esac 11789 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 11790 case $lt_search_path_spec in 11791 *\;*) 11792 # if the path contains ";" then we assume it to be the separator 11793 # otherwise default to the standard path separator (i.e. ":") - it is 11794 # assumed that no part of a normal pathname contains ";" but that should 11795 # okay in the real world where ";" in dirpaths is itself problematic. 11796 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 11797 ;; 11798 *) 11799 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 11800 ;; 11801 esac 11802 # Ok, now we have the path, separated by spaces, we can step through it 11803 # and add multilib dir if necessary... 11804 lt_tmp_lt_search_path_spec= 11805 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 11806 # ...but if some path component already ends with the multilib dir we assume 11807 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 11808 case "$lt_multi_os_dir; $lt_search_path_spec " in 11809 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 11810 lt_multi_os_dir= 11811 ;; 11812 esac 11813 for lt_sys_path in $lt_search_path_spec; do 11814 if test -d "$lt_sys_path$lt_multi_os_dir"; then 11815 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 11816 elif test -n "$lt_multi_os_dir"; then 11817 test -d "$lt_sys_path" && \ 11818 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 11819 fi 11820 done 11821 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 11822 BEGIN {RS = " "; FS = "/|\n";} { 11823 lt_foo = ""; 11824 lt_count = 0; 11825 for (lt_i = NF; lt_i > 0; lt_i--) { 11826 if ($lt_i != "" && $lt_i != ".") { 11827 if ($lt_i == "..") { 11828 lt_count++; 11829 } else { 11830 if (lt_count == 0) { 11831 lt_foo = "/" $lt_i lt_foo; 11832 } else { 11833 lt_count--; 11834 } 11835 } 11836 } 11837 } 11838 if (lt_foo != "") { lt_freq[lt_foo]++; } 11839 if (lt_freq[lt_foo] == 1) { print lt_foo; } 11840 }'` 11841 # AWK program above erroneously prepends '/' to C:/dos/paths 11842 # for these hosts. 11843 case $host_os in 11844 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 11845 $SED 's|/\([A-Za-z]:\)|\1|g'` ;; 11846 esac 11847 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 11848 else 11849 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 11850 fi 11851 library_names_spec= 11852 libname_spec='lib$name' 11853 soname_spec= 11854 shrext_cmds=.so 11855 postinstall_cmds= 11856 postuninstall_cmds= 11857 finish_cmds= 11858 finish_eval= 11859 shlibpath_var= 11860 shlibpath_overrides_runpath=unknown 11861 version_type=none 11862 dynamic_linker="$host_os ld.so" 11863 sys_lib_dlsearch_path_spec="/lib /usr/lib" 11864 need_lib_prefix=unknown 11865 hardcode_into_libs=no 11866 11867 # when you set need_version to no, make sure it does not cause -set_version 11868 # flags to be left without arguments 11869 need_version=unknown 11870 11871 11872 11873 case $host_os in 11874 aix3*) 11875 version_type=linux # correct to gnu/linux during the next big refactor 11876 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 11877 shlibpath_var=LIBPATH 11878 11879 # AIX 3 has no versioning support, so we append a major version to the name. 11880 soname_spec='$libname$release$shared_ext$major' 11881 ;; 11882 11883 aix[4-9]*) 11884 version_type=linux # correct to gnu/linux during the next big refactor 11885 need_lib_prefix=no 11886 need_version=no 11887 hardcode_into_libs=yes 11888 if test ia64 = "$host_cpu"; then 11889 # AIX 5 supports IA64 11890 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 11891 shlibpath_var=LD_LIBRARY_PATH 11892 else 11893 # With GCC up to 2.95.x, collect2 would create an import file 11894 # for dependence libraries. The import file would start with 11895 # the line '#! .'. This would cause the generated library to 11896 # depend on '.', always an invalid library. This was fixed in 11897 # development snapshots of GCC prior to 3.0. 11898 case $host_os in 11899 aix4 | aix4.[01] | aix4.[01].*) 11900 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 11901 echo ' yes ' 11902 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 11903 : 11904 else 11905 can_build_shared=no 11906 fi 11907 ;; 11908 esac 11909 # Using Import Files as archive members, it is possible to support 11910 # filename-based versioning of shared library archives on AIX. While 11911 # this would work for both with and without runtime linking, it will 11912 # prevent static linking of such archives. So we do filename-based 11913 # shared library versioning with .so extension only, which is used 11914 # when both runtime linking and shared linking is enabled. 11915 # Unfortunately, runtime linking may impact performance, so we do 11916 # not want this to be the default eventually. Also, we use the 11917 # versioned .so libs for executables only if there is the -brtl 11918 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 11919 # To allow for filename-based versioning support, we need to create 11920 # libNAME.so.V as an archive file, containing: 11921 # *) an Import File, referring to the versioned filename of the 11922 # archive as well as the shared archive member, telling the 11923 # bitwidth (32 or 64) of that shared object, and providing the 11924 # list of exported symbols of that shared object, eventually 11925 # decorated with the 'weak' keyword 11926 # *) the shared object with the F_LOADONLY flag set, to really avoid 11927 # it being seen by the linker. 11928 # At run time we better use the real file rather than another symlink, 11929 # but for link time we create the symlink libNAME.so -> libNAME.so.V 11930 11931 case $with_aix_soname,$aix_use_runtimelinking in 11932 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 11933 # soname into executable. Probably we can add versioning support to 11934 # collect2, so additional links can be useful in future. 11935 aix,yes) # traditional libtool 11936 dynamic_linker='AIX unversionable lib.so' 11937 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 11938 # instead of lib<name>.a to let people know that these are not 11939 # typical AIX shared libraries. 11940 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 11941 ;; 11942 aix,no) # traditional AIX only 11943 dynamic_linker='AIX lib.a(lib.so.V)' 11944 # We preserve .a as extension for shared libraries through AIX4.2 11945 # and later when we are not doing run time linking. 11946 library_names_spec='$libname$release.a $libname.a' 11947 soname_spec='$libname$release$shared_ext$major' 11948 ;; 11949 svr4,*) # full svr4 only 11950 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" 11951 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 11952 # We do not specify a path in Import Files, so LIBPATH fires. 11953 shlibpath_overrides_runpath=yes 11954 ;; 11955 *,yes) # both, prefer svr4 11956 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" 11957 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 11958 # unpreferred sharedlib libNAME.a needs extra handling 11959 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 11960 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 11961 # We do not specify a path in Import Files, so LIBPATH fires. 11962 shlibpath_overrides_runpath=yes 11963 ;; 11964 *,no) # both, prefer aix 11965 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" 11966 library_names_spec='$libname$release.a $libname.a' 11967 soname_spec='$libname$release$shared_ext$major' 11968 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 11969 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 11970 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 11971 ;; 11972 esac 11973 shlibpath_var=LIBPATH 11974 fi 11975 ;; 11976 11977 amigaos*) 11978 case $host_cpu in 11979 powerpc) 11980 # Since July 2007 AmigaOS4 officially supports .so libraries. 11981 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 11982 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 11983 ;; 11984 m68k) 11985 library_names_spec='$libname.ixlibrary $libname.a' 11986 # Create ${libname}_ixlibrary.a entries in /sys/libs. 11987 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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' 11988 ;; 11989 esac 11990 ;; 11991 11992 beos*) 11993 library_names_spec='$libname$shared_ext' 11994 dynamic_linker="$host_os ld.so" 11995 shlibpath_var=LIBRARY_PATH 11996 ;; 11997 11998 bsdi[45]*) 11999 version_type=linux # correct to gnu/linux during the next big refactor 12000 need_version=no 12001 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12002 soname_spec='$libname$release$shared_ext$major' 12003 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 12004 shlibpath_var=LD_LIBRARY_PATH 12005 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 12006 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 12007 # the default ld.so.conf also contains /usr/contrib/lib and 12008 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 12009 # libtool to hard-code these into programs 12010 ;; 12011 12012 cygwin* | mingw* | pw32* | cegcc*) 12013 version_type=windows 12014 shrext_cmds=.dll 12015 need_version=no 12016 need_lib_prefix=no 12017 12018 case $GCC,$cc_basename in 12019 yes,*) 12020 # gcc 12021 library_names_spec='$libname.dll.a' 12022 # DLL is installed to $(libdir)/../bin by postinstall_cmds 12023 postinstall_cmds='base_file=`basename \$file`~ 12024 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 12025 dldir=$destdir/`dirname \$dlpath`~ 12026 test -d \$dldir || mkdir -p \$dldir~ 12027 $install_prog $dir/$dlname \$dldir/$dlname~ 12028 chmod a+x \$dldir/$dlname~ 12029 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 12030 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 12031 fi' 12032 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 12033 dlpath=$dir/\$dldll~ 12034 $RM \$dlpath' 12035 shlibpath_overrides_runpath=yes 12036 12037 case $host_os in 12038 cygwin*) 12039 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 12040 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 12041 12042 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" 12043 ;; 12044 mingw* | cegcc*) 12045 # MinGW DLLs use traditional 'lib' prefix 12046 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 12047 ;; 12048 pw32*) 12049 # pw32 DLLs use 'pw' prefix rather than 'lib' 12050 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 12051 ;; 12052 esac 12053 dynamic_linker='Win32 ld.exe' 12054 ;; 12055 12056 *,cl*) 12057 # Native MSVC 12058 libname_spec='$name' 12059 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 12060 library_names_spec='$libname.dll.lib' 12061 12062 case $build_os in 12063 mingw*) 12064 sys_lib_search_path_spec= 12065 lt_save_ifs=$IFS 12066 IFS=';' 12067 for lt_path in $LIB 12068 do 12069 IFS=$lt_save_ifs 12070 # Let DOS variable expansion print the short 8.3 style file name. 12071 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 12072 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 12073 done 12074 IFS=$lt_save_ifs 12075 # Convert to MSYS style. 12076 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` 12077 ;; 12078 cygwin*) 12079 # Convert to unix form, then to dos form, then back to unix form 12080 # but this time dos style (no spaces!) so that the unix form looks 12081 # like /cygdrive/c/PROGRA~1:/cygdr... 12082 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 12083 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 12084 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 12085 ;; 12086 *) 12087 sys_lib_search_path_spec=$LIB 12088 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then 12089 # It is most probably a Windows format PATH. 12090 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 12091 else 12092 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 12093 fi 12094 # FIXME: find the short name or the path components, as spaces are 12095 # common. (e.g. "Program Files" -> "PROGRA~1") 12096 ;; 12097 esac 12098 12099 # DLL is installed to $(libdir)/../bin by postinstall_cmds 12100 postinstall_cmds='base_file=`basename \$file`~ 12101 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 12102 dldir=$destdir/`dirname \$dlpath`~ 12103 test -d \$dldir || mkdir -p \$dldir~ 12104 $install_prog $dir/$dlname \$dldir/$dlname' 12105 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 12106 dlpath=$dir/\$dldll~ 12107 $RM \$dlpath' 12108 shlibpath_overrides_runpath=yes 12109 dynamic_linker='Win32 link.exe' 12110 ;; 12111 12112 *) 12113 # Assume MSVC wrapper 12114 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' 12115 dynamic_linker='Win32 ld.exe' 12116 ;; 12117 esac 12118 # FIXME: first we should search . and the directory the executable is in 12119 shlibpath_var=PATH 12120 ;; 12121 12122 darwin* | rhapsody*) 12123 dynamic_linker="$host_os dyld" 12124 version_type=darwin 12125 need_lib_prefix=no 12126 need_version=no 12127 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 12128 soname_spec='$libname$release$major$shared_ext' 12129 shlibpath_overrides_runpath=yes 12130 shlibpath_var=DYLD_LIBRARY_PATH 12131 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 12132 12133 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" 12134 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 12135 ;; 12136 12137 dgux*) 12138 version_type=linux # correct to gnu/linux during the next big refactor 12139 need_lib_prefix=no 12140 need_version=no 12141 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12142 soname_spec='$libname$release$shared_ext$major' 12143 shlibpath_var=LD_LIBRARY_PATH 12144 ;; 12145 12146 freebsd* | dragonfly*) 12147 # DragonFly does not have aout. When/if they implement a new 12148 # versioning mechanism, adjust this. 12149 if test -x /usr/bin/objformat; then 12150 objformat=`/usr/bin/objformat` 12151 else 12152 case $host_os in 12153 freebsd[23].*) objformat=aout ;; 12154 *) objformat=elf ;; 12155 esac 12156 fi 12157 version_type=freebsd-$objformat 12158 case $version_type in 12159 freebsd-elf*) 12160 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12161 soname_spec='$libname$release$shared_ext$major' 12162 need_version=no 12163 need_lib_prefix=no 12164 ;; 12165 freebsd-*) 12166 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 12167 need_version=yes 12168 ;; 12169 esac 12170 shlibpath_var=LD_LIBRARY_PATH 12171 case $host_os in 12172 freebsd2.*) 12173 shlibpath_overrides_runpath=yes 12174 ;; 12175 freebsd3.[01]* | freebsdelf3.[01]*) 12176 shlibpath_overrides_runpath=yes 12177 hardcode_into_libs=yes 12178 ;; 12179 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ 12180 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) 12181 shlibpath_overrides_runpath=no 12182 hardcode_into_libs=yes 12183 ;; 12184 *) # from 4.6 on, and DragonFly 12185 shlibpath_overrides_runpath=yes 12186 hardcode_into_libs=yes 12187 ;; 12188 esac 12189 ;; 12190 12191 haiku*) 12192 version_type=linux # correct to gnu/linux during the next big refactor 12193 need_lib_prefix=no 12194 need_version=no 12195 dynamic_linker="$host_os runtime_loader" 12196 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12197 soname_spec='$libname$release$shared_ext$major' 12198 shlibpath_var=LIBRARY_PATH 12199 shlibpath_overrides_runpath=no 12200 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 12201 hardcode_into_libs=yes 12202 ;; 12203 12204 hpux9* | hpux10* | hpux11*) 12205 # Give a soname corresponding to the major version so that dld.sl refuses to 12206 # link against other versions. 12207 version_type=sunos 12208 need_lib_prefix=no 12209 need_version=no 12210 case $host_cpu in 12211 ia64*) 12212 shrext_cmds='.so' 12213 hardcode_into_libs=yes 12214 dynamic_linker="$host_os dld.so" 12215 shlibpath_var=LD_LIBRARY_PATH 12216 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 12217 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12218 soname_spec='$libname$release$shared_ext$major' 12219 if test 32 = "$HPUX_IA64_MODE"; then 12220 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 12221 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 12222 else 12223 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 12224 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 12225 fi 12226 ;; 12227 hppa*64*) 12228 shrext_cmds='.sl' 12229 hardcode_into_libs=yes 12230 dynamic_linker="$host_os dld.sl" 12231 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 12232 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 12233 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12234 soname_spec='$libname$release$shared_ext$major' 12235 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 12236 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 12237 ;; 12238 *) 12239 shrext_cmds='.sl' 12240 dynamic_linker="$host_os dld.sl" 12241 shlibpath_var=SHLIB_PATH 12242 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 12243 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12244 soname_spec='$libname$release$shared_ext$major' 12245 ;; 12246 esac 12247 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 12248 postinstall_cmds='chmod 555 $lib' 12249 # or fails outright, so override atomically: 12250 install_override_mode=555 12251 ;; 12252 12253 interix[3-9]*) 12254 version_type=linux # correct to gnu/linux during the next big refactor 12255 need_lib_prefix=no 12256 need_version=no 12257 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12258 soname_spec='$libname$release$shared_ext$major' 12259 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 12260 shlibpath_var=LD_LIBRARY_PATH 12261 shlibpath_overrides_runpath=no 12262 hardcode_into_libs=yes 12263 ;; 12264 12265 irix5* | irix6* | nonstopux*) 12266 case $host_os in 12267 nonstopux*) version_type=nonstopux ;; 12268 *) 12269 if test yes = "$lt_cv_prog_gnu_ld"; then 12270 version_type=linux # correct to gnu/linux during the next big refactor 12271 else 12272 version_type=irix 12273 fi ;; 12274 esac 12275 need_lib_prefix=no 12276 need_version=no 12277 soname_spec='$libname$release$shared_ext$major' 12278 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 12279 case $host_os in 12280 irix5* | nonstopux*) 12281 libsuff= shlibsuff= 12282 ;; 12283 *) 12284 case $LD in # libtool.m4 will add one of these switches to LD 12285 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 12286 libsuff= shlibsuff= libmagic=32-bit;; 12287 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 12288 libsuff=32 shlibsuff=N32 libmagic=N32;; 12289 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 12290 libsuff=64 shlibsuff=64 libmagic=64-bit;; 12291 *) libsuff= shlibsuff= libmagic=never-match;; 12292 esac 12293 ;; 12294 esac 12295 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 12296 shlibpath_overrides_runpath=no 12297 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 12298 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 12299 hardcode_into_libs=yes 12300 ;; 12301 12302 # No shared lib support for Linux oldld, aout, or coff. 12303 linux*oldld* | linux*aout* | linux*coff*) 12304 dynamic_linker=no 12305 ;; 12306 12307 linux*android*) 12308 version_type=none # Android doesn't support versioned libraries. 12309 need_lib_prefix=no 12310 need_version=no 12311 library_names_spec='$libname$release$shared_ext' 12312 soname_spec='$libname$release$shared_ext' 12313 finish_cmds= 12314 shlibpath_var=LD_LIBRARY_PATH 12315 shlibpath_overrides_runpath=yes 12316 12317 # This implies no fast_install, which is unacceptable. 12318 # Some rework will be needed to allow for fast_install 12319 # before this can be enabled. 12320 hardcode_into_libs=yes 12321 12322 dynamic_linker='Android linker' 12323 # Don't embed -rpath directories since the linker doesn't support them. 12324 hardcode_libdir_flag_spec='-L$libdir' 12325 ;; 12326 12327 # This must be glibc/ELF. 12328 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 12329 version_type=linux # correct to gnu/linux during the next big refactor 12330 need_lib_prefix=no 12331 need_version=no 12332 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12333 soname_spec='$libname$release$shared_ext$major' 12334 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 12335 shlibpath_var=LD_LIBRARY_PATH 12336 shlibpath_overrides_runpath=no 12337 12338 # Some binutils ld are patched to set DT_RUNPATH 12339 if ${lt_cv_shlibpath_overrides_runpath+:} false; then : 12340 $as_echo_n "(cached) " >&6 12341 else 12342 lt_cv_shlibpath_overrides_runpath=no 12343 save_LDFLAGS=$LDFLAGS 12344 save_libdir=$libdir 12345 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ 12346 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" 12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12348 /* end confdefs.h. */ 12349 12350 int 12351 main () 12352 { 12353 12354 ; 12355 return 0; 12356 } 12357 _ACEOF 12358 if ac_fn_c_try_link "$LINENO"; then : 12359 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : 12360 lt_cv_shlibpath_overrides_runpath=yes 12361 fi 12362 fi 12363 rm -f core conftest.err conftest.$ac_objext \ 12364 conftest$ac_exeext conftest.$ac_ext 12365 LDFLAGS=$save_LDFLAGS 12366 libdir=$save_libdir 12367 12368 fi 12369 12370 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 12371 12372 # This implies no fast_install, which is unacceptable. 12373 # Some rework will be needed to allow for fast_install 12374 # before this can be enabled. 12375 hardcode_into_libs=yes 12376 12377 # Ideally, we could use ldconfig to report *all* directores which are 12378 # searched for libraries, however this is still not possible. Aside from not 12379 # being certain /sbin/ldconfig is available, command 12380 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 12381 # even though it is searched at run-time. Try to do the best guess by 12382 # appending ld.so.conf contents (and includes) to the search path. 12383 if test -f /etc/ld.so.conf; then 12384 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;s/"//g;/^$/d' | tr '\n' ' '` 12385 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 12386 fi 12387 12388 # We used to test for /lib/ld.so.1 and disable shared libraries on 12389 # powerpc, because MkLinux only supported shared libraries with the 12390 # GNU dynamic linker. Since this was broken with cross compilers, 12391 # most powerpc-linux boxes support dynamic linking these days and 12392 # people can always --disable-shared, the test was removed, and we 12393 # assume the GNU/Linux dynamic linker is in use. 12394 dynamic_linker='GNU/Linux ld.so' 12395 ;; 12396 12397 netbsdelf*-gnu) 12398 version_type=linux 12399 need_lib_prefix=no 12400 need_version=no 12401 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 12402 soname_spec='${libname}${release}${shared_ext}$major' 12403 shlibpath_var=LD_LIBRARY_PATH 12404 shlibpath_overrides_runpath=no 12405 hardcode_into_libs=yes 12406 dynamic_linker='NetBSD ld.elf_so' 12407 ;; 12408 12409 netbsd*) 12410 version_type=sunos 12411 need_lib_prefix=no 12412 need_version=no 12413 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 12414 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 12415 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 12416 dynamic_linker='NetBSD (a.out) ld.so' 12417 else 12418 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12419 soname_spec='$libname$release$shared_ext$major' 12420 dynamic_linker='NetBSD ld.elf_so' 12421 fi 12422 shlibpath_var=LD_LIBRARY_PATH 12423 shlibpath_overrides_runpath=yes 12424 hardcode_into_libs=yes 12425 ;; 12426 12427 newsos6) 12428 version_type=linux # correct to gnu/linux during the next big refactor 12429 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12430 shlibpath_var=LD_LIBRARY_PATH 12431 shlibpath_overrides_runpath=yes 12432 ;; 12433 12434 *nto* | *qnx*) 12435 version_type=qnx 12436 need_lib_prefix=no 12437 need_version=no 12438 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12439 soname_spec='$libname$release$shared_ext$major' 12440 shlibpath_var=LD_LIBRARY_PATH 12441 shlibpath_overrides_runpath=no 12442 hardcode_into_libs=yes 12443 dynamic_linker='ldqnx.so' 12444 ;; 12445 12446 openbsd* | bitrig*) 12447 version_type=sunos 12448 sys_lib_dlsearch_path_spec=/usr/lib 12449 need_lib_prefix=no 12450 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 12451 need_version=no 12452 else 12453 need_version=yes 12454 fi 12455 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 12456 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 12457 shlibpath_var=LD_LIBRARY_PATH 12458 shlibpath_overrides_runpath=yes 12459 ;; 12460 12461 os2*) 12462 libname_spec='$name' 12463 version_type=windows 12464 shrext_cmds=.dll 12465 need_version=no 12466 need_lib_prefix=no 12467 # OS/2 can only load a DLL with a base name of 8 characters or less. 12468 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 12469 v=$($ECHO $release$versuffix | tr -d .-); 12470 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 12471 $ECHO $n$v`$shared_ext' 12472 library_names_spec='${libname}_dll.$libext' 12473 dynamic_linker='OS/2 ld.exe' 12474 shlibpath_var=BEGINLIBPATH 12475 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 12476 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 12477 postinstall_cmds='base_file=`basename \$file`~ 12478 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 12479 dldir=$destdir/`dirname \$dlpath`~ 12480 test -d \$dldir || mkdir -p \$dldir~ 12481 $install_prog $dir/$dlname \$dldir/$dlname~ 12482 chmod a+x \$dldir/$dlname~ 12483 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 12484 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 12485 fi' 12486 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 12487 dlpath=$dir/\$dldll~ 12488 $RM \$dlpath' 12489 ;; 12490 12491 osf3* | osf4* | osf5*) 12492 version_type=osf 12493 need_lib_prefix=no 12494 need_version=no 12495 soname_spec='$libname$release$shared_ext$major' 12496 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12497 shlibpath_var=LD_LIBRARY_PATH 12498 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 12499 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 12500 ;; 12501 12502 rdos*) 12503 dynamic_linker=no 12504 ;; 12505 12506 solaris*) 12507 version_type=linux # correct to gnu/linux during the next big refactor 12508 need_lib_prefix=no 12509 need_version=no 12510 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12511 soname_spec='$libname$release$shared_ext$major' 12512 shlibpath_var=LD_LIBRARY_PATH 12513 shlibpath_overrides_runpath=yes 12514 hardcode_into_libs=yes 12515 # ldd complains unless libraries are executable 12516 postinstall_cmds='chmod +x $lib' 12517 ;; 12518 12519 sunos4*) 12520 version_type=sunos 12521 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 12522 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 12523 shlibpath_var=LD_LIBRARY_PATH 12524 shlibpath_overrides_runpath=yes 12525 if test yes = "$with_gnu_ld"; then 12526 need_lib_prefix=no 12527 fi 12528 need_version=yes 12529 ;; 12530 12531 sysv4 | sysv4.3*) 12532 version_type=linux # correct to gnu/linux during the next big refactor 12533 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12534 soname_spec='$libname$release$shared_ext$major' 12535 shlibpath_var=LD_LIBRARY_PATH 12536 case $host_vendor in 12537 sni) 12538 shlibpath_overrides_runpath=no 12539 need_lib_prefix=no 12540 runpath_var=LD_RUN_PATH 12541 ;; 12542 siemens) 12543 need_lib_prefix=no 12544 ;; 12545 motorola) 12546 need_lib_prefix=no 12547 need_version=no 12548 shlibpath_overrides_runpath=no 12549 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 12550 ;; 12551 esac 12552 ;; 12553 12554 sysv4*MP*) 12555 if test -d /usr/nec; then 12556 version_type=linux # correct to gnu/linux during the next big refactor 12557 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 12558 soname_spec='$libname$shared_ext.$major' 12559 shlibpath_var=LD_LIBRARY_PATH 12560 fi 12561 ;; 12562 12563 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 12564 version_type=sco 12565 need_lib_prefix=no 12566 need_version=no 12567 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 12568 soname_spec='$libname$release$shared_ext$major' 12569 shlibpath_var=LD_LIBRARY_PATH 12570 shlibpath_overrides_runpath=yes 12571 hardcode_into_libs=yes 12572 if test yes = "$with_gnu_ld"; then 12573 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 12574 else 12575 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 12576 case $host_os in 12577 sco3.2v5*) 12578 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 12579 ;; 12580 esac 12581 fi 12582 sys_lib_dlsearch_path_spec='/usr/lib' 12583 ;; 12584 12585 tpf*) 12586 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 12587 version_type=linux # correct to gnu/linux during the next big refactor 12588 need_lib_prefix=no 12589 need_version=no 12590 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12591 shlibpath_var=LD_LIBRARY_PATH 12592 shlibpath_overrides_runpath=no 12593 hardcode_into_libs=yes 12594 ;; 12595 12596 uts4*) 12597 version_type=linux # correct to gnu/linux during the next big refactor 12598 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 12599 soname_spec='$libname$release$shared_ext$major' 12600 shlibpath_var=LD_LIBRARY_PATH 12601 ;; 12602 12603 *) 12604 dynamic_linker=no 12605 ;; 12606 esac 12607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 12608 $as_echo "$dynamic_linker" >&6; } 12609 test no = "$dynamic_linker" && can_build_shared=no 12610 12611 variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 12612 if test yes = "$GCC"; then 12613 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 12614 fi 12615 12616 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 12617 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 12618 fi 12619 12620 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 12621 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 12622 fi 12623 12624 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 12625 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 12626 12627 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 12628 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 12629 12630 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 12631 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 12730 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } 12731 hardcode_action= 12732 if test -n "$hardcode_libdir_flag_spec" || 12733 test -n "$runpath_var" || 12734 test yes = "$hardcode_automatic"; then 12735 12736 # We can hardcode non-existent directories. 12737 if test no != "$hardcode_direct" && 12738 # If the only mechanism to avoid hardcoding is shlibpath_var, we 12739 # have to relink, otherwise we might link with an installed library 12740 # when we should be linking with a yet-to-be-installed one 12741 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && 12742 test no != "$hardcode_minus_L"; then 12743 # Linking always hardcodes the temporary library directory. 12744 hardcode_action=relink 12745 else 12746 # We can link without hardcoding, and we can hardcode nonexisting dirs. 12747 hardcode_action=immediate 12748 fi 12749 else 12750 # We cannot hardcode anything, or else we can only hardcode existing 12751 # directories. 12752 hardcode_action=unsupported 12753 fi 12754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 12755 $as_echo "$hardcode_action" >&6; } 12756 12757 if test relink = "$hardcode_action" || 12758 test yes = "$inherit_rpath"; then 12759 # Fast installation is not supported 12760 enable_fast_install=no 12761 elif test yes = "$shlibpath_overrides_runpath" || 12762 test no = "$enable_shared"; then 12763 # Fast installation is not necessary 12764 enable_fast_install=needless 12765 fi 12766 12767 12768 12769 12770 12771 12772 if test yes != "$enable_dlopen"; then 12773 enable_dlopen=unknown 12774 enable_dlopen_self=unknown 12775 enable_dlopen_self_static=unknown 12776 else 12777 lt_cv_dlopen=no 12778 lt_cv_dlopen_libs= 12779 12780 case $host_os in 12781 beos*) 12782 lt_cv_dlopen=load_add_on 12783 lt_cv_dlopen_libs= 12784 lt_cv_dlopen_self=yes 12785 ;; 12786 12787 mingw* | pw32* | cegcc*) 12788 lt_cv_dlopen=LoadLibrary 12789 lt_cv_dlopen_libs= 12790 ;; 12791 12792 cygwin*) 12793 lt_cv_dlopen=dlopen 12794 lt_cv_dlopen_libs= 12795 ;; 12796 12797 darwin*) 12798 # if libdl is installed we need to link against it 12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 12800 $as_echo_n "checking for dlopen in -ldl... " >&6; } 12801 if ${ac_cv_lib_dl_dlopen+:} false; then : 12802 $as_echo_n "(cached) " >&6 12803 else 12804 ac_check_lib_save_LIBS=$LIBS 12805 LIBS="-ldl $LIBS" 12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12807 /* end confdefs.h. */ 12808 12809 /* Override any GCC internal prototype to avoid an error. 12810 Use char because int might match the return type of a GCC 12811 builtin and then its argument prototype would still apply. */ 12812 #ifdef __cplusplus 12813 extern "C" 12814 #endif 12815 char dlopen (); 12816 int 12817 main () 12818 { 12819 return dlopen (); 12820 ; 12821 return 0; 12822 } 12823 _ACEOF 12824 if ac_fn_c_try_link "$LINENO"; then : 12825 ac_cv_lib_dl_dlopen=yes 12826 else 12827 ac_cv_lib_dl_dlopen=no 12828 fi 12829 rm -f core conftest.err conftest.$ac_objext \ 12830 conftest$ac_exeext conftest.$ac_ext 12831 LIBS=$ac_check_lib_save_LIBS 12832 fi 12833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 12834 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 12835 if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 12836 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl 12837 else 12838 12839 lt_cv_dlopen=dyld 12840 lt_cv_dlopen_libs= 12841 lt_cv_dlopen_self=yes 12842 12843 fi 12844 12845 ;; 12846 12847 tpf*) 12848 # Don't try to run any link tests for TPF. We know it's impossible 12849 # because TPF is a cross-compiler, and we know how we open DSOs. 12850 lt_cv_dlopen=dlopen 12851 lt_cv_dlopen_libs= 12852 lt_cv_dlopen_self=no 12853 ;; 12854 12855 *) 12856 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" 12857 if test "x$ac_cv_func_shl_load" = xyes; then : 12858 lt_cv_dlopen=shl_load 12859 else 12860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 12861 $as_echo_n "checking for shl_load in -ldld... " >&6; } 12862 if ${ac_cv_lib_dld_shl_load+:} false; then : 12863 $as_echo_n "(cached) " >&6 12864 else 12865 ac_check_lib_save_LIBS=$LIBS 12866 LIBS="-ldld $LIBS" 12867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12868 /* end confdefs.h. */ 12869 12870 /* Override any GCC internal prototype to avoid an error. 12871 Use char because int might match the return type of a GCC 12872 builtin and then its argument prototype would still apply. */ 12873 #ifdef __cplusplus 12874 extern "C" 12875 #endif 12876 char shl_load (); 12877 int 12878 main () 12879 { 12880 return shl_load (); 12881 ; 12882 return 0; 12883 } 12884 _ACEOF 12885 if ac_fn_c_try_link "$LINENO"; then : 12886 ac_cv_lib_dld_shl_load=yes 12887 else 12888 ac_cv_lib_dld_shl_load=no 12889 fi 12890 rm -f core conftest.err conftest.$ac_objext \ 12891 conftest$ac_exeext conftest.$ac_ext 12892 LIBS=$ac_check_lib_save_LIBS 12893 fi 12894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 12895 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } 12896 if test "x$ac_cv_lib_dld_shl_load" = xyes; then : 12897 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld 12898 else 12899 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" 12900 if test "x$ac_cv_func_dlopen" = xyes; then : 12901 lt_cv_dlopen=dlopen 12902 else 12903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 12904 $as_echo_n "checking for dlopen in -ldl... " >&6; } 12905 if ${ac_cv_lib_dl_dlopen+:} false; then : 12906 $as_echo_n "(cached) " >&6 12907 else 12908 ac_check_lib_save_LIBS=$LIBS 12909 LIBS="-ldl $LIBS" 12910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12911 /* end confdefs.h. */ 12912 12913 /* Override any GCC internal prototype to avoid an error. 12914 Use char because int might match the return type of a GCC 12915 builtin and then its argument prototype would still apply. */ 12916 #ifdef __cplusplus 12917 extern "C" 12918 #endif 12919 char dlopen (); 12920 int 12921 main () 12922 { 12923 return dlopen (); 12924 ; 12925 return 0; 12926 } 12927 _ACEOF 12928 if ac_fn_c_try_link "$LINENO"; then : 12929 ac_cv_lib_dl_dlopen=yes 12930 else 12931 ac_cv_lib_dl_dlopen=no 12932 fi 12933 rm -f core conftest.err conftest.$ac_objext \ 12934 conftest$ac_exeext conftest.$ac_ext 12935 LIBS=$ac_check_lib_save_LIBS 12936 fi 12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 12938 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 12939 if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 12940 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl 12941 else 12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 12943 $as_echo_n "checking for dlopen in -lsvld... " >&6; } 12944 if ${ac_cv_lib_svld_dlopen+:} false; then : 12945 $as_echo_n "(cached) " >&6 12946 else 12947 ac_check_lib_save_LIBS=$LIBS 12948 LIBS="-lsvld $LIBS" 12949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12950 /* end confdefs.h. */ 12951 12952 /* Override any GCC internal prototype to avoid an error. 12953 Use char because int might match the return type of a GCC 12954 builtin and then its argument prototype would still apply. */ 12955 #ifdef __cplusplus 12956 extern "C" 12957 #endif 12958 char dlopen (); 12959 int 12960 main () 12961 { 12962 return dlopen (); 12963 ; 12964 return 0; 12965 } 12966 _ACEOF 12967 if ac_fn_c_try_link "$LINENO"; then : 12968 ac_cv_lib_svld_dlopen=yes 12969 else 12970 ac_cv_lib_svld_dlopen=no 12971 fi 12972 rm -f core conftest.err conftest.$ac_objext \ 12973 conftest$ac_exeext conftest.$ac_ext 12974 LIBS=$ac_check_lib_save_LIBS 12975 fi 12976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 12977 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } 12978 if test "x$ac_cv_lib_svld_dlopen" = xyes; then : 12979 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld 12980 else 12981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 12982 $as_echo_n "checking for dld_link in -ldld... " >&6; } 12983 if ${ac_cv_lib_dld_dld_link+:} false; then : 12984 $as_echo_n "(cached) " >&6 12985 else 12986 ac_check_lib_save_LIBS=$LIBS 12987 LIBS="-ldld $LIBS" 12988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12989 /* end confdefs.h. */ 12990 12991 /* Override any GCC internal prototype to avoid an error. 12992 Use char because int might match the return type of a GCC 12993 builtin and then its argument prototype would still apply. */ 12994 #ifdef __cplusplus 12995 extern "C" 12996 #endif 12997 char dld_link (); 12998 int 12999 main () 13000 { 13001 return dld_link (); 13002 ; 13003 return 0; 13004 } 13005 _ACEOF 13006 if ac_fn_c_try_link "$LINENO"; then : 13007 ac_cv_lib_dld_dld_link=yes 13008 else 13009 ac_cv_lib_dld_dld_link=no 13010 fi 13011 rm -f core conftest.err conftest.$ac_objext \ 13012 conftest$ac_exeext conftest.$ac_ext 13013 LIBS=$ac_check_lib_save_LIBS 13014 fi 13015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 13016 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } 13017 if test "x$ac_cv_lib_dld_dld_link" = xyes; then : 13018 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld 13019 fi 13020 13021 13022 fi 13023 13024 13025 fi 13026 13027 13028 fi 13029 13030 13031 fi 13032 13033 13034 fi 13035 13036 ;; 13037 esac 13038 13039 if test no = "$lt_cv_dlopen"; then 13040 enable_dlopen=no 13041 else 13042 enable_dlopen=yes 13043 fi 13044 13045 case $lt_cv_dlopen in 13046 dlopen) 13047 save_CPPFLAGS=$CPPFLAGS 13048 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 13049 13050 save_LDFLAGS=$LDFLAGS 13051 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 13052 13053 save_LIBS=$LIBS 13054 LIBS="$lt_cv_dlopen_libs $LIBS" 13055 13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 13057 $as_echo_n "checking whether a program can dlopen itself... " >&6; } 13058 if ${lt_cv_dlopen_self+:} false; then : 13059 $as_echo_n "(cached) " >&6 13060 else 13061 if test yes = "$cross_compiling"; then : 13062 lt_cv_dlopen_self=cross 13063 else 13064 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 13065 lt_status=$lt_dlunknown 13066 cat > conftest.$ac_ext <<_LT_EOF 13067 #line $LINENO "configure" 13068 #include "confdefs.h" 13069 13070 #if HAVE_DLFCN_H 13071 #include <dlfcn.h> 13072 #endif 13073 13074 #include <stdio.h> 13075 13076 #ifdef RTLD_GLOBAL 13077 # define LT_DLGLOBAL RTLD_GLOBAL 13078 #else 13079 # ifdef DL_GLOBAL 13080 # define LT_DLGLOBAL DL_GLOBAL 13081 # else 13082 # define LT_DLGLOBAL 0 13083 # endif 13084 #endif 13085 13086 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we 13087 find out it does not work in some platform. */ 13088 #ifndef LT_DLLAZY_OR_NOW 13089 # ifdef RTLD_LAZY 13090 # define LT_DLLAZY_OR_NOW RTLD_LAZY 13091 # else 13092 # ifdef DL_LAZY 13093 # define LT_DLLAZY_OR_NOW DL_LAZY 13094 # else 13095 # ifdef RTLD_NOW 13096 # define LT_DLLAZY_OR_NOW RTLD_NOW 13097 # else 13098 # ifdef DL_NOW 13099 # define LT_DLLAZY_OR_NOW DL_NOW 13100 # else 13101 # define LT_DLLAZY_OR_NOW 0 13102 # endif 13103 # endif 13104 # endif 13105 # endif 13106 #endif 13107 13108 /* When -fvisibility=hidden is used, assume the code has been annotated 13109 correspondingly for the symbols needed. */ 13110 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 13111 int fnord () __attribute__((visibility("default"))); 13112 #endif 13113 13114 int fnord () { return 42; } 13115 int main () 13116 { 13117 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 13118 int status = $lt_dlunknown; 13119 13120 if (self) 13121 { 13122 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 13123 else 13124 { 13125 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 13126 else puts (dlerror ()); 13127 } 13128 /* dlclose (self); */ 13129 } 13130 else 13131 puts (dlerror ()); 13132 13133 return status; 13134 } 13135 _LT_EOF 13136 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 13137 (eval $ac_link) 2>&5 13138 ac_status=$? 13139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13140 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then 13141 (./conftest; exit; ) >&5 2>/dev/null 13142 lt_status=$? 13143 case x$lt_status in 13144 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; 13145 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; 13146 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; 13147 esac 13148 else : 13149 # compilation failed 13150 lt_cv_dlopen_self=no 13151 fi 13152 fi 13153 rm -fr conftest* 13154 13155 13156 fi 13157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 13158 $as_echo "$lt_cv_dlopen_self" >&6; } 13159 13160 if test yes = "$lt_cv_dlopen_self"; then 13161 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 13163 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } 13164 if ${lt_cv_dlopen_self_static+:} false; then : 13165 $as_echo_n "(cached) " >&6 13166 else 13167 if test yes = "$cross_compiling"; then : 13168 lt_cv_dlopen_self_static=cross 13169 else 13170 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 13171 lt_status=$lt_dlunknown 13172 cat > conftest.$ac_ext <<_LT_EOF 13173 #line $LINENO "configure" 13174 #include "confdefs.h" 13175 13176 #if HAVE_DLFCN_H 13177 #include <dlfcn.h> 13178 #endif 13179 13180 #include <stdio.h> 13181 13182 #ifdef RTLD_GLOBAL 13183 # define LT_DLGLOBAL RTLD_GLOBAL 13184 #else 13185 # ifdef DL_GLOBAL 13186 # define LT_DLGLOBAL DL_GLOBAL 13187 # else 13188 # define LT_DLGLOBAL 0 13189 # endif 13190 #endif 13191 13192 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we 13193 find out it does not work in some platform. */ 13194 #ifndef LT_DLLAZY_OR_NOW 13195 # ifdef RTLD_LAZY 13196 # define LT_DLLAZY_OR_NOW RTLD_LAZY 13197 # else 13198 # ifdef DL_LAZY 13199 # define LT_DLLAZY_OR_NOW DL_LAZY 13200 # else 13201 # ifdef RTLD_NOW 13202 # define LT_DLLAZY_OR_NOW RTLD_NOW 13203 # else 13204 # ifdef DL_NOW 13205 # define LT_DLLAZY_OR_NOW DL_NOW 13206 # else 13207 # define LT_DLLAZY_OR_NOW 0 13208 # endif 13209 # endif 13210 # endif 13211 # endif 13212 #endif 13213 13214 /* When -fvisibility=hidden is used, assume the code has been annotated 13215 correspondingly for the symbols needed. */ 13216 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 13217 int fnord () __attribute__((visibility("default"))); 13218 #endif 13219 13220 int fnord () { return 42; } 13221 int main () 13222 { 13223 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 13224 int status = $lt_dlunknown; 13225 13226 if (self) 13227 { 13228 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 13229 else 13230 { 13231 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 13232 else puts (dlerror ()); 13233 } 13234 /* dlclose (self); */ 13235 } 13236 else 13237 puts (dlerror ()); 13238 13239 return status; 13240 } 13241 _LT_EOF 13242 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 13243 (eval $ac_link) 2>&5 13244 ac_status=$? 13245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13246 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then 13247 (./conftest; exit; ) >&5 2>/dev/null 13248 lt_status=$? 13249 case x$lt_status in 13250 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; 13251 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; 13252 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; 13253 esac 13254 else : 13255 # compilation failed 13256 lt_cv_dlopen_self_static=no 13257 fi 13258 fi 13259 rm -fr conftest* 13260 13261 13262 fi 13263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 13264 $as_echo "$lt_cv_dlopen_self_static" >&6; } 13265 fi 13266 13267 CPPFLAGS=$save_CPPFLAGS 13268 LDFLAGS=$save_LDFLAGS 13269 LIBS=$save_LIBS 13270 ;; 13271 esac 13272 13273 case $lt_cv_dlopen_self in 13274 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 13275 *) enable_dlopen_self=unknown ;; 13276 esac 13277 13278 case $lt_cv_dlopen_self_static in 13279 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 13280 *) enable_dlopen_self_static=unknown ;; 13281 esac 13282 fi 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 striplib= 13301 old_striplib= 13302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 13303 $as_echo_n "checking whether stripping libraries is possible... " >&6; } 13304 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 13305 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 13306 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13308 $as_echo "yes" >&6; } 13309 else 13310 # FIXME - insert some real tests, host_os isn't really good enough 13311 case $host_os in 13312 darwin*) 13313 if test -n "$STRIP"; then 13314 striplib="$STRIP -x" 13315 old_striplib="$STRIP -S" 13316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13317 $as_echo "yes" >&6; } 13318 else 13319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 13320 $as_echo "no" >&6; } 13321 fi 13322 ;; 13323 *) 13324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 13325 $as_echo "no" >&6; } 13326 ;; 13327 esac 13328 fi 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 # Report what library types will actually be built 13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 13343 $as_echo_n "checking if libtool supports shared libraries... " >&6; } 13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 13345 $as_echo "$can_build_shared" >&6; } 13346 13347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 13348 $as_echo_n "checking whether to build shared libraries... " >&6; } 13349 test no = "$can_build_shared" && enable_shared=no 13350 13351 # On AIX, shared libraries and static libraries use the same namespace, and 13352 # are all built from PIC. 13353 case $host_os in 13354 aix3*) 13355 test yes = "$enable_shared" && enable_static=no 13356 if test -n "$RANLIB"; then 13357 archive_cmds="$archive_cmds~\$RANLIB \$lib" 13358 postinstall_cmds='$RANLIB $lib' 13359 fi 13360 ;; 13361 13362 aix[4-9]*) 13363 if test ia64 != "$host_cpu"; then 13364 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 13365 yes,aix,yes) ;; # shared object as lib.so file only 13366 yes,svr4,*) ;; # shared object as lib.so archive member only 13367 yes,*) enable_static=no ;; # shared object in lib.a archive as well 13368 esac 13369 fi 13370 ;; 13371 esac 13372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 13373 $as_echo "$enable_shared" >&6; } 13374 13375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 13376 $as_echo_n "checking whether to build static libraries... " >&6; } 13377 # Make sure either enable_shared or enable_static is yes. 13378 test yes = "$enable_shared" || enable_static=yes 13379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 13380 $as_echo "$enable_static" >&6; } 13381 13382 13383 13384 13385 fi 13386 ac_ext=c 13387 ac_cpp='$CPP $CPPFLAGS' 13388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 13389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 13390 ac_compiler_gnu=$ac_cv_c_compiler_gnu 13391 13392 CC=$lt_save_CC 13393 13394 if test -n "$CXX" && ( test no != "$CXX" && 13395 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 13396 (test g++ != "$CXX"))); then 13397 ac_ext=cpp 13398 ac_cpp='$CXXCPP $CPPFLAGS' 13399 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 13400 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 13401 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 13403 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } 13404 if test -z "$CXXCPP"; then 13405 if ${ac_cv_prog_CXXCPP+:} false; then : 13406 $as_echo_n "(cached) " >&6 13407 else 13408 # Double quotes because CXXCPP needs to be expanded 13409 for CXXCPP in "$CXX -E" "/lib/cpp" 13410 do 13411 ac_preproc_ok=false 13412 for ac_cxx_preproc_warn_flag in '' yes 13413 do 13414 # Use a header file that comes with gcc, so configuring glibc 13415 # with a fresh cross-compiler works. 13416 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 13417 # <limits.h> exists even on freestanding compilers. 13418 # On the NeXT, cc -E runs the code through the compiler's parser, 13419 # not just through cpp. "Syntax error" is here to catch this case. 13420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13421 /* end confdefs.h. */ 13422 #ifdef __STDC__ 13423 # include <limits.h> 13424 #else 13425 # include <assert.h> 13426 #endif 13427 Syntax error 13428 _ACEOF 13429 if ac_fn_cxx_try_cpp "$LINENO"; then : 13430 13431 else 13432 # Broken: fails on valid input. 13433 continue 13434 fi 13435 rm -f conftest.err conftest.i conftest.$ac_ext 13436 13437 # OK, works on sane cases. Now check whether nonexistent headers 13438 # can be detected and how. 13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13440 /* end confdefs.h. */ 13441 #include <ac_nonexistent.h> 13442 _ACEOF 13443 if ac_fn_cxx_try_cpp "$LINENO"; then : 13444 # Broken: success on invalid input. 13445 continue 13446 else 13447 # Passes both tests. 13448 ac_preproc_ok=: 13449 break 13450 fi 13451 rm -f conftest.err conftest.i conftest.$ac_ext 13452 13453 done 13454 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 13455 rm -f conftest.i conftest.err conftest.$ac_ext 13456 if $ac_preproc_ok; then : 13457 break 13458 fi 13459 13460 done 13461 ac_cv_prog_CXXCPP=$CXXCPP 13462 13463 fi 13464 CXXCPP=$ac_cv_prog_CXXCPP 13465 else 13466 ac_cv_prog_CXXCPP=$CXXCPP 13467 fi 13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 13469 $as_echo "$CXXCPP" >&6; } 13470 ac_preproc_ok=false 13471 for ac_cxx_preproc_warn_flag in '' yes 13472 do 13473 # Use a header file that comes with gcc, so configuring glibc 13474 # with a fresh cross-compiler works. 13475 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 13476 # <limits.h> exists even on freestanding compilers. 13477 # On the NeXT, cc -E runs the code through the compiler's parser, 13478 # not just through cpp. "Syntax error" is here to catch this case. 13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13480 /* end confdefs.h. */ 13481 #ifdef __STDC__ 13482 # include <limits.h> 13483 #else 13484 # include <assert.h> 13485 #endif 13486 Syntax error 13487 _ACEOF 13488 if ac_fn_cxx_try_cpp "$LINENO"; then : 13489 13490 else 13491 # Broken: fails on valid input. 13492 continue 13493 fi 13494 rm -f conftest.err conftest.i conftest.$ac_ext 13495 13496 # OK, works on sane cases. Now check whether nonexistent headers 13497 # can be detected and how. 13498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13499 /* end confdefs.h. */ 13500 #include <ac_nonexistent.h> 13501 _ACEOF 13502 if ac_fn_cxx_try_cpp "$LINENO"; then : 13503 # Broken: success on invalid input. 13504 continue 13505 else 13506 # Passes both tests. 13507 ac_preproc_ok=: 13508 break 13509 fi 13510 rm -f conftest.err conftest.i conftest.$ac_ext 13511 13512 done 13513 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 13514 rm -f conftest.i conftest.err conftest.$ac_ext 13515 if $ac_preproc_ok; then : 13516 13517 else 13518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 13519 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 13520 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check 13521 See \`config.log' for more details" "$LINENO" 5; } 13522 fi 13523 13524 ac_ext=c 13525 ac_cpp='$CPP $CPPFLAGS' 13526 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 13527 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 13528 ac_compiler_gnu=$ac_cv_c_compiler_gnu 13529 13530 else 13531 _lt_caught_CXX_error=yes 13532 fi 13533 13534 ac_ext=cpp 13535 ac_cpp='$CXXCPP $CPPFLAGS' 13536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 13537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 13538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 13539 13540 archive_cmds_need_lc_CXX=no 13541 allow_undefined_flag_CXX= 13542 always_export_symbols_CXX=no 13543 archive_expsym_cmds_CXX= 13544 compiler_needs_object_CXX=no 13545 export_dynamic_flag_spec_CXX= 13546 hardcode_direct_CXX=no 13547 hardcode_direct_absolute_CXX=no 13548 hardcode_libdir_flag_spec_CXX= 13549 hardcode_libdir_separator_CXX= 13550 hardcode_minus_L_CXX=no 13551 hardcode_shlibpath_var_CXX=unsupported 13552 hardcode_automatic_CXX=no 13553 inherit_rpath_CXX=no 13554 module_cmds_CXX= 13555 module_expsym_cmds_CXX= 13556 link_all_deplibs_CXX=unknown 13557 old_archive_cmds_CXX=$old_archive_cmds 13558 reload_flag_CXX=$reload_flag 13559 reload_cmds_CXX=$reload_cmds 13560 no_undefined_flag_CXX= 13561 whole_archive_flag_spec_CXX= 13562 enable_shared_with_static_runtimes_CXX=no 13563 13564 # Source file extension for C++ test sources. 13565 ac_ext=cpp 13566 13567 # Object file extension for compiled C++ test sources. 13568 objext=o 13569 objext_CXX=$objext 13570 13571 # No sense in running all these tests if we already determined that 13572 # the CXX compiler isn't working. Some variables (like enable_shared) 13573 # are currently assumed to apply to all compilers on this platform, 13574 # and will be corrupted by setting them based on a non-working compiler. 13575 if test yes != "$_lt_caught_CXX_error"; then 13576 # Code to be used in simple compile tests 13577 lt_simple_compile_test_code="int some_variable = 0;" 13578 13579 # Code to be used in simple link tests 13580 lt_simple_link_test_code='int main(int, char *[]) { return(0); }' 13581 13582 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 13583 13584 13585 13586 13587 13588 13589 # If no C compiler was specified, use CC. 13590 LTCC=${LTCC-"$CC"} 13591 13592 # If no C compiler flags were specified, use CFLAGS. 13593 LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 13594 13595 # Allow CC to be a program name with arguments. 13596 compiler=$CC 13597 13598 13599 # save warnings/boilerplate of simple test code 13600 ac_outfile=conftest.$ac_objext 13601 echo "$lt_simple_compile_test_code" >conftest.$ac_ext 13602 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 13603 _lt_compiler_boilerplate=`cat conftest.err` 13604 $RM conftest* 13605 13606 ac_outfile=conftest.$ac_objext 13607 echo "$lt_simple_link_test_code" >conftest.$ac_ext 13608 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 13609 _lt_linker_boilerplate=`cat conftest.err` 13610 $RM -r conftest* 13611 13612 13613 # Allow CC to be a program name with arguments. 13614 lt_save_CC=$CC 13615 lt_save_CFLAGS=$CFLAGS 13616 lt_save_LD=$LD 13617 lt_save_GCC=$GCC 13618 GCC=$GXX 13619 lt_save_with_gnu_ld=$with_gnu_ld 13620 lt_save_path_LD=$lt_cv_path_LD 13621 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 13622 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 13623 else 13624 $as_unset lt_cv_prog_gnu_ld 13625 fi 13626 if test -n "${lt_cv_path_LDCXX+set}"; then 13627 lt_cv_path_LD=$lt_cv_path_LDCXX 13628 else 13629 $as_unset lt_cv_path_LD 13630 fi 13631 test -z "${LDCXX+set}" || LD=$LDCXX 13632 CC=${CXX-"c++"} 13633 CFLAGS=$CXXFLAGS 13634 compiler=$CC 13635 compiler_CXX=$CC 13636 func_cc_basename $compiler 13637 cc_basename=$func_cc_basename_result 13638 13639 13640 if test -n "$compiler"; then 13641 # We don't want -fno-exception when compiling C++ code, so set the 13642 # no_builtin_flag separately 13643 if test yes = "$GXX"; then 13644 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' 13645 else 13646 lt_prog_compiler_no_builtin_flag_CXX= 13647 fi 13648 13649 if test yes = "$GXX"; then 13650 # Set up default GNU C++ configuration 13651 13652 13653 13654 # Check whether --with-gnu-ld was given. 13655 if test "${with_gnu_ld+set}" = set; then : 13656 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes 13657 else 13658 with_gnu_ld=no 13659 fi 13660 13661 ac_prog=ld 13662 if test yes = "$GCC"; then 13663 # Check if gcc -print-prog-name=ld gives a path. 13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 13665 $as_echo_n "checking for ld used by $CC... " >&6; } 13666 case $host in 13667 *-*-mingw*) 13668 # gcc leaves a trailing carriage return, which upsets mingw 13669 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 13670 *) 13671 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 13672 esac 13673 case $ac_prog in 13674 # Accept absolute paths. 13675 [\\/]* | ?:[\\/]*) 13676 re_direlt='/[^/][^/]*/\.\./' 13677 # Canonicalize the pathname of ld 13678 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 13679 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 13680 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 13681 done 13682 test -z "$LD" && LD=$ac_prog 13683 ;; 13684 "") 13685 # If it fails, then pretend we aren't using GCC. 13686 ac_prog=ld 13687 ;; 13688 *) 13689 # If it is relative, then search for the first ld in PATH. 13690 with_gnu_ld=unknown 13691 ;; 13692 esac 13693 elif test yes = "$with_gnu_ld"; then 13694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 13695 $as_echo_n "checking for GNU ld... " >&6; } 13696 else 13697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 13698 $as_echo_n "checking for non-GNU ld... " >&6; } 13699 fi 13700 if ${lt_cv_path_LD+:} false; then : 13701 $as_echo_n "(cached) " >&6 13702 else 13703 if test -z "$LD"; then 13704 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 13705 for ac_dir in $PATH; do 13706 IFS=$lt_save_ifs 13707 test -z "$ac_dir" && ac_dir=. 13708 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 13709 lt_cv_path_LD=$ac_dir/$ac_prog 13710 # Check to see if the program is GNU ld. I'd rather use --version, 13711 # but apparently some variants of GNU ld only accept -v. 13712 # Break only if it was the GNU/non-GNU ld that we prefer. 13713 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 13714 *GNU* | *'with BFD'*) 13715 test no != "$with_gnu_ld" && break 13716 ;; 13717 *) 13718 test yes != "$with_gnu_ld" && break 13719 ;; 13720 esac 13721 fi 13722 done 13723 IFS=$lt_save_ifs 13724 else 13725 lt_cv_path_LD=$LD # Let the user override the test with a path. 13726 fi 13727 fi 13728 13729 LD=$lt_cv_path_LD 13730 if test -n "$LD"; then 13731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 13732 $as_echo "$LD" >&6; } 13733 else 13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 13735 $as_echo "no" >&6; } 13736 fi 13737 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 13738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 13739 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } 13740 if ${lt_cv_prog_gnu_ld+:} false; then : 13741 $as_echo_n "(cached) " >&6 13742 else 13743 # I'd rather use --version here, but apparently some GNU lds only accept -v. 13744 case `$LD -v 2>&1 </dev/null` in 13745 *GNU* | *'with BFD'*) 13746 lt_cv_prog_gnu_ld=yes 13747 ;; 13748 *) 13749 lt_cv_prog_gnu_ld=no 13750 ;; 13751 esac 13752 fi 13753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 13754 $as_echo "$lt_cv_prog_gnu_ld" >&6; } 13755 with_gnu_ld=$lt_cv_prog_gnu_ld 13756 13757 13758 13759 13760 13761 13762 13763 # Check if GNU C++ uses GNU ld as the underlying linker, since the 13764 # archiving commands below assume that GNU ld is being used. 13765 if test yes = "$with_gnu_ld"; then 13766 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 13767 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 13768 13769 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' 13770 export_dynamic_flag_spec_CXX='$wl--export-dynamic' 13771 13772 # If archive_cmds runs LD, not CC, wlarc should be empty 13773 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 13774 # investigate it a little bit more. (MM) 13775 wlarc='$wl' 13776 13777 # ancient GNU ld didn't support --whole-archive et. al. 13778 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 13779 $GREP 'no-whole-archive' > /dev/null; then 13780 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 13781 else 13782 whole_archive_flag_spec_CXX= 13783 fi 13784 else 13785 with_gnu_ld=no 13786 wlarc= 13787 13788 # A generic and very simple default shared library creation 13789 # command for GNU C++ for the case where it uses the native 13790 # linker, instead of GNU ld. If possible, this setting should 13791 # overridden to take advantage of the native linker features on 13792 # the platform it is being used on. 13793 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 13794 fi 13795 13796 # Commands to make compiler produce verbose output that lists 13797 # what "hidden" libraries, object files and flags are used when 13798 # linking a shared library. 13799 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 13800 13801 else 13802 GXX=no 13803 with_gnu_ld=no 13804 wlarc= 13805 fi 13806 13807 # PORTME: fill in a description of your system's C++ link characteristics 13808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 13809 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } 13810 ld_shlibs_CXX=yes 13811 case $host_os in 13812 aix3*) 13813 # FIXME: insert proper C++ library support 13814 ld_shlibs_CXX=no 13815 ;; 13816 aix[4-9]*) 13817 if test ia64 = "$host_cpu"; then 13818 # On IA64, the linker does run time linking by default, so we don't 13819 # have to do anything special. 13820 aix_use_runtimelinking=no 13821 exp_sym_flag='-Bexport' 13822 no_entry_flag= 13823 else 13824 aix_use_runtimelinking=no 13825 13826 # Test if we are trying to use run time linking or normal 13827 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 13828 # have runtime linking enabled, and use it for executables. 13829 # For shared libraries, we enable/disable runtime linking 13830 # depending on the kind of the shared library created - 13831 # when "with_aix_soname,aix_use_runtimelinking" is: 13832 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 13833 # "aix,yes" lib.so shared, rtl:yes, for executables 13834 # lib.a static archive 13835 # "both,no" lib.so.V(shr.o) shared, rtl:yes 13836 # lib.a(lib.so.V) shared, rtl:no, for executables 13837 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 13838 # lib.a(lib.so.V) shared, rtl:no 13839 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 13840 # lib.a static archive 13841 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) 13842 for ld_flag in $LDFLAGS; do 13843 case $ld_flag in 13844 *-brtl*) 13845 aix_use_runtimelinking=yes 13846 break 13847 ;; 13848 esac 13849 done 13850 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 13851 # With aix-soname=svr4, we create the lib.so.V shared archives only, 13852 # so we don't have lib.a shared libs to link our executables. 13853 # We have to force runtime linking in this case. 13854 aix_use_runtimelinking=yes 13855 LDFLAGS="$LDFLAGS -Wl,-brtl" 13856 fi 13857 ;; 13858 esac 13859 13860 exp_sym_flag='-bexport' 13861 no_entry_flag='-bnoentry' 13862 fi 13863 13864 # When large executables or shared objects are built, AIX ld can 13865 # have problems creating the table of contents. If linking a library 13866 # or program results in "error TOC overflow" add -mminimal-toc to 13867 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 13868 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 13869 13870 archive_cmds_CXX='' 13871 hardcode_direct_CXX=yes 13872 hardcode_direct_absolute_CXX=yes 13873 hardcode_libdir_separator_CXX=':' 13874 link_all_deplibs_CXX=yes 13875 file_list_spec_CXX='$wl-f,' 13876 case $with_aix_soname,$aix_use_runtimelinking in 13877 aix,*) ;; # no import file 13878 svr4,* | *,yes) # use import file 13879 # The Import File defines what to hardcode. 13880 hardcode_direct_CXX=no 13881 hardcode_direct_absolute_CXX=no 13882 ;; 13883 esac 13884 13885 if test yes = "$GXX"; then 13886 case $host_os in aix4.[012]|aix4.[012].*) 13887 # We only want to do this on AIX 4.2 and lower, the check 13888 # below for broken collect2 doesn't work under 4.3+ 13889 collect2name=`$CC -print-prog-name=collect2` 13890 if test -f "$collect2name" && 13891 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 13892 then 13893 # We have reworked collect2 13894 : 13895 else 13896 # We have old collect2 13897 hardcode_direct_CXX=unsupported 13898 # It fails to find uninstalled libraries when the uninstalled 13899 # path is not listed in the libpath. Setting hardcode_minus_L 13900 # to unsupported forces relinking 13901 hardcode_minus_L_CXX=yes 13902 hardcode_libdir_flag_spec_CXX='-L$libdir' 13903 hardcode_libdir_separator_CXX= 13904 fi 13905 esac 13906 shared_flag='-shared' 13907 if test yes = "$aix_use_runtimelinking"; then 13908 shared_flag=$shared_flag' $wl-G' 13909 fi 13910 # Need to ensure runtime linking is disabled for the traditional 13911 # shared library, or the linker may eventually find shared libraries 13912 # /with/ Import File - we do not want to mix them. 13913 shared_flag_aix='-shared' 13914 shared_flag_svr4='-shared $wl-G' 13915 else 13916 # not using gcc 13917 if test ia64 = "$host_cpu"; then 13918 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 13919 # chokes on -Wl,-G. The following line is correct: 13920 shared_flag='-G' 13921 else 13922 if test yes = "$aix_use_runtimelinking"; then 13923 shared_flag='$wl-G' 13924 else 13925 shared_flag='$wl-bM:SRE' 13926 fi 13927 shared_flag_aix='$wl-bM:SRE' 13928 shared_flag_svr4='$wl-G' 13929 fi 13930 fi 13931 13932 export_dynamic_flag_spec_CXX='$wl-bexpall' 13933 # It seems that -bexpall does not export symbols beginning with 13934 # underscore (_), so it is better to generate a list of symbols to 13935 # export. 13936 always_export_symbols_CXX=yes 13937 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 13938 # Warning - without using the other runtime loading flags (-brtl), 13939 # -berok will link without error, but may produce a broken library. 13940 # The "-G" linker flag allows undefined symbols. 13941 no_undefined_flag_CXX='-bernotok' 13942 # Determine the default libpath from the value encoded in an empty 13943 # executable. 13944 if test set = "${lt_cv_aix_libpath+set}"; then 13945 aix_libpath=$lt_cv_aix_libpath 13946 else 13947 if ${lt_cv_aix_libpath__CXX+:} false; then : 13948 $as_echo_n "(cached) " >&6 13949 else 13950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13951 /* end confdefs.h. */ 13952 13953 int 13954 main () 13955 { 13956 13957 ; 13958 return 0; 13959 } 13960 _ACEOF 13961 if ac_fn_cxx_try_link "$LINENO"; then : 13962 13963 lt_aix_libpath_sed=' 13964 /Import File Strings/,/^$/ { 13965 /^0/ { 13966 s/^0 *\([^ ]*\) *$/\1/ 13967 p 13968 } 13969 }' 13970 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 13971 # Check for a 64-bit object if we didn't find anything. 13972 if test -z "$lt_cv_aix_libpath__CXX"; then 13973 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 13974 fi 13975 fi 13976 rm -f core conftest.err conftest.$ac_objext \ 13977 conftest$ac_exeext conftest.$ac_ext 13978 if test -z "$lt_cv_aix_libpath__CXX"; then 13979 lt_cv_aix_libpath__CXX=/usr/lib:/lib 13980 fi 13981 13982 fi 13983 13984 aix_libpath=$lt_cv_aix_libpath__CXX 13985 fi 13986 13987 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" 13988 13989 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 13990 else 13991 if test ia64 = "$host_cpu"; then 13992 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' 13993 allow_undefined_flag_CXX="-z nodefs" 13994 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" 13995 else 13996 # Determine the default libpath from the value encoded in an 13997 # empty executable. 13998 if test set = "${lt_cv_aix_libpath+set}"; then 13999 aix_libpath=$lt_cv_aix_libpath 14000 else 14001 if ${lt_cv_aix_libpath__CXX+:} false; then : 14002 $as_echo_n "(cached) " >&6 14003 else 14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14005 /* end confdefs.h. */ 14006 14007 int 14008 main () 14009 { 14010 14011 ; 14012 return 0; 14013 } 14014 _ACEOF 14015 if ac_fn_cxx_try_link "$LINENO"; then : 14016 14017 lt_aix_libpath_sed=' 14018 /Import File Strings/,/^$/ { 14019 /^0/ { 14020 s/^0 *\([^ ]*\) *$/\1/ 14021 p 14022 } 14023 }' 14024 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 14025 # Check for a 64-bit object if we didn't find anything. 14026 if test -z "$lt_cv_aix_libpath__CXX"; then 14027 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 14028 fi 14029 fi 14030 rm -f core conftest.err conftest.$ac_objext \ 14031 conftest$ac_exeext conftest.$ac_ext 14032 if test -z "$lt_cv_aix_libpath__CXX"; then 14033 lt_cv_aix_libpath__CXX=/usr/lib:/lib 14034 fi 14035 14036 fi 14037 14038 aix_libpath=$lt_cv_aix_libpath__CXX 14039 fi 14040 14041 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" 14042 # Warning - without using the other run time loading flags, 14043 # -berok will link without error, but may produce a broken library. 14044 no_undefined_flag_CXX=' $wl-bernotok' 14045 allow_undefined_flag_CXX=' $wl-berok' 14046 if test yes = "$with_gnu_ld"; then 14047 # We only use this code for GNU lds that support --whole-archive. 14048 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' 14049 else 14050 # Exported symbols can be pulled into shared objects from archives 14051 whole_archive_flag_spec_CXX='$convenience' 14052 fi 14053 archive_cmds_need_lc_CXX=yes 14054 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 14055 # -brtl affects multiple linker settings, -berok does not and is overridden later 14056 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' 14057 if test svr4 != "$with_aix_soname"; then 14058 # This is similar to how AIX traditionally builds its shared 14059 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 14060 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 14061 fi 14062 if test aix != "$with_aix_soname"; then 14063 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 14064 else 14065 # used by -dlpreopen to get the symbols 14066 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 14067 fi 14068 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' 14069 fi 14070 fi 14071 ;; 14072 14073 beos*) 14074 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 14075 allow_undefined_flag_CXX=unsupported 14076 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 14077 # support --undefined. This deserves some investigation. FIXME 14078 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 14079 else 14080 ld_shlibs_CXX=no 14081 fi 14082 ;; 14083 14084 chorus*) 14085 case $cc_basename in 14086 *) 14087 # FIXME: insert proper C++ library support 14088 ld_shlibs_CXX=no 14089 ;; 14090 esac 14091 ;; 14092 14093 cygwin* | mingw* | pw32* | cegcc*) 14094 case $GXX,$cc_basename in 14095 ,cl* | no,cl*) 14096 # Native MSVC 14097 # hardcode_libdir_flag_spec is actually meaningless, as there is 14098 # no search path for DLLs. 14099 hardcode_libdir_flag_spec_CXX=' ' 14100 allow_undefined_flag_CXX=unsupported 14101 always_export_symbols_CXX=yes 14102 file_list_spec_CXX='@' 14103 # Tell ltmain to make .lib files, not .a files. 14104 libext=lib 14105 # Tell ltmain to make .dll files, not .so files. 14106 shrext_cmds=.dll 14107 # FIXME: Setting linknames here is a bad hack. 14108 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 14109 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then 14110 cp "$export_symbols" "$output_objdir/$soname.def"; 14111 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 14112 else 14113 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 14114 fi~ 14115 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 14116 linknames=' 14117 # The linker will not automatically build a static lib if we build a DLL. 14118 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' 14119 enable_shared_with_static_runtimes_CXX=yes 14120 # Don't use ranlib 14121 old_postinstall_cmds_CXX='chmod 644 $oldlib' 14122 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ 14123 lt_tool_outputfile="@TOOL_OUTPUT@"~ 14124 case $lt_outputfile in 14125 *.exe|*.EXE) ;; 14126 *) 14127 lt_outputfile=$lt_outputfile.exe 14128 lt_tool_outputfile=$lt_tool_outputfile.exe 14129 ;; 14130 esac~ 14131 func_to_tool_file "$lt_outputfile"~ 14132 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 14133 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 14134 $RM "$lt_outputfile.manifest"; 14135 fi' 14136 ;; 14137 *) 14138 # g++ 14139 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, 14140 # as there is no search path for DLLs. 14141 hardcode_libdir_flag_spec_CXX='-L$libdir' 14142 export_dynamic_flag_spec_CXX='$wl--export-all-symbols' 14143 allow_undefined_flag_CXX=unsupported 14144 always_export_symbols_CXX=no 14145 enable_shared_with_static_runtimes_CXX=yes 14146 14147 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 14148 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' 14149 # If the export-symbols file already is a .def file, use it as 14150 # is; otherwise, prepend EXPORTS... 14151 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then 14152 cp $export_symbols $output_objdir/$soname.def; 14153 else 14154 echo EXPORTS > $output_objdir/$soname.def; 14155 cat $export_symbols >> $output_objdir/$soname.def; 14156 fi~ 14157 $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' 14158 else 14159 ld_shlibs_CXX=no 14160 fi 14161 ;; 14162 esac 14163 ;; 14164 darwin* | rhapsody*) 14165 14166 14167 archive_cmds_need_lc_CXX=no 14168 hardcode_direct_CXX=no 14169 hardcode_automatic_CXX=yes 14170 hardcode_shlibpath_var_CXX=unsupported 14171 if test yes = "$lt_cv_ld_force_load"; then 14172 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 14173 14174 else 14175 whole_archive_flag_spec_CXX='' 14176 fi 14177 link_all_deplibs_CXX=yes 14178 allow_undefined_flag_CXX=$_lt_dar_allow_undefined 14179 case $cc_basename in 14180 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 14181 *) _lt_dar_can_shared=$GCC ;; 14182 esac 14183 if test yes = "$_lt_dar_can_shared"; then 14184 output_verbose_link_cmd=func_echo_all 14185 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" 14186 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 14187 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" 14188 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" 14189 if test yes != "$lt_cv_apple_cc_single_mod"; then 14190 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" 14191 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" 14192 fi 14193 14194 else 14195 ld_shlibs_CXX=no 14196 fi 14197 14198 ;; 14199 14200 os2*) 14201 hardcode_libdir_flag_spec_CXX='-L$libdir' 14202 hardcode_minus_L_CXX=yes 14203 allow_undefined_flag_CXX=unsupported 14204 shrext_cmds=.dll 14205 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 14206 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 14207 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 14208 $ECHO EXPORTS >> $output_objdir/$libname.def~ 14209 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 14210 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 14211 emximp -o $lib $output_objdir/$libname.def' 14212 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 14213 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 14214 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 14215 $ECHO EXPORTS >> $output_objdir/$libname.def~ 14216 prefix_cmds="$SED"~ 14217 if test EXPORTS = "`$SED 1q $export_symbols`"; then 14218 prefix_cmds="$prefix_cmds -e 1d"; 14219 fi~ 14220 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 14221 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 14222 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 14223 emximp -o $lib $output_objdir/$libname.def' 14224 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 14225 enable_shared_with_static_runtimes_CXX=yes 14226 ;; 14227 14228 dgux*) 14229 case $cc_basename in 14230 ec++*) 14231 # FIXME: insert proper C++ library support 14232 ld_shlibs_CXX=no 14233 ;; 14234 ghcx*) 14235 # Green Hills C++ Compiler 14236 # FIXME: insert proper C++ library support 14237 ld_shlibs_CXX=no 14238 ;; 14239 *) 14240 # FIXME: insert proper C++ library support 14241 ld_shlibs_CXX=no 14242 ;; 14243 esac 14244 ;; 14245 14246 freebsd2.*) 14247 # C++ shared libraries reported to be fairly broken before 14248 # switch to ELF 14249 ld_shlibs_CXX=no 14250 ;; 14251 14252 freebsd-elf*) 14253 archive_cmds_need_lc_CXX=no 14254 ;; 14255 14256 freebsd* | dragonfly*) 14257 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 14258 # conventions 14259 ld_shlibs_CXX=yes 14260 ;; 14261 14262 haiku*) 14263 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 14264 link_all_deplibs_CXX=yes 14265 ;; 14266 14267 hpux9*) 14268 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' 14269 hardcode_libdir_separator_CXX=: 14270 export_dynamic_flag_spec_CXX='$wl-E' 14271 hardcode_direct_CXX=yes 14272 hardcode_minus_L_CXX=yes # Not in the search PATH, 14273 # but as the default 14274 # location of the library. 14275 14276 case $cc_basename in 14277 CC*) 14278 # FIXME: insert proper C++ library support 14279 ld_shlibs_CXX=no 14280 ;; 14281 aCC*) 14282 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 14283 # Commands to make compiler produce verbose output that lists 14284 # what "hidden" libraries, object files and flags are used when 14285 # linking a shared library. 14286 # 14287 # There doesn't appear to be a way to prevent this compiler from 14288 # explicitly linking system object files so we need to strip them 14289 # from the output so that they don't get included in the library 14290 # dependencies. 14291 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 14292 ;; 14293 *) 14294 if test yes = "$GXX"; then 14295 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 14296 else 14297 # FIXME: insert proper C++ library support 14298 ld_shlibs_CXX=no 14299 fi 14300 ;; 14301 esac 14302 ;; 14303 14304 hpux10*|hpux11*) 14305 if test no = "$with_gnu_ld"; then 14306 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' 14307 hardcode_libdir_separator_CXX=: 14308 14309 case $host_cpu in 14310 hppa*64*|ia64*) 14311 ;; 14312 *) 14313 export_dynamic_flag_spec_CXX='$wl-E' 14314 ;; 14315 esac 14316 fi 14317 case $host_cpu in 14318 hppa*64*|ia64*) 14319 hardcode_direct_CXX=no 14320 hardcode_shlibpath_var_CXX=no 14321 ;; 14322 *) 14323 hardcode_direct_CXX=yes 14324 hardcode_direct_absolute_CXX=yes 14325 hardcode_minus_L_CXX=yes # Not in the search PATH, 14326 # but as the default 14327 # location of the library. 14328 ;; 14329 esac 14330 14331 case $cc_basename in 14332 CC*) 14333 # FIXME: insert proper C++ library support 14334 ld_shlibs_CXX=no 14335 ;; 14336 aCC*) 14337 case $host_cpu in 14338 hppa*64*) 14339 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14340 ;; 14341 ia64*) 14342 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14343 ;; 14344 *) 14345 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14346 ;; 14347 esac 14348 # Commands to make compiler produce verbose output that lists 14349 # what "hidden" libraries, object files and flags are used when 14350 # linking a shared library. 14351 # 14352 # There doesn't appear to be a way to prevent this compiler from 14353 # explicitly linking system object files so we need to strip them 14354 # from the output so that they don't get included in the library 14355 # dependencies. 14356 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; func_echo_all "$list"' 14357 ;; 14358 *) 14359 if test yes = "$GXX"; then 14360 if test no = "$with_gnu_ld"; then 14361 case $host_cpu in 14362 hppa*64*) 14363 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14364 ;; 14365 ia64*) 14366 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14367 ;; 14368 *) 14369 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14370 ;; 14371 esac 14372 fi 14373 else 14374 # FIXME: insert proper C++ library support 14375 ld_shlibs_CXX=no 14376 fi 14377 ;; 14378 esac 14379 ;; 14380 14381 interix[3-9]*) 14382 hardcode_direct_CXX=no 14383 hardcode_shlibpath_var_CXX=no 14384 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' 14385 export_dynamic_flag_spec_CXX='$wl-E' 14386 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 14387 # Instead, shared libraries are loaded at an image base (0x10000000 by 14388 # default) and relocated if they conflict, which is a slow very memory 14389 # consuming and fragmenting process. To avoid this, we pick a random, 14390 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 14391 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 14392 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' 14393 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' 14394 ;; 14395 irix5* | irix6*) 14396 case $cc_basename in 14397 CC*) 14398 # SGI C++ 14399 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 14400 14401 # Archives containing C++ object files must be created using 14402 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 14403 # necessary to make sure instantiated templates are included 14404 # in the archive. 14405 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' 14406 ;; 14407 *) 14408 if test yes = "$GXX"; then 14409 if test no = "$with_gnu_ld"; then 14410 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 14411 else 14412 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 14413 fi 14414 fi 14415 link_all_deplibs_CXX=yes 14416 ;; 14417 esac 14418 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' 14419 hardcode_libdir_separator_CXX=: 14420 inherit_rpath_CXX=yes 14421 ;; 14422 14423 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 14424 case $cc_basename in 14425 KCC*) 14426 # Kuck and Associates, Inc. (KAI) C++ Compiler 14427 14428 # KCC will only create a shared library if the output file 14429 # ends with ".so" (or ".sl" for HP-UX), so rename the library 14430 # to its proper name (with version) after linking. 14431 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' 14432 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' 14433 # Commands to make compiler produce verbose output that lists 14434 # what "hidden" libraries, object files and flags are used when 14435 # linking a shared library. 14436 # 14437 # There doesn't appear to be a way to prevent this compiler from 14438 # explicitly linking system object files so we need to strip them 14439 # from the output so that they don't get included in the library 14440 # dependencies. 14441 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; func_echo_all "$list"' 14442 14443 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' 14444 export_dynamic_flag_spec_CXX='$wl--export-dynamic' 14445 14446 # Archives containing C++ object files must be created using 14447 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 14448 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' 14449 ;; 14450 icpc* | ecpc* ) 14451 # Intel C++ 14452 with_gnu_ld=yes 14453 # version 8.0 and above of icpc choke on multiply defined symbols 14454 # if we add $predep_objects and $postdep_objects, however 7.1 and 14455 # earlier do not add the objects themselves. 14456 case `$CC -V 2>&1` in 14457 *"Version 7."*) 14458 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 14459 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' 14460 ;; 14461 *) # Version 8.0 or newer 14462 tmp_idyn= 14463 case $host_cpu in 14464 ia64*) tmp_idyn=' -i_dynamic';; 14465 esac 14466 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 14467 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' 14468 ;; 14469 esac 14470 archive_cmds_need_lc_CXX=no 14471 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' 14472 export_dynamic_flag_spec_CXX='$wl--export-dynamic' 14473 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' 14474 ;; 14475 pgCC* | pgcpp*) 14476 # Portland Group C++ compiler 14477 case `$CC -V` in 14478 *pgCC\ [1-5].* | *pgcpp\ [1-5].*) 14479 prelink_cmds_CXX='tpldir=Template.dir~ 14480 rm -rf $tpldir~ 14481 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 14482 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 14483 old_archive_cmds_CXX='tpldir=Template.dir~ 14484 rm -rf $tpldir~ 14485 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 14486 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 14487 $RANLIB $oldlib' 14488 archive_cmds_CXX='tpldir=Template.dir~ 14489 rm -rf $tpldir~ 14490 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 14491 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 14492 archive_expsym_cmds_CXX='tpldir=Template.dir~ 14493 rm -rf $tpldir~ 14494 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 14495 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 14496 ;; 14497 *) # Version 6 and above use weak symbols 14498 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 14499 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' 14500 ;; 14501 esac 14502 14503 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' 14504 export_dynamic_flag_spec_CXX='$wl--export-dynamic' 14505 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 14506 ;; 14507 cxx*) 14508 # Compaq C++ 14509 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 14510 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' 14511 14512 runpath_var=LD_RUN_PATH 14513 hardcode_libdir_flag_spec_CXX='-rpath $libdir' 14514 hardcode_libdir_separator_CXX=: 14515 14516 # Commands to make compiler produce verbose output that lists 14517 # what "hidden" libraries, object files and flags are used when 14518 # linking a shared library. 14519 # 14520 # There doesn't appear to be a way to prevent this compiler from 14521 # explicitly linking system object files so we need to strip them 14522 # from the output so that they don't get included in the library 14523 # dependencies. 14524 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' 14525 ;; 14526 xl* | mpixl* | bgxl*) 14527 # IBM XL 8.0 on PPC, with GNU ld 14528 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' 14529 export_dynamic_flag_spec_CXX='$wl--export-dynamic' 14530 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 14531 if test yes = "$supports_anon_versioning"; then 14532 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ 14533 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 14534 echo "local: *; };" >> $output_objdir/$libname.ver~ 14535 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 14536 fi 14537 ;; 14538 *) 14539 case `$CC -V 2>&1 | sed 5q` in 14540 *Sun\ C*) 14541 # Sun C++ 5.9 14542 no_undefined_flag_CXX=' -zdefs' 14543 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14544 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' 14545 hardcode_libdir_flag_spec_CXX='-R$libdir' 14546 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 14547 compiler_needs_object_CXX=yes 14548 14549 # Not sure whether something based on 14550 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 14551 # would be better. 14552 output_verbose_link_cmd='func_echo_all' 14553 14554 # Archives containing C++ object files must be created using 14555 # "CC -xar", where "CC" is the Sun C++ compiler. This is 14556 # necessary to make sure instantiated templates are included 14557 # in the archive. 14558 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' 14559 ;; 14560 esac 14561 ;; 14562 esac 14563 ;; 14564 14565 lynxos*) 14566 # FIXME: insert proper C++ library support 14567 ld_shlibs_CXX=no 14568 ;; 14569 14570 m88k*) 14571 # FIXME: insert proper C++ library support 14572 ld_shlibs_CXX=no 14573 ;; 14574 14575 mvs*) 14576 case $cc_basename in 14577 cxx*) 14578 # FIXME: insert proper C++ library support 14579 ld_shlibs_CXX=no 14580 ;; 14581 *) 14582 # FIXME: insert proper C++ library support 14583 ld_shlibs_CXX=no 14584 ;; 14585 esac 14586 ;; 14587 14588 netbsd*) 14589 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 14590 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 14591 wlarc= 14592 hardcode_libdir_flag_spec_CXX='-R$libdir' 14593 hardcode_direct_CXX=yes 14594 hardcode_shlibpath_var_CXX=no 14595 fi 14596 # Workaround some broken pre-1.5 toolchains 14597 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 14598 ;; 14599 14600 *nto* | *qnx*) 14601 ld_shlibs_CXX=yes 14602 ;; 14603 14604 openbsd* | bitrig*) 14605 if test -f /usr/libexec/ld.so; then 14606 hardcode_direct_CXX=yes 14607 hardcode_shlibpath_var_CXX=no 14608 hardcode_direct_absolute_CXX=yes 14609 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 14610 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' 14611 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 14612 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 14613 export_dynamic_flag_spec_CXX='$wl-E' 14614 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 14615 fi 14616 output_verbose_link_cmd=func_echo_all 14617 else 14618 ld_shlibs_CXX=no 14619 fi 14620 ;; 14621 14622 osf3* | osf4* | osf5*) 14623 case $cc_basename in 14624 KCC*) 14625 # Kuck and Associates, Inc. (KAI) C++ Compiler 14626 14627 # KCC will only create a shared library if the output file 14628 # ends with ".so" (or ".sl" for HP-UX), so rename the library 14629 # to its proper name (with version) after linking. 14630 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' 14631 14632 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' 14633 hardcode_libdir_separator_CXX=: 14634 14635 # Archives containing C++ object files must be created using 14636 # the KAI C++ compiler. 14637 case $host in 14638 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; 14639 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; 14640 esac 14641 ;; 14642 RCC*) 14643 # Rational C++ 2.4.1 14644 # FIXME: insert proper C++ library support 14645 ld_shlibs_CXX=no 14646 ;; 14647 cxx*) 14648 case $host in 14649 osf3*) 14650 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' 14651 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 14652 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' 14653 ;; 14654 *) 14655 allow_undefined_flag_CXX=' -expect_unresolved \*' 14656 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 14657 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 14658 echo "-hidden">> $lib.exp~ 14659 $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~ 14660 $RM $lib.exp' 14661 hardcode_libdir_flag_spec_CXX='-rpath $libdir' 14662 ;; 14663 esac 14664 14665 hardcode_libdir_separator_CXX=: 14666 14667 # Commands to make compiler produce verbose output that lists 14668 # what "hidden" libraries, object files and flags are used when 14669 # linking a shared library. 14670 # 14671 # There doesn't appear to be a way to prevent this compiler from 14672 # explicitly linking system object files so we need to strip them 14673 # from the output so that they don't get included in the library 14674 # dependencies. 14675 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' 14676 ;; 14677 *) 14678 if test yes,no = "$GXX,$with_gnu_ld"; then 14679 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' 14680 case $host in 14681 osf3*) 14682 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 14683 ;; 14684 *) 14685 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 14686 ;; 14687 esac 14688 14689 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' 14690 hardcode_libdir_separator_CXX=: 14691 14692 # Commands to make compiler produce verbose output that lists 14693 # what "hidden" libraries, object files and flags are used when 14694 # linking a shared library. 14695 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 14696 14697 else 14698 # FIXME: insert proper C++ library support 14699 ld_shlibs_CXX=no 14700 fi 14701 ;; 14702 esac 14703 ;; 14704 14705 psos*) 14706 # FIXME: insert proper C++ library support 14707 ld_shlibs_CXX=no 14708 ;; 14709 14710 sunos4*) 14711 case $cc_basename in 14712 CC*) 14713 # Sun C++ 4.x 14714 # FIXME: insert proper C++ library support 14715 ld_shlibs_CXX=no 14716 ;; 14717 lcc*) 14718 # Lucid 14719 # FIXME: insert proper C++ library support 14720 ld_shlibs_CXX=no 14721 ;; 14722 *) 14723 # FIXME: insert proper C++ library support 14724 ld_shlibs_CXX=no 14725 ;; 14726 esac 14727 ;; 14728 14729 solaris*) 14730 case $cc_basename in 14731 CC* | sunCC*) 14732 # Sun C++ 4.2, 5.x and Centerline C++ 14733 archive_cmds_need_lc_CXX=yes 14734 no_undefined_flag_CXX=' -zdefs' 14735 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 14736 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 14737 $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' 14738 14739 hardcode_libdir_flag_spec_CXX='-R$libdir' 14740 hardcode_shlibpath_var_CXX=no 14741 case $host_os in 14742 solaris2.[0-5] | solaris2.[0-5].*) ;; 14743 *) 14744 # The compiler driver will combine and reorder linker options, 14745 # but understands '-z linker_flag'. 14746 # Supported since Solaris 2.6 (maybe 2.5.1?) 14747 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' 14748 ;; 14749 esac 14750 link_all_deplibs_CXX=yes 14751 14752 output_verbose_link_cmd='func_echo_all' 14753 14754 # Archives containing C++ object files must be created using 14755 # "CC -xar", where "CC" is the Sun C++ compiler. This is 14756 # necessary to make sure instantiated templates are included 14757 # in the archive. 14758 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' 14759 ;; 14760 gcx*) 14761 # Green Hills C++ Compiler 14762 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 14763 14764 # The C++ compiler must be used to create the archive. 14765 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 14766 ;; 14767 *) 14768 # GNU C++ compiler with Solaris linker 14769 if test yes,no = "$GXX,$with_gnu_ld"; then 14770 no_undefined_flag_CXX=' $wl-z ${wl}defs' 14771 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 14772 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 14773 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 14774 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 14775 14776 # Commands to make compiler produce verbose output that lists 14777 # what "hidden" libraries, object files and flags are used when 14778 # linking a shared library. 14779 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 14780 else 14781 # g++ 2.7 appears to require '-G' NOT '-shared' on this 14782 # platform. 14783 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 14784 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 14785 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 14786 14787 # Commands to make compiler produce verbose output that lists 14788 # what "hidden" libraries, object files and flags are used when 14789 # linking a shared library. 14790 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 14791 fi 14792 14793 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' 14794 case $host_os in 14795 solaris2.[0-5] | solaris2.[0-5].*) ;; 14796 *) 14797 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 14798 ;; 14799 esac 14800 fi 14801 ;; 14802 esac 14803 ;; 14804 14805 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) 14806 no_undefined_flag_CXX='$wl-z,text' 14807 archive_cmds_need_lc_CXX=no 14808 hardcode_shlibpath_var_CXX=no 14809 runpath_var='LD_RUN_PATH' 14810 14811 case $cc_basename in 14812 CC*) 14813 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14814 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14815 ;; 14816 *) 14817 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14818 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14819 ;; 14820 esac 14821 ;; 14822 14823 sysv5* | sco3.2v5* | sco5v6*) 14824 # Note: We CANNOT use -z defs as we might desire, because we do not 14825 # link with -lc, and that would cause any symbols used from libc to 14826 # always be unresolved, which means just about no library would 14827 # ever link correctly. If we're not using GNU ld we use -z text 14828 # though, which does catch some bad symbols but isn't as heavy-handed 14829 # as -z defs. 14830 no_undefined_flag_CXX='$wl-z,text' 14831 allow_undefined_flag_CXX='$wl-z,nodefs' 14832 archive_cmds_need_lc_CXX=no 14833 hardcode_shlibpath_var_CXX=no 14834 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' 14835 hardcode_libdir_separator_CXX=':' 14836 link_all_deplibs_CXX=yes 14837 export_dynamic_flag_spec_CXX='$wl-Bexport' 14838 runpath_var='LD_RUN_PATH' 14839 14840 case $cc_basename in 14841 CC*) 14842 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14843 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14844 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ 14845 '"$old_archive_cmds_CXX" 14846 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ 14847 '"$reload_cmds_CXX" 14848 ;; 14849 *) 14850 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14851 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 14852 ;; 14853 esac 14854 ;; 14855 14856 tandem*) 14857 case $cc_basename in 14858 NCC*) 14859 # NonStop-UX NCC 3.20 14860 # FIXME: insert proper C++ library support 14861 ld_shlibs_CXX=no 14862 ;; 14863 *) 14864 # FIXME: insert proper C++ library support 14865 ld_shlibs_CXX=no 14866 ;; 14867 esac 14868 ;; 14869 14870 vxworks*) 14871 # FIXME: insert proper C++ library support 14872 ld_shlibs_CXX=no 14873 ;; 14874 14875 *) 14876 # FIXME: insert proper C++ library support 14877 ld_shlibs_CXX=no 14878 ;; 14879 esac 14880 14881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 14882 $as_echo "$ld_shlibs_CXX" >&6; } 14883 test no = "$ld_shlibs_CXX" && can_build_shared=no 14884 14885 GCC_CXX=$GXX 14886 LD_CXX=$LD 14887 14888 ## CAVEAT EMPTOR: 14889 ## There is no encapsulation within the following macros, do not change 14890 ## the running order or otherwise move them around unless you know exactly 14891 ## what you are doing... 14892 # Dependencies to place before and after the object being linked: 14893 predep_objects_CXX= 14894 postdep_objects_CXX= 14895 predeps_CXX= 14896 postdeps_CXX= 14897 compiler_lib_search_path_CXX= 14898 14899 cat > conftest.$ac_ext <<_LT_EOF 14900 class Foo 14901 { 14902 public: 14903 Foo (void) { a = 0; } 14904 private: 14905 int a; 14906 }; 14907 _LT_EOF 14908 14909 14910 _lt_libdeps_save_CFLAGS=$CFLAGS 14911 case "$CC $CFLAGS " in #( 14912 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 14913 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 14914 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 14915 esac 14916 14917 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 14918 (eval $ac_compile) 2>&5 14919 ac_status=$? 14920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 14921 test $ac_status = 0; }; then 14922 # Parse the compiler output and extract the necessary 14923 # objects, libraries and library flags. 14924 14925 # Sentinel used to keep track of whether or not we are before 14926 # the conftest object file. 14927 pre_test_object_deps_done=no 14928 14929 for p in `eval "$output_verbose_link_cmd"`; do 14930 case $prev$p in 14931 14932 -L* | -R* | -l*) 14933 # Some compilers place space between "-{L,R}" and the path. 14934 # Remove the space. 14935 if test x-L = "$p" || 14936 test x-R = "$p"; then 14937 prev=$p 14938 continue 14939 fi 14940 14941 # Expand the sysroot to ease extracting the directories later. 14942 if test -z "$prev"; then 14943 case $p in 14944 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 14945 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 14946 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 14947 esac 14948 fi 14949 case $p in 14950 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 14951 esac 14952 if test no = "$pre_test_object_deps_done"; then 14953 case $prev in 14954 -L | -R) 14955 # Internal compiler library paths should come after those 14956 # provided the user. The postdeps already come after the 14957 # user supplied libs so there is no need to process them. 14958 if test -z "$compiler_lib_search_path_CXX"; then 14959 compiler_lib_search_path_CXX=$prev$p 14960 else 14961 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" 14962 fi 14963 ;; 14964 # The "-l" case would never come before the object being 14965 # linked, so don't bother handling this case. 14966 esac 14967 else 14968 if test -z "$postdeps_CXX"; then 14969 postdeps_CXX=$prev$p 14970 else 14971 postdeps_CXX="${postdeps_CXX} $prev$p" 14972 fi 14973 fi 14974 prev= 14975 ;; 14976 14977 *.lto.$objext) ;; # Ignore GCC LTO objects 14978 *.$objext) 14979 # This assumes that the test object file only shows up 14980 # once in the compiler output. 14981 if test "$p" = "conftest.$objext"; then 14982 pre_test_object_deps_done=yes 14983 continue 14984 fi 14985 14986 if test no = "$pre_test_object_deps_done"; then 14987 if test -z "$predep_objects_CXX"; then 14988 predep_objects_CXX=$p 14989 else 14990 predep_objects_CXX="$predep_objects_CXX $p" 14991 fi 14992 else 14993 if test -z "$postdep_objects_CXX"; then 14994 postdep_objects_CXX=$p 14995 else 14996 postdep_objects_CXX="$postdep_objects_CXX $p" 14997 fi 14998 fi 14999 ;; 15000 15001 *) ;; # Ignore the rest. 15002 15003 esac 15004 done 15005 15006 # Clean up. 15007 rm -f a.out a.exe 15008 else 15009 echo "libtool.m4: error: problem compiling CXX test program" 15010 fi 15011 15012 $RM -f confest.$objext 15013 CFLAGS=$_lt_libdeps_save_CFLAGS 15014 15015 # PORTME: override above test on systems where it is broken 15016 case $host_os in 15017 interix[3-9]*) 15018 # Interix 3.5 installs completely hosed .la files for C++, so rather than 15019 # hack all around it, let's just trust "g++" to DTRT. 15020 predep_objects_CXX= 15021 postdep_objects_CXX= 15022 postdeps_CXX= 15023 ;; 15024 esac 15025 15026 15027 case " $postdeps_CXX " in 15028 *" -lc "*) archive_cmds_need_lc_CXX=no ;; 15029 esac 15030 compiler_lib_search_dirs_CXX= 15031 if test -n "${compiler_lib_search_path_CXX}"; then 15032 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` 15033 fi 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 lt_prog_compiler_wl_CXX= 15066 lt_prog_compiler_pic_CXX= 15067 lt_prog_compiler_static_CXX= 15068 15069 15070 # C++ specific cases for pic, static, wl, etc. 15071 if test yes = "$GXX"; then 15072 lt_prog_compiler_wl_CXX='-Wl,' 15073 lt_prog_compiler_static_CXX='-static' 15074 15075 case $host_os in 15076 aix*) 15077 # All AIX code is PIC. 15078 if test ia64 = "$host_cpu"; then 15079 # AIX 5 now supports IA64 processor 15080 lt_prog_compiler_static_CXX='-Bstatic' 15081 fi 15082 lt_prog_compiler_pic_CXX='-fPIC' 15083 ;; 15084 15085 amigaos*) 15086 case $host_cpu in 15087 powerpc) 15088 # see comment about AmigaOS4 .so support 15089 lt_prog_compiler_pic_CXX='-fPIC' 15090 ;; 15091 m68k) 15092 # FIXME: we need at least 68020 code to build shared libraries, but 15093 # adding the '-m68020' flag to GCC prevents building anything better, 15094 # like '-m68040'. 15095 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' 15096 ;; 15097 esac 15098 ;; 15099 15100 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 15101 # PIC is the default for these OSes. 15102 ;; 15103 mingw* | cygwin* | os2* | pw32* | cegcc*) 15104 # This hack is so that the source file can tell whether it is being 15105 # built for inclusion in a dll (and should export symbols for example). 15106 # Although the cygwin gcc ignores -fPIC, still need this for old-style 15107 # (--disable-auto-import) libraries 15108 lt_prog_compiler_pic_CXX='-DDLL_EXPORT' 15109 case $host_os in 15110 os2*) 15111 lt_prog_compiler_static_CXX='$wl-static' 15112 ;; 15113 esac 15114 ;; 15115 darwin* | rhapsody*) 15116 # PIC is the default on this platform 15117 # Common symbols not allowed in MH_DYLIB files 15118 lt_prog_compiler_pic_CXX='-fno-common' 15119 ;; 15120 *djgpp*) 15121 # DJGPP does not support shared libraries at all 15122 lt_prog_compiler_pic_CXX= 15123 ;; 15124 haiku*) 15125 # PIC is the default for Haiku. 15126 # The "-static" flag exists, but is broken. 15127 lt_prog_compiler_static_CXX= 15128 ;; 15129 interix[3-9]*) 15130 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 15131 # Instead, we relocate shared libraries at runtime. 15132 ;; 15133 sysv4*MP*) 15134 if test -d /usr/nec; then 15135 lt_prog_compiler_pic_CXX=-Kconform_pic 15136 fi 15137 ;; 15138 hpux*) 15139 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 15140 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 15141 # sets the default TLS model and affects inlining. 15142 case $host_cpu in 15143 hppa*64*) 15144 ;; 15145 *) 15146 lt_prog_compiler_pic_CXX='-fPIC' 15147 ;; 15148 esac 15149 ;; 15150 *qnx* | *nto*) 15151 # QNX uses GNU C++, but need to define -shared option too, otherwise 15152 # it will coredump. 15153 lt_prog_compiler_pic_CXX='-fPIC -shared' 15154 ;; 15155 *) 15156 lt_prog_compiler_pic_CXX='-fPIC' 15157 ;; 15158 esac 15159 else 15160 case $host_os in 15161 aix[4-9]*) 15162 # All AIX code is PIC. 15163 if test ia64 = "$host_cpu"; then 15164 # AIX 5 now supports IA64 processor 15165 lt_prog_compiler_static_CXX='-Bstatic' 15166 else 15167 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' 15168 fi 15169 ;; 15170 chorus*) 15171 case $cc_basename in 15172 cxch68*) 15173 # Green Hills C++ Compiler 15174 # _LT_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" 15175 ;; 15176 esac 15177 ;; 15178 mingw* | cygwin* | os2* | pw32* | cegcc*) 15179 # This hack is so that the source file can tell whether it is being 15180 # built for inclusion in a dll (and should export symbols for example). 15181 lt_prog_compiler_pic_CXX='-DDLL_EXPORT' 15182 ;; 15183 dgux*) 15184 case $cc_basename in 15185 ec++*) 15186 lt_prog_compiler_pic_CXX='-KPIC' 15187 ;; 15188 ghcx*) 15189 # Green Hills C++ Compiler 15190 lt_prog_compiler_pic_CXX='-pic' 15191 ;; 15192 *) 15193 ;; 15194 esac 15195 ;; 15196 freebsd* | dragonfly*) 15197 # FreeBSD uses GNU C++ 15198 ;; 15199 hpux9* | hpux10* | hpux11*) 15200 case $cc_basename in 15201 CC*) 15202 lt_prog_compiler_wl_CXX='-Wl,' 15203 lt_prog_compiler_static_CXX='$wl-a ${wl}archive' 15204 if test ia64 != "$host_cpu"; then 15205 lt_prog_compiler_pic_CXX='+Z' 15206 fi 15207 ;; 15208 aCC*) 15209 lt_prog_compiler_wl_CXX='-Wl,' 15210 lt_prog_compiler_static_CXX='$wl-a ${wl}archive' 15211 case $host_cpu in 15212 hppa*64*|ia64*) 15213 # +Z the default 15214 ;; 15215 *) 15216 lt_prog_compiler_pic_CXX='+Z' 15217 ;; 15218 esac 15219 ;; 15220 *) 15221 ;; 15222 esac 15223 ;; 15224 interix*) 15225 # This is c89, which is MS Visual C++ (no shared libs) 15226 # Anyone wants to do a port? 15227 ;; 15228 irix5* | irix6* | nonstopux*) 15229 case $cc_basename in 15230 CC*) 15231 lt_prog_compiler_wl_CXX='-Wl,' 15232 lt_prog_compiler_static_CXX='-non_shared' 15233 # CC pic flag -KPIC is the default. 15234 ;; 15235 *) 15236 ;; 15237 esac 15238 ;; 15239 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 15240 case $cc_basename in 15241 KCC*) 15242 # KAI C++ Compiler 15243 lt_prog_compiler_wl_CXX='--backend -Wl,' 15244 lt_prog_compiler_pic_CXX='-fPIC' 15245 ;; 15246 ecpc* ) 15247 # old Intel C++ for x86_64, which still supported -KPIC. 15248 lt_prog_compiler_wl_CXX='-Wl,' 15249 lt_prog_compiler_pic_CXX='-KPIC' 15250 lt_prog_compiler_static_CXX='-static' 15251 ;; 15252 icpc* ) 15253 # Intel C++, used to be incompatible with GCC. 15254 # ICC 10 doesn't accept -KPIC any more. 15255 lt_prog_compiler_wl_CXX='-Wl,' 15256 lt_prog_compiler_pic_CXX='-fPIC' 15257 lt_prog_compiler_static_CXX='-static' 15258 ;; 15259 pgCC* | pgcpp*) 15260 # Portland Group C++ compiler 15261 lt_prog_compiler_wl_CXX='-Wl,' 15262 lt_prog_compiler_pic_CXX='-fpic' 15263 lt_prog_compiler_static_CXX='-Bstatic' 15264 ;; 15265 cxx*) 15266 # Compaq C++ 15267 # Make sure the PIC flag is empty. It appears that all Alpha 15268 # Linux and Compaq Tru64 Unix objects are PIC. 15269 lt_prog_compiler_pic_CXX= 15270 lt_prog_compiler_static_CXX='-non_shared' 15271 ;; 15272 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) 15273 # IBM XL 8.0, 9.0 on PPC and BlueGene 15274 lt_prog_compiler_wl_CXX='-Wl,' 15275 lt_prog_compiler_pic_CXX='-qpic' 15276 lt_prog_compiler_static_CXX='-qstaticlink' 15277 ;; 15278 *) 15279 case `$CC -V 2>&1 | sed 5q` in 15280 *Sun\ C*) 15281 # Sun C++ 5.9 15282 lt_prog_compiler_pic_CXX='-KPIC' 15283 lt_prog_compiler_static_CXX='-Bstatic' 15284 lt_prog_compiler_wl_CXX='-Qoption ld ' 15285 ;; 15286 esac 15287 ;; 15288 esac 15289 ;; 15290 lynxos*) 15291 ;; 15292 m88k*) 15293 ;; 15294 mvs*) 15295 case $cc_basename in 15296 cxx*) 15297 lt_prog_compiler_pic_CXX='-W c,exportall' 15298 ;; 15299 *) 15300 ;; 15301 esac 15302 ;; 15303 netbsd* | netbsdelf*-gnu) 15304 ;; 15305 *qnx* | *nto*) 15306 # QNX uses GNU C++, but need to define -shared option too, otherwise 15307 # it will coredump. 15308 lt_prog_compiler_pic_CXX='-fPIC -shared' 15309 ;; 15310 osf3* | osf4* | osf5*) 15311 case $cc_basename in 15312 KCC*) 15313 lt_prog_compiler_wl_CXX='--backend -Wl,' 15314 ;; 15315 RCC*) 15316 # Rational C++ 2.4.1 15317 lt_prog_compiler_pic_CXX='-pic' 15318 ;; 15319 cxx*) 15320 # Digital/Compaq C++ 15321 lt_prog_compiler_wl_CXX='-Wl,' 15322 # Make sure the PIC flag is empty. It appears that all Alpha 15323 # Linux and Compaq Tru64 Unix objects are PIC. 15324 lt_prog_compiler_pic_CXX= 15325 lt_prog_compiler_static_CXX='-non_shared' 15326 ;; 15327 *) 15328 ;; 15329 esac 15330 ;; 15331 psos*) 15332 ;; 15333 solaris*) 15334 case $cc_basename in 15335 CC* | sunCC*) 15336 # Sun C++ 4.2, 5.x and Centerline C++ 15337 lt_prog_compiler_pic_CXX='-KPIC' 15338 lt_prog_compiler_static_CXX='-Bstatic' 15339 lt_prog_compiler_wl_CXX='-Qoption ld ' 15340 ;; 15341 gcx*) 15342 # Green Hills C++ Compiler 15343 lt_prog_compiler_pic_CXX='-PIC' 15344 ;; 15345 *) 15346 ;; 15347 esac 15348 ;; 15349 sunos4*) 15350 case $cc_basename in 15351 CC*) 15352 # Sun C++ 4.x 15353 lt_prog_compiler_pic_CXX='-pic' 15354 lt_prog_compiler_static_CXX='-Bstatic' 15355 ;; 15356 lcc*) 15357 # Lucid 15358 lt_prog_compiler_pic_CXX='-pic' 15359 ;; 15360 *) 15361 ;; 15362 esac 15363 ;; 15364 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 15365 case $cc_basename in 15366 CC*) 15367 lt_prog_compiler_wl_CXX='-Wl,' 15368 lt_prog_compiler_pic_CXX='-KPIC' 15369 lt_prog_compiler_static_CXX='-Bstatic' 15370 ;; 15371 esac 15372 ;; 15373 tandem*) 15374 case $cc_basename in 15375 NCC*) 15376 # NonStop-UX NCC 3.20 15377 lt_prog_compiler_pic_CXX='-KPIC' 15378 ;; 15379 *) 15380 ;; 15381 esac 15382 ;; 15383 vxworks*) 15384 ;; 15385 *) 15386 lt_prog_compiler_can_build_shared_CXX=no 15387 ;; 15388 esac 15389 fi 15390 15391 case $host_os in 15392 # For platforms that do not support PIC, -DPIC is meaningless: 15393 *djgpp*) 15394 lt_prog_compiler_pic_CXX= 15395 ;; 15396 *) 15397 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" 15398 ;; 15399 esac 15400 15401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 15402 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } 15403 if ${lt_cv_prog_compiler_pic_CXX+:} false; then : 15404 $as_echo_n "(cached) " >&6 15405 else 15406 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX 15407 fi 15408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 15409 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } 15410 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX 15411 15412 # 15413 # Check to make sure the PIC flag actually works. 15414 # 15415 if test -n "$lt_prog_compiler_pic_CXX"; then 15416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 15417 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } 15418 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : 15419 $as_echo_n "(cached) " >&6 15420 else 15421 lt_cv_prog_compiler_pic_works_CXX=no 15422 ac_outfile=conftest.$ac_objext 15423 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15424 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment 15425 # Insert the option either (1) after the last *FLAGS variable, or 15426 # (2) before a word containing "conftest.", or (3) at the end. 15427 # Note that $ac_compile itself does not contain backslashes and begins 15428 # with a dollar sign (not a hyphen), so the echo should work correctly. 15429 # The option is referenced via a variable to avoid confusing sed. 15430 lt_compile=`echo "$ac_compile" | $SED \ 15431 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15432 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 15433 -e 's:$: $lt_compiler_flag:'` 15434 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 15435 (eval "$lt_compile" 2>conftest.err) 15436 ac_status=$? 15437 cat conftest.err >&5 15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15439 if (exit $ac_status) && test -s "$ac_outfile"; then 15440 # The compiler can only warn and ignore the option if not recognized 15441 # So say no if there are warnings other than the usual output. 15442 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15443 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15444 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15445 lt_cv_prog_compiler_pic_works_CXX=yes 15446 fi 15447 fi 15448 $RM conftest* 15449 15450 fi 15451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 15452 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } 15453 15454 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then 15455 case $lt_prog_compiler_pic_CXX in 15456 "" | " "*) ;; 15457 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; 15458 esac 15459 else 15460 lt_prog_compiler_pic_CXX= 15461 lt_prog_compiler_can_build_shared_CXX=no 15462 fi 15463 15464 fi 15465 15466 15467 15468 15469 15470 # 15471 # Check to make sure the static flag actually works. 15472 # 15473 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" 15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 15475 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } 15476 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : 15477 $as_echo_n "(cached) " >&6 15478 else 15479 lt_cv_prog_compiler_static_works_CXX=no 15480 save_LDFLAGS=$LDFLAGS 15481 LDFLAGS="$LDFLAGS $lt_tmp_static_flag" 15482 echo "$lt_simple_link_test_code" > conftest.$ac_ext 15483 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15484 # The linker can only warn and ignore the option if not recognized 15485 # So say no if there are warnings 15486 if test -s conftest.err; then 15487 # Append any errors to the config.log. 15488 cat conftest.err 1>&5 15489 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15490 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15491 if diff conftest.exp conftest.er2 >/dev/null; then 15492 lt_cv_prog_compiler_static_works_CXX=yes 15493 fi 15494 else 15495 lt_cv_prog_compiler_static_works_CXX=yes 15496 fi 15497 fi 15498 $RM -r conftest* 15499 LDFLAGS=$save_LDFLAGS 15500 15501 fi 15502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 15503 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } 15504 15505 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then 15506 : 15507 else 15508 lt_prog_compiler_static_CXX= 15509 fi 15510 15511 15512 15513 15514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 15515 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } 15516 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : 15517 $as_echo_n "(cached) " >&6 15518 else 15519 lt_cv_prog_compiler_c_o_CXX=no 15520 $RM -r conftest 2>/dev/null 15521 mkdir conftest 15522 cd conftest 15523 mkdir out 15524 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15525 15526 lt_compiler_flag="-o out/conftest2.$ac_objext" 15527 # Insert the option either (1) after the last *FLAGS variable, or 15528 # (2) before a word containing "conftest.", or (3) at the end. 15529 # Note that $ac_compile itself does not contain backslashes and begins 15530 # with a dollar sign (not a hyphen), so the echo should work correctly. 15531 lt_compile=`echo "$ac_compile" | $SED \ 15532 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15533 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 15534 -e 's:$: $lt_compiler_flag:'` 15535 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 15536 (eval "$lt_compile" 2>out/conftest.err) 15537 ac_status=$? 15538 cat out/conftest.err >&5 15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15540 if (exit $ac_status) && test -s out/conftest2.$ac_objext 15541 then 15542 # The compiler can only warn and ignore the option if not recognized 15543 # So say no if there are warnings 15544 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 15545 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 15546 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 15547 lt_cv_prog_compiler_c_o_CXX=yes 15548 fi 15549 fi 15550 chmod u+w . 2>&5 15551 $RM conftest* 15552 # SGI C++ compiler will create directory out/ii_files/ for 15553 # template instantiation 15554 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 15555 $RM out/* && rmdir out 15556 cd .. 15557 $RM -r conftest 15558 $RM conftest* 15559 15560 fi 15561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 15562 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } 15563 15564 15565 15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 15567 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } 15568 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : 15569 $as_echo_n "(cached) " >&6 15570 else 15571 lt_cv_prog_compiler_c_o_CXX=no 15572 $RM -r conftest 2>/dev/null 15573 mkdir conftest 15574 cd conftest 15575 mkdir out 15576 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15577 15578 lt_compiler_flag="-o out/conftest2.$ac_objext" 15579 # Insert the option either (1) after the last *FLAGS variable, or 15580 # (2) before a word containing "conftest.", or (3) at the end. 15581 # Note that $ac_compile itself does not contain backslashes and begins 15582 # with a dollar sign (not a hyphen), so the echo should work correctly. 15583 lt_compile=`echo "$ac_compile" | $SED \ 15584 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15585 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 15586 -e 's:$: $lt_compiler_flag:'` 15587 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) 15588 (eval "$lt_compile" 2>out/conftest.err) 15589 ac_status=$? 15590 cat out/conftest.err >&5 15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15592 if (exit $ac_status) && test -s out/conftest2.$ac_objext 15593 then 15594 # The compiler can only warn and ignore the option if not recognized 15595 # So say no if there are warnings 15596 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 15597 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 15598 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 15599 lt_cv_prog_compiler_c_o_CXX=yes 15600 fi 15601 fi 15602 chmod u+w . 2>&5 15603 $RM conftest* 15604 # SGI C++ compiler will create directory out/ii_files/ for 15605 # template instantiation 15606 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 15607 $RM out/* && rmdir out 15608 cd .. 15609 $RM -r conftest 15610 $RM conftest* 15611 15612 fi 15613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 15614 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } 15615 15616 15617 15618 15619 hard_links=nottested 15620 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then 15621 # do not overwrite the value of need_locks provided by the user 15622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 15623 $as_echo_n "checking if we can lock with hard links... " >&6; } 15624 hard_links=yes 15625 $RM conftest* 15626 ln conftest.a conftest.b 2>/dev/null && hard_links=no 15627 touch conftest.a 15628 ln conftest.a conftest.b 2>&5 || hard_links=no 15629 ln conftest.a conftest.b 2>/dev/null && hard_links=no 15630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 15631 $as_echo "$hard_links" >&6; } 15632 if test no = "$hard_links"; then 15633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 15634 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} 15635 need_locks=warn 15636 fi 15637 else 15638 need_locks=no 15639 fi 15640 15641 15642 15643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 15644 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } 15645 15646 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 15647 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' 15648 case $host_os in 15649 aix[4-9]*) 15650 # If we're using GNU nm, then we don't want the "-C" option. 15651 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 15652 # Without the "-l" option, or with the "-B" option, AIX nm treats 15653 # weak defined symbols like other global defined symbols, whereas 15654 # GNU nm marks them as "W". 15655 # While the 'weak' keyword is ignored in the Export File, we need 15656 # it in the Import File for the 'aix-soname' feature, so we have 15657 # to replace the "-B" option with "-P" for AIX nm. 15658 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 15659 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 15660 else 15661 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 15662 fi 15663 ;; 15664 pw32*) 15665 export_symbols_cmds_CXX=$ltdll_cmds 15666 ;; 15667 cygwin* | mingw* | cegcc*) 15668 case $cc_basename in 15669 cl*) 15670 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 15671 ;; 15672 *) 15673 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' 15674 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 15675 ;; 15676 esac 15677 ;; 15678 linux* | k*bsd*-gnu | gnu*) 15679 link_all_deplibs_CXX=no 15680 ;; 15681 *) 15682 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 15683 ;; 15684 esac 15685 15686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 15687 $as_echo "$ld_shlibs_CXX" >&6; } 15688 test no = "$ld_shlibs_CXX" && can_build_shared=no 15689 15690 with_gnu_ld_CXX=$with_gnu_ld 15691 15692 15693 15694 15695 15696 15697 # 15698 # Do we need to explicitly link libc? 15699 # 15700 case "x$archive_cmds_need_lc_CXX" in 15701 x|xyes) 15702 # Assume -lc should be added 15703 archive_cmds_need_lc_CXX=yes 15704 15705 if test yes,yes = "$GCC,$enable_shared"; then 15706 case $archive_cmds_CXX in 15707 *'~'*) 15708 # FIXME: we may have to deal with multi-command sequences. 15709 ;; 15710 '$CC '*) 15711 # Test whether the compiler implicitly links with -lc since on some 15712 # systems, -lgcc has to come before -lc. If gcc already passes -lc 15713 # to ld, don't add -lc before -lgcc. 15714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 15715 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } 15716 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : 15717 $as_echo_n "(cached) " >&6 15718 else 15719 $RM conftest* 15720 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15721 15722 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 15723 (eval $ac_compile) 2>&5 15724 ac_status=$? 15725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 15726 test $ac_status = 0; } 2>conftest.err; then 15727 soname=conftest 15728 lib=conftest 15729 libobjs=conftest.$ac_objext 15730 deplibs= 15731 wl=$lt_prog_compiler_wl_CXX 15732 pic_flag=$lt_prog_compiler_pic_CXX 15733 compiler_flags=-v 15734 linker_flags=-v 15735 verstring= 15736 output_objdir=. 15737 libname=conftest 15738 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX 15739 allow_undefined_flag_CXX= 15740 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 15741 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 15742 ac_status=$? 15743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 15744 test $ac_status = 0; } 15745 then 15746 lt_cv_archive_cmds_need_lc_CXX=no 15747 else 15748 lt_cv_archive_cmds_need_lc_CXX=yes 15749 fi 15750 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag 15751 else 15752 cat conftest.err 1>&5 15753 fi 15754 $RM conftest* 15755 15756 fi 15757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 15758 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } 15759 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX 15760 ;; 15761 esac 15762 fi 15763 ;; 15764 esac 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 15828 $as_echo_n "checking dynamic linker characteristics... " >&6; } 15829 15830 library_names_spec= 15831 libname_spec='lib$name' 15832 soname_spec= 15833 shrext_cmds=.so 15834 postinstall_cmds= 15835 postuninstall_cmds= 15836 finish_cmds= 15837 finish_eval= 15838 shlibpath_var= 15839 shlibpath_overrides_runpath=unknown 15840 version_type=none 15841 dynamic_linker="$host_os ld.so" 15842 sys_lib_dlsearch_path_spec="/lib /usr/lib" 15843 need_lib_prefix=unknown 15844 hardcode_into_libs=no 15845 15846 # when you set need_version to no, make sure it does not cause -set_version 15847 # flags to be left without arguments 15848 need_version=unknown 15849 15850 15851 15852 case $host_os in 15853 aix3*) 15854 version_type=linux # correct to gnu/linux during the next big refactor 15855 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 15856 shlibpath_var=LIBPATH 15857 15858 # AIX 3 has no versioning support, so we append a major version to the name. 15859 soname_spec='$libname$release$shared_ext$major' 15860 ;; 15861 15862 aix[4-9]*) 15863 version_type=linux # correct to gnu/linux during the next big refactor 15864 need_lib_prefix=no 15865 need_version=no 15866 hardcode_into_libs=yes 15867 if test ia64 = "$host_cpu"; then 15868 # AIX 5 supports IA64 15869 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 15870 shlibpath_var=LD_LIBRARY_PATH 15871 else 15872 # With GCC up to 2.95.x, collect2 would create an import file 15873 # for dependence libraries. The import file would start with 15874 # the line '#! .'. This would cause the generated library to 15875 # depend on '.', always an invalid library. This was fixed in 15876 # development snapshots of GCC prior to 3.0. 15877 case $host_os in 15878 aix4 | aix4.[01] | aix4.[01].*) 15879 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 15880 echo ' yes ' 15881 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 15882 : 15883 else 15884 can_build_shared=no 15885 fi 15886 ;; 15887 esac 15888 # Using Import Files as archive members, it is possible to support 15889 # filename-based versioning of shared library archives on AIX. While 15890 # this would work for both with and without runtime linking, it will 15891 # prevent static linking of such archives. So we do filename-based 15892 # shared library versioning with .so extension only, which is used 15893 # when both runtime linking and shared linking is enabled. 15894 # Unfortunately, runtime linking may impact performance, so we do 15895 # not want this to be the default eventually. Also, we use the 15896 # versioned .so libs for executables only if there is the -brtl 15897 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 15898 # To allow for filename-based versioning support, we need to create 15899 # libNAME.so.V as an archive file, containing: 15900 # *) an Import File, referring to the versioned filename of the 15901 # archive as well as the shared archive member, telling the 15902 # bitwidth (32 or 64) of that shared object, and providing the 15903 # list of exported symbols of that shared object, eventually 15904 # decorated with the 'weak' keyword 15905 # *) the shared object with the F_LOADONLY flag set, to really avoid 15906 # it being seen by the linker. 15907 # At run time we better use the real file rather than another symlink, 15908 # but for link time we create the symlink libNAME.so -> libNAME.so.V 15909 15910 case $with_aix_soname,$aix_use_runtimelinking in 15911 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 15912 # soname into executable. Probably we can add versioning support to 15913 # collect2, so additional links can be useful in future. 15914 aix,yes) # traditional libtool 15915 dynamic_linker='AIX unversionable lib.so' 15916 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 15917 # instead of lib<name>.a to let people know that these are not 15918 # typical AIX shared libraries. 15919 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 15920 ;; 15921 aix,no) # traditional AIX only 15922 dynamic_linker='AIX lib.a(lib.so.V)' 15923 # We preserve .a as extension for shared libraries through AIX4.2 15924 # and later when we are not doing run time linking. 15925 library_names_spec='$libname$release.a $libname.a' 15926 soname_spec='$libname$release$shared_ext$major' 15927 ;; 15928 svr4,*) # full svr4 only 15929 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" 15930 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 15931 # We do not specify a path in Import Files, so LIBPATH fires. 15932 shlibpath_overrides_runpath=yes 15933 ;; 15934 *,yes) # both, prefer svr4 15935 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" 15936 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 15937 # unpreferred sharedlib libNAME.a needs extra handling 15938 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 15939 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 15940 # We do not specify a path in Import Files, so LIBPATH fires. 15941 shlibpath_overrides_runpath=yes 15942 ;; 15943 *,no) # both, prefer aix 15944 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" 15945 library_names_spec='$libname$release.a $libname.a' 15946 soname_spec='$libname$release$shared_ext$major' 15947 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 15948 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 15949 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 15950 ;; 15951 esac 15952 shlibpath_var=LIBPATH 15953 fi 15954 ;; 15955 15956 amigaos*) 15957 case $host_cpu in 15958 powerpc) 15959 # Since July 2007 AmigaOS4 officially supports .so libraries. 15960 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 15961 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 15962 ;; 15963 m68k) 15964 library_names_spec='$libname.ixlibrary $libname.a' 15965 # Create ${libname}_ixlibrary.a entries in /sys/libs. 15966 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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' 15967 ;; 15968 esac 15969 ;; 15970 15971 beos*) 15972 library_names_spec='$libname$shared_ext' 15973 dynamic_linker="$host_os ld.so" 15974 shlibpath_var=LIBRARY_PATH 15975 ;; 15976 15977 bsdi[45]*) 15978 version_type=linux # correct to gnu/linux during the next big refactor 15979 need_version=no 15980 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 15981 soname_spec='$libname$release$shared_ext$major' 15982 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 15983 shlibpath_var=LD_LIBRARY_PATH 15984 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 15985 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 15986 # the default ld.so.conf also contains /usr/contrib/lib and 15987 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 15988 # libtool to hard-code these into programs 15989 ;; 15990 15991 cygwin* | mingw* | pw32* | cegcc*) 15992 version_type=windows 15993 shrext_cmds=.dll 15994 need_version=no 15995 need_lib_prefix=no 15996 15997 case $GCC,$cc_basename in 15998 yes,*) 15999 # gcc 16000 library_names_spec='$libname.dll.a' 16001 # DLL is installed to $(libdir)/../bin by postinstall_cmds 16002 postinstall_cmds='base_file=`basename \$file`~ 16003 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 16004 dldir=$destdir/`dirname \$dlpath`~ 16005 test -d \$dldir || mkdir -p \$dldir~ 16006 $install_prog $dir/$dlname \$dldir/$dlname~ 16007 chmod a+x \$dldir/$dlname~ 16008 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 16009 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 16010 fi' 16011 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 16012 dlpath=$dir/\$dldll~ 16013 $RM \$dlpath' 16014 shlibpath_overrides_runpath=yes 16015 16016 case $host_os in 16017 cygwin*) 16018 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 16019 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 16020 16021 ;; 16022 mingw* | cegcc*) 16023 # MinGW DLLs use traditional 'lib' prefix 16024 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 16025 ;; 16026 pw32*) 16027 # pw32 DLLs use 'pw' prefix rather than 'lib' 16028 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 16029 ;; 16030 esac 16031 dynamic_linker='Win32 ld.exe' 16032 ;; 16033 16034 *,cl*) 16035 # Native MSVC 16036 libname_spec='$name' 16037 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' 16038 library_names_spec='$libname.dll.lib' 16039 16040 case $build_os in 16041 mingw*) 16042 sys_lib_search_path_spec= 16043 lt_save_ifs=$IFS 16044 IFS=';' 16045 for lt_path in $LIB 16046 do 16047 IFS=$lt_save_ifs 16048 # Let DOS variable expansion print the short 8.3 style file name. 16049 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 16050 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 16051 done 16052 IFS=$lt_save_ifs 16053 # Convert to MSYS style. 16054 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` 16055 ;; 16056 cygwin*) 16057 # Convert to unix form, then to dos form, then back to unix form 16058 # but this time dos style (no spaces!) so that the unix form looks 16059 # like /cygdrive/c/PROGRA~1:/cygdr... 16060 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 16061 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 16062 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 16063 ;; 16064 *) 16065 sys_lib_search_path_spec=$LIB 16066 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then 16067 # It is most probably a Windows format PATH. 16068 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 16069 else 16070 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 16071 fi 16072 # FIXME: find the short name or the path components, as spaces are 16073 # common. (e.g. "Program Files" -> "PROGRA~1") 16074 ;; 16075 esac 16076 16077 # DLL is installed to $(libdir)/../bin by postinstall_cmds 16078 postinstall_cmds='base_file=`basename \$file`~ 16079 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 16080 dldir=$destdir/`dirname \$dlpath`~ 16081 test -d \$dldir || mkdir -p \$dldir~ 16082 $install_prog $dir/$dlname \$dldir/$dlname' 16083 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 16084 dlpath=$dir/\$dldll~ 16085 $RM \$dlpath' 16086 shlibpath_overrides_runpath=yes 16087 dynamic_linker='Win32 link.exe' 16088 ;; 16089 16090 *) 16091 # Assume MSVC wrapper 16092 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' 16093 dynamic_linker='Win32 ld.exe' 16094 ;; 16095 esac 16096 # FIXME: first we should search . and the directory the executable is in 16097 shlibpath_var=PATH 16098 ;; 16099 16100 darwin* | rhapsody*) 16101 dynamic_linker="$host_os dyld" 16102 version_type=darwin 16103 need_lib_prefix=no 16104 need_version=no 16105 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 16106 soname_spec='$libname$release$major$shared_ext' 16107 shlibpath_overrides_runpath=yes 16108 shlibpath_var=DYLD_LIBRARY_PATH 16109 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 16110 16111 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 16112 ;; 16113 16114 dgux*) 16115 version_type=linux # correct to gnu/linux during the next big refactor 16116 need_lib_prefix=no 16117 need_version=no 16118 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16119 soname_spec='$libname$release$shared_ext$major' 16120 shlibpath_var=LD_LIBRARY_PATH 16121 ;; 16122 16123 freebsd* | dragonfly*) 16124 # DragonFly does not have aout. When/if they implement a new 16125 # versioning mechanism, adjust this. 16126 if test -x /usr/bin/objformat; then 16127 objformat=`/usr/bin/objformat` 16128 else 16129 case $host_os in 16130 freebsd[23].*) objformat=aout ;; 16131 *) objformat=elf ;; 16132 esac 16133 fi 16134 version_type=freebsd-$objformat 16135 case $version_type in 16136 freebsd-elf*) 16137 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16138 soname_spec='$libname$release$shared_ext$major' 16139 need_version=no 16140 need_lib_prefix=no 16141 ;; 16142 freebsd-*) 16143 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 16144 need_version=yes 16145 ;; 16146 esac 16147 shlibpath_var=LD_LIBRARY_PATH 16148 case $host_os in 16149 freebsd2.*) 16150 shlibpath_overrides_runpath=yes 16151 ;; 16152 freebsd3.[01]* | freebsdelf3.[01]*) 16153 shlibpath_overrides_runpath=yes 16154 hardcode_into_libs=yes 16155 ;; 16156 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ 16157 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) 16158 shlibpath_overrides_runpath=no 16159 hardcode_into_libs=yes 16160 ;; 16161 *) # from 4.6 on, and DragonFly 16162 shlibpath_overrides_runpath=yes 16163 hardcode_into_libs=yes 16164 ;; 16165 esac 16166 ;; 16167 16168 haiku*) 16169 version_type=linux # correct to gnu/linux during the next big refactor 16170 need_lib_prefix=no 16171 need_version=no 16172 dynamic_linker="$host_os runtime_loader" 16173 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16174 soname_spec='$libname$release$shared_ext$major' 16175 shlibpath_var=LIBRARY_PATH 16176 shlibpath_overrides_runpath=no 16177 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 16178 hardcode_into_libs=yes 16179 ;; 16180 16181 hpux9* | hpux10* | hpux11*) 16182 # Give a soname corresponding to the major version so that dld.sl refuses to 16183 # link against other versions. 16184 version_type=sunos 16185 need_lib_prefix=no 16186 need_version=no 16187 case $host_cpu in 16188 ia64*) 16189 shrext_cmds='.so' 16190 hardcode_into_libs=yes 16191 dynamic_linker="$host_os dld.so" 16192 shlibpath_var=LD_LIBRARY_PATH 16193 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16194 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16195 soname_spec='$libname$release$shared_ext$major' 16196 if test 32 = "$HPUX_IA64_MODE"; then 16197 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 16198 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 16199 else 16200 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 16201 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 16202 fi 16203 ;; 16204 hppa*64*) 16205 shrext_cmds='.sl' 16206 hardcode_into_libs=yes 16207 dynamic_linker="$host_os dld.sl" 16208 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16209 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16210 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16211 soname_spec='$libname$release$shared_ext$major' 16212 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16213 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16214 ;; 16215 *) 16216 shrext_cmds='.sl' 16217 dynamic_linker="$host_os dld.sl" 16218 shlibpath_var=SHLIB_PATH 16219 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 16220 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16221 soname_spec='$libname$release$shared_ext$major' 16222 ;; 16223 esac 16224 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 16225 postinstall_cmds='chmod 555 $lib' 16226 # or fails outright, so override atomically: 16227 install_override_mode=555 16228 ;; 16229 16230 interix[3-9]*) 16231 version_type=linux # correct to gnu/linux during the next big refactor 16232 need_lib_prefix=no 16233 need_version=no 16234 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16235 soname_spec='$libname$release$shared_ext$major' 16236 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 16237 shlibpath_var=LD_LIBRARY_PATH 16238 shlibpath_overrides_runpath=no 16239 hardcode_into_libs=yes 16240 ;; 16241 16242 irix5* | irix6* | nonstopux*) 16243 case $host_os in 16244 nonstopux*) version_type=nonstopux ;; 16245 *) 16246 if test yes = "$lt_cv_prog_gnu_ld"; then 16247 version_type=linux # correct to gnu/linux during the next big refactor 16248 else 16249 version_type=irix 16250 fi ;; 16251 esac 16252 need_lib_prefix=no 16253 need_version=no 16254 soname_spec='$libname$release$shared_ext$major' 16255 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 16256 case $host_os in 16257 irix5* | nonstopux*) 16258 libsuff= shlibsuff= 16259 ;; 16260 *) 16261 case $LD in # libtool.m4 will add one of these switches to LD 16262 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 16263 libsuff= shlibsuff= libmagic=32-bit;; 16264 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 16265 libsuff=32 shlibsuff=N32 libmagic=N32;; 16266 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 16267 libsuff=64 shlibsuff=64 libmagic=64-bit;; 16268 *) libsuff= shlibsuff= libmagic=never-match;; 16269 esac 16270 ;; 16271 esac 16272 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 16273 shlibpath_overrides_runpath=no 16274 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 16275 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 16276 hardcode_into_libs=yes 16277 ;; 16278 16279 # No shared lib support for Linux oldld, aout, or coff. 16280 linux*oldld* | linux*aout* | linux*coff*) 16281 dynamic_linker=no 16282 ;; 16283 16284 linux*android*) 16285 version_type=none # Android doesn't support versioned libraries. 16286 need_lib_prefix=no 16287 need_version=no 16288 library_names_spec='$libname$release$shared_ext' 16289 soname_spec='$libname$release$shared_ext' 16290 finish_cmds= 16291 shlibpath_var=LD_LIBRARY_PATH 16292 shlibpath_overrides_runpath=yes 16293 16294 # This implies no fast_install, which is unacceptable. 16295 # Some rework will be needed to allow for fast_install 16296 # before this can be enabled. 16297 hardcode_into_libs=yes 16298 16299 dynamic_linker='Android linker' 16300 # Don't embed -rpath directories since the linker doesn't support them. 16301 hardcode_libdir_flag_spec_CXX='-L$libdir' 16302 ;; 16303 16304 # This must be glibc/ELF. 16305 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 16306 version_type=linux # correct to gnu/linux during the next big refactor 16307 need_lib_prefix=no 16308 need_version=no 16309 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16310 soname_spec='$libname$release$shared_ext$major' 16311 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 16312 shlibpath_var=LD_LIBRARY_PATH 16313 shlibpath_overrides_runpath=no 16314 16315 # Some binutils ld are patched to set DT_RUNPATH 16316 if ${lt_cv_shlibpath_overrides_runpath+:} false; then : 16317 $as_echo_n "(cached) " >&6 16318 else 16319 lt_cv_shlibpath_overrides_runpath=no 16320 save_LDFLAGS=$LDFLAGS 16321 save_libdir=$libdir 16322 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ 16323 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" 16324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16325 /* end confdefs.h. */ 16326 16327 int 16328 main () 16329 { 16330 16331 ; 16332 return 0; 16333 } 16334 _ACEOF 16335 if ac_fn_cxx_try_link "$LINENO"; then : 16336 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : 16337 lt_cv_shlibpath_overrides_runpath=yes 16338 fi 16339 fi 16340 rm -f core conftest.err conftest.$ac_objext \ 16341 conftest$ac_exeext conftest.$ac_ext 16342 LDFLAGS=$save_LDFLAGS 16343 libdir=$save_libdir 16344 16345 fi 16346 16347 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 16348 16349 # This implies no fast_install, which is unacceptable. 16350 # Some rework will be needed to allow for fast_install 16351 # before this can be enabled. 16352 hardcode_into_libs=yes 16353 16354 # Ideally, we could use ldconfig to report *all* directores which are 16355 # searched for libraries, however this is still not possible. Aside from not 16356 # being certain /sbin/ldconfig is available, command 16357 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 16358 # even though it is searched at run-time. Try to do the best guess by 16359 # appending ld.so.conf contents (and includes) to the search path. 16360 if test -f /etc/ld.so.conf; then 16361 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;s/"//g;/^$/d' | tr '\n' ' '` 16362 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 16363 fi 16364 16365 # We used to test for /lib/ld.so.1 and disable shared libraries on 16366 # powerpc, because MkLinux only supported shared libraries with the 16367 # GNU dynamic linker. Since this was broken with cross compilers, 16368 # most powerpc-linux boxes support dynamic linking these days and 16369 # people can always --disable-shared, the test was removed, and we 16370 # assume the GNU/Linux dynamic linker is in use. 16371 dynamic_linker='GNU/Linux ld.so' 16372 ;; 16373 16374 netbsdelf*-gnu) 16375 version_type=linux 16376 need_lib_prefix=no 16377 need_version=no 16378 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 16379 soname_spec='${libname}${release}${shared_ext}$major' 16380 shlibpath_var=LD_LIBRARY_PATH 16381 shlibpath_overrides_runpath=no 16382 hardcode_into_libs=yes 16383 dynamic_linker='NetBSD ld.elf_so' 16384 ;; 16385 16386 netbsd*) 16387 version_type=sunos 16388 need_lib_prefix=no 16389 need_version=no 16390 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 16391 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 16392 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 16393 dynamic_linker='NetBSD (a.out) ld.so' 16394 else 16395 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16396 soname_spec='$libname$release$shared_ext$major' 16397 dynamic_linker='NetBSD ld.elf_so' 16398 fi 16399 shlibpath_var=LD_LIBRARY_PATH 16400 shlibpath_overrides_runpath=yes 16401 hardcode_into_libs=yes 16402 ;; 16403 16404 newsos6) 16405 version_type=linux # correct to gnu/linux during the next big refactor 16406 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16407 shlibpath_var=LD_LIBRARY_PATH 16408 shlibpath_overrides_runpath=yes 16409 ;; 16410 16411 *nto* | *qnx*) 16412 version_type=qnx 16413 need_lib_prefix=no 16414 need_version=no 16415 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16416 soname_spec='$libname$release$shared_ext$major' 16417 shlibpath_var=LD_LIBRARY_PATH 16418 shlibpath_overrides_runpath=no 16419 hardcode_into_libs=yes 16420 dynamic_linker='ldqnx.so' 16421 ;; 16422 16423 openbsd* | bitrig*) 16424 version_type=sunos 16425 sys_lib_dlsearch_path_spec=/usr/lib 16426 need_lib_prefix=no 16427 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 16428 need_version=no 16429 else 16430 need_version=yes 16431 fi 16432 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 16433 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 16434 shlibpath_var=LD_LIBRARY_PATH 16435 shlibpath_overrides_runpath=yes 16436 ;; 16437 16438 os2*) 16439 libname_spec='$name' 16440 version_type=windows 16441 shrext_cmds=.dll 16442 need_version=no 16443 need_lib_prefix=no 16444 # OS/2 can only load a DLL with a base name of 8 characters or less. 16445 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 16446 v=$($ECHO $release$versuffix | tr -d .-); 16447 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 16448 $ECHO $n$v`$shared_ext' 16449 library_names_spec='${libname}_dll.$libext' 16450 dynamic_linker='OS/2 ld.exe' 16451 shlibpath_var=BEGINLIBPATH 16452 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 16453 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16454 postinstall_cmds='base_file=`basename \$file`~ 16455 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 16456 dldir=$destdir/`dirname \$dlpath`~ 16457 test -d \$dldir || mkdir -p \$dldir~ 16458 $install_prog $dir/$dlname \$dldir/$dlname~ 16459 chmod a+x \$dldir/$dlname~ 16460 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 16461 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 16462 fi' 16463 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 16464 dlpath=$dir/\$dldll~ 16465 $RM \$dlpath' 16466 ;; 16467 16468 osf3* | osf4* | osf5*) 16469 version_type=osf 16470 need_lib_prefix=no 16471 need_version=no 16472 soname_spec='$libname$release$shared_ext$major' 16473 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16474 shlibpath_var=LD_LIBRARY_PATH 16475 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 16476 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16477 ;; 16478 16479 rdos*) 16480 dynamic_linker=no 16481 ;; 16482 16483 solaris*) 16484 version_type=linux # correct to gnu/linux during the next big refactor 16485 need_lib_prefix=no 16486 need_version=no 16487 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16488 soname_spec='$libname$release$shared_ext$major' 16489 shlibpath_var=LD_LIBRARY_PATH 16490 shlibpath_overrides_runpath=yes 16491 hardcode_into_libs=yes 16492 # ldd complains unless libraries are executable 16493 postinstall_cmds='chmod +x $lib' 16494 ;; 16495 16496 sunos4*) 16497 version_type=sunos 16498 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 16499 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 16500 shlibpath_var=LD_LIBRARY_PATH 16501 shlibpath_overrides_runpath=yes 16502 if test yes = "$with_gnu_ld"; then 16503 need_lib_prefix=no 16504 fi 16505 need_version=yes 16506 ;; 16507 16508 sysv4 | sysv4.3*) 16509 version_type=linux # correct to gnu/linux during the next big refactor 16510 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16511 soname_spec='$libname$release$shared_ext$major' 16512 shlibpath_var=LD_LIBRARY_PATH 16513 case $host_vendor in 16514 sni) 16515 shlibpath_overrides_runpath=no 16516 need_lib_prefix=no 16517 runpath_var=LD_RUN_PATH 16518 ;; 16519 siemens) 16520 need_lib_prefix=no 16521 ;; 16522 motorola) 16523 need_lib_prefix=no 16524 need_version=no 16525 shlibpath_overrides_runpath=no 16526 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 16527 ;; 16528 esac 16529 ;; 16530 16531 sysv4*MP*) 16532 if test -d /usr/nec; then 16533 version_type=linux # correct to gnu/linux during the next big refactor 16534 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 16535 soname_spec='$libname$shared_ext.$major' 16536 shlibpath_var=LD_LIBRARY_PATH 16537 fi 16538 ;; 16539 16540 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 16541 version_type=sco 16542 need_lib_prefix=no 16543 need_version=no 16544 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 16545 soname_spec='$libname$release$shared_ext$major' 16546 shlibpath_var=LD_LIBRARY_PATH 16547 shlibpath_overrides_runpath=yes 16548 hardcode_into_libs=yes 16549 if test yes = "$with_gnu_ld"; then 16550 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 16551 else 16552 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 16553 case $host_os in 16554 sco3.2v5*) 16555 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 16556 ;; 16557 esac 16558 fi 16559 sys_lib_dlsearch_path_spec='/usr/lib' 16560 ;; 16561 16562 tpf*) 16563 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 16564 version_type=linux # correct to gnu/linux during the next big refactor 16565 need_lib_prefix=no 16566 need_version=no 16567 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16568 shlibpath_var=LD_LIBRARY_PATH 16569 shlibpath_overrides_runpath=no 16570 hardcode_into_libs=yes 16571 ;; 16572 16573 uts4*) 16574 version_type=linux # correct to gnu/linux during the next big refactor 16575 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 16576 soname_spec='$libname$release$shared_ext$major' 16577 shlibpath_var=LD_LIBRARY_PATH 16578 ;; 16579 16580 *) 16581 dynamic_linker=no 16582 ;; 16583 esac 16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 16585 $as_echo "$dynamic_linker" >&6; } 16586 test no = "$dynamic_linker" && can_build_shared=no 16587 16588 variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 16589 if test yes = "$GCC"; then 16590 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 16591 fi 16592 16593 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 16594 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 16595 fi 16596 16597 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 16598 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 16599 fi 16600 16601 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 16602 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 16603 16604 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 16605 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 16606 16607 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 16608 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 16650 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } 16651 hardcode_action_CXX= 16652 if test -n "$hardcode_libdir_flag_spec_CXX" || 16653 test -n "$runpath_var_CXX" || 16654 test yes = "$hardcode_automatic_CXX"; then 16655 16656 # We can hardcode non-existent directories. 16657 if test no != "$hardcode_direct_CXX" && 16658 # If the only mechanism to avoid hardcoding is shlibpath_var, we 16659 # have to relink, otherwise we might link with an installed library 16660 # when we should be linking with a yet-to-be-installed one 16661 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && 16662 test no != "$hardcode_minus_L_CXX"; then 16663 # Linking always hardcodes the temporary library directory. 16664 hardcode_action_CXX=relink 16665 else 16666 # We can link without hardcoding, and we can hardcode nonexisting dirs. 16667 hardcode_action_CXX=immediate 16668 fi 16669 else 16670 # We cannot hardcode anything, or else we can only hardcode existing 16671 # directories. 16672 hardcode_action_CXX=unsupported 16673 fi 16674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 16675 $as_echo "$hardcode_action_CXX" >&6; } 16676 16677 if test relink = "$hardcode_action_CXX" || 16678 test yes = "$inherit_rpath_CXX"; then 16679 # Fast installation is not supported 16680 enable_fast_install=no 16681 elif test yes = "$shlibpath_overrides_runpath" || 16682 test no = "$enable_shared"; then 16683 # Fast installation is not necessary 16684 enable_fast_install=needless 16685 fi 16686 16687 16688 16689 16690 16691 16692 16693 fi # test -n "$compiler" 16694 16695 CC=$lt_save_CC 16696 CFLAGS=$lt_save_CFLAGS 16697 LDCXX=$LD 16698 LD=$lt_save_LD 16699 GCC=$lt_save_GCC 16700 with_gnu_ld=$lt_save_with_gnu_ld 16701 lt_cv_path_LDCXX=$lt_cv_path_LD 16702 lt_cv_path_LD=$lt_save_path_LD 16703 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 16704 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 16705 fi # test yes != "$_lt_caught_CXX_error" 16706 16707 ac_ext=c 16708 ac_cpp='$CPP $CPPFLAGS' 16709 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 16710 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 16711 ac_compiler_gnu=$ac_cv_c_compiler_gnu 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 ac_config_commands="$ac_config_commands libtool" 16728 16729 16730 16731 16732 # Only expand once: 16733 16734 16735 16736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 16737 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 16738 set x ${MAKE-make} 16739 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 16740 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : 16741 $as_echo_n "(cached) " >&6 16742 else 16743 cat >conftest.make <<\_ACEOF 16744 SHELL = /bin/sh 16745 all: 16746 @echo '@@@%%%=$(MAKE)=@@@%%%' 16747 _ACEOF 16748 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 16749 case `${MAKE-make} -f conftest.make 2>/dev/null` in 16750 *@@@%%%=?*=@@@%%%*) 16751 eval ac_cv_prog_make_${ac_make}_set=yes;; 16752 *) 16753 eval ac_cv_prog_make_${ac_make}_set=no;; 16754 esac 16755 rm -f conftest.make 16756 fi 16757 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then 16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16759 $as_echo "yes" >&6; } 16760 SET_MAKE= 16761 else 16762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16763 $as_echo "no" >&6; } 16764 SET_MAKE="MAKE=${MAKE-make}" 16765 fi 16766 16767 16768 # Checks for libraries. 16769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fibre::yield in -lfibre" >&5 16770 $as_echo_n "checking for Fibre::yield in -lfibre... " >&6; } 16771 if ${ac_cv_lib_fibre_Fibre__yield+:} false; then : 16772 $as_echo_n "(cached) " >&6 16773 else 16774 ac_check_lib_save_LIBS=$LIBS 16775 LIBS="-lfibre $LIBS" 16776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16777 /* end confdefs.h. */ 16778 16779 /* Override any GCC internal prototype to avoid an error. 16780 Use char because int might match the return type of a GCC 16781 builtin and then its argument prototype would still apply. */ 16782 #ifdef __cplusplus 16783 extern "C" 16784 #endif 16785 char Fibre::yield (); 16786 int 16787 main () 16788 { 16789 return Fibre::yield (); 16790 ; 16791 return 0; 16792 } 16793 _ACEOF 16794 if ac_fn_c_try_link "$LINENO"; then : 16795 ac_cv_lib_fibre_Fibre__yield=yes 16796 else 16797 ac_cv_lib_fibre_Fibre__yield=no 16798 fi 16799 rm -f core conftest.err conftest.$ac_objext \ 16800 conftest$ac_exeext conftest.$ac_ext 16801 LIBS=$ac_check_lib_save_LIBS 16802 fi 16803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fibre_Fibre__yield" >&5 16804 $as_echo "$ac_cv_lib_fibre_Fibre__yield" >&6; } 16805 if test "x$ac_cv_lib_fibre_Fibre__yield" = xyes; then : 16806 HAVE_LIBFIBRE=1 16807 else 16808 HAVE_LIBFIBRE=0 16809 fi 16810 16811 if test "$HAVE_LIBFIBRE" -eq 1; then 16812 WITH_LIBFIBRE_TRUE= 16813 WITH_LIBFIBRE_FALSE='#' 16814 else 16815 WITH_LIBFIBRE_TRUE='#' 16816 WITH_LIBFIBRE_FALSE= 16817 fi 16818 16819 16820 # Checks for header files. 5893 16821 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" 5894 16822 if test "x$ac_cv_type_size_t" = xyes; then : … … 6381 17309 fi 6382 17310 done 17311 17312 17313 #============================================================================== 17314 # backend compiler implementation 17315 17316 cat >>confdefs.h <<_ACEOF 17317 #define CFA_BACKEND_CC "${CC}" 17318 _ACEOF 17319 6383 17320 6384 17321 … … 7125 18062 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" 7126 18063 18064 18065 # The HP-UX ksh and POSIX shell print the target directory to stdout 18066 # if CDPATH is set. 18067 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 18068 18069 sed_quote_subst='$sed_quote_subst' 18070 double_quote_subst='$double_quote_subst' 18071 delay_variable_subst='$delay_variable_subst' 18072 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' 18073 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' 18074 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' 18075 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' 18076 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' 18077 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' 18078 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' 18079 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' 18080 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' 18081 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' 18082 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' 18083 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' 18084 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' 18085 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' 18086 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' 18087 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' 18088 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' 18089 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' 18090 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' 18091 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' 18092 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' 18093 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' 18094 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' 18095 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' 18096 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' 18097 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' 18098 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' 18099 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' 18100 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' 18101 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' 18102 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' 18103 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' 18104 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' 18105 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' 18106 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' 18107 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' 18108 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' 18109 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' 18110 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' 18111 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' 18112 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' 18113 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' 18114 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' 18115 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' 18116 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' 18117 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' 18118 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' 18119 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' 18120 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' 18121 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' 18122 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' 18123 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' 18124 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' 18125 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' 18126 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' 18127 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' 18128 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' 18129 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' 18130 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' 18131 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' 18132 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' 18133 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' 18134 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' 18135 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' 18136 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' 18137 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' 18138 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' 18139 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' 18140 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' 18141 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' 18142 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' 18143 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' 18144 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' 18145 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' 18146 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' 18147 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' 18148 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' 18149 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' 18150 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' 18151 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' 18152 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' 18153 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' 18154 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' 18155 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' 18156 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' 18157 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' 18158 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' 18159 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' 18160 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' 18161 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' 18162 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' 18163 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' 18164 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' 18165 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' 18166 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' 18167 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' 18168 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' 18169 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' 18170 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' 18171 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' 18172 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' 18173 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' 18174 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' 18175 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' 18176 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' 18177 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' 18178 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' 18179 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' 18180 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' 18181 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' 18182 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' 18183 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' 18184 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' 18185 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' 18186 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' 18187 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' 18188 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' 18189 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' 18190 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' 18191 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' 18192 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' 18193 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' 18194 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' 18195 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' 18196 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' 18197 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' 18198 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' 18199 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' 18200 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' 18201 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' 18202 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' 18203 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' 18204 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' 18205 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' 18206 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' 18207 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' 18208 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' 18209 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' 18210 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' 18211 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' 18212 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' 18213 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' 18214 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' 18215 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18216 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18217 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' 18218 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' 18219 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' 18220 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' 18221 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' 18222 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' 18223 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' 18224 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' 18225 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' 18226 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' 18227 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' 18228 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' 18229 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18230 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18231 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18232 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18233 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18234 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18235 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' 18236 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' 18237 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' 18238 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' 18239 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' 18240 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' 18241 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' 18242 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' 18243 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' 18244 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' 18245 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' 18246 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' 18247 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' 18248 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18249 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' 18250 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' 18251 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18252 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' 18253 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' 18254 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' 18255 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' 18256 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' 18257 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' 18258 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' 18259 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' 18260 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' 18261 18262 LTCC='$LTCC' 18263 LTCFLAGS='$LTCFLAGS' 18264 compiler='$compiler_DEFAULT' 18265 18266 # A function that is used when there is no print builtin or printf. 18267 func_fallback_echo () 18268 { 18269 eval 'cat <<_LTECHO_EOF 18270 \$1 18271 _LTECHO_EOF' 18272 } 18273 18274 # Quote evaled strings. 18275 for var in SHELL \ 18276 ECHO \ 18277 PATH_SEPARATOR \ 18278 SED \ 18279 GREP \ 18280 EGREP \ 18281 FGREP \ 18282 LD \ 18283 NM \ 18284 LN_S \ 18285 lt_SP2NL \ 18286 lt_NL2SP \ 18287 reload_flag \ 18288 OBJDUMP \ 18289 deplibs_check_method \ 18290 file_magic_cmd \ 18291 file_magic_glob \ 18292 want_nocaseglob \ 18293 DLLTOOL \ 18294 sharedlib_from_linklib_cmd \ 18295 AR \ 18296 AR_FLAGS \ 18297 archiver_list_spec \ 18298 STRIP \ 18299 RANLIB \ 18300 CC \ 18301 CFLAGS \ 18302 compiler \ 18303 lt_cv_sys_global_symbol_pipe \ 18304 lt_cv_sys_global_symbol_to_cdecl \ 18305 lt_cv_sys_global_symbol_to_import \ 18306 lt_cv_sys_global_symbol_to_c_name_address \ 18307 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ 18308 lt_cv_nm_interface \ 18309 nm_file_list_spec \ 18310 lt_cv_truncate_bin \ 18311 lt_prog_compiler_no_builtin_flag \ 18312 lt_prog_compiler_pic \ 18313 lt_prog_compiler_wl \ 18314 lt_prog_compiler_static \ 18315 lt_cv_prog_compiler_c_o \ 18316 need_locks \ 18317 MANIFEST_TOOL \ 18318 DSYMUTIL \ 18319 NMEDIT \ 18320 LIPO \ 18321 OTOOL \ 18322 OTOOL64 \ 18323 shrext_cmds \ 18324 export_dynamic_flag_spec \ 18325 whole_archive_flag_spec \ 18326 compiler_needs_object \ 18327 with_gnu_ld \ 18328 allow_undefined_flag \ 18329 no_undefined_flag \ 18330 hardcode_libdir_flag_spec \ 18331 hardcode_libdir_separator \ 18332 exclude_expsyms \ 18333 include_expsyms \ 18334 file_list_spec \ 18335 variables_saved_for_relink \ 18336 libname_spec \ 18337 library_names_spec \ 18338 soname_spec \ 18339 install_override_mode \ 18340 finish_eval \ 18341 old_striplib \ 18342 striplib \ 18343 compiler_lib_search_dirs \ 18344 predep_objects \ 18345 postdep_objects \ 18346 predeps \ 18347 postdeps \ 18348 compiler_lib_search_path \ 18349 LD_CXX \ 18350 reload_flag_CXX \ 18351 compiler_CXX \ 18352 lt_prog_compiler_no_builtin_flag_CXX \ 18353 lt_prog_compiler_pic_CXX \ 18354 lt_prog_compiler_wl_CXX \ 18355 lt_prog_compiler_static_CXX \ 18356 lt_cv_prog_compiler_c_o_CXX \ 18357 export_dynamic_flag_spec_CXX \ 18358 whole_archive_flag_spec_CXX \ 18359 compiler_needs_object_CXX \ 18360 with_gnu_ld_CXX \ 18361 allow_undefined_flag_CXX \ 18362 no_undefined_flag_CXX \ 18363 hardcode_libdir_flag_spec_CXX \ 18364 hardcode_libdir_separator_CXX \ 18365 exclude_expsyms_CXX \ 18366 include_expsyms_CXX \ 18367 file_list_spec_CXX \ 18368 compiler_lib_search_dirs_CXX \ 18369 predep_objects_CXX \ 18370 postdep_objects_CXX \ 18371 predeps_CXX \ 18372 postdeps_CXX \ 18373 compiler_lib_search_path_CXX; do 18374 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 18375 *[\\\\\\\`\\"\\\$]*) 18376 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 18377 ;; 18378 *) 18379 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 18380 ;; 18381 esac 18382 done 18383 18384 # Double-quote double-evaled strings. 18385 for var in reload_cmds \ 18386 old_postinstall_cmds \ 18387 old_postuninstall_cmds \ 18388 old_archive_cmds \ 18389 extract_expsyms_cmds \ 18390 old_archive_from_new_cmds \ 18391 old_archive_from_expsyms_cmds \ 18392 archive_cmds \ 18393 archive_expsym_cmds \ 18394 module_cmds \ 18395 module_expsym_cmds \ 18396 export_symbols_cmds \ 18397 prelink_cmds \ 18398 postlink_cmds \ 18399 postinstall_cmds \ 18400 postuninstall_cmds \ 18401 finish_cmds \ 18402 sys_lib_search_path_spec \ 18403 configure_time_dlsearch_path \ 18404 configure_time_lt_sys_library_path \ 18405 reload_cmds_CXX \ 18406 old_archive_cmds_CXX \ 18407 old_archive_from_new_cmds_CXX \ 18408 old_archive_from_expsyms_cmds_CXX \ 18409 archive_cmds_CXX \ 18410 archive_expsym_cmds_CXX \ 18411 module_cmds_CXX \ 18412 module_expsym_cmds_CXX \ 18413 export_symbols_cmds_CXX \ 18414 prelink_cmds_CXX \ 18415 postlink_cmds_CXX; do 18416 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 18417 *[\\\\\\\`\\"\\\$]*) 18418 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 18419 ;; 18420 *) 18421 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 18422 ;; 18423 esac 18424 done 18425 18426 ac_aux_dir='$ac_aux_dir' 18427 18428 # See if we are running on zsh, and set the options that allow our 18429 # commands through without removal of \ escapes INIT. 18430 if test -n "\${ZSH_VERSION+set}"; then 18431 setopt NO_GLOB_SUBST 18432 fi 18433 18434 18435 PACKAGE='$PACKAGE' 18436 VERSION='$VERSION' 18437 RM='$RM' 18438 ofile='$ofile' 18439 18440 18441 18442 18443 18444 7127 18445 _ACEOF 7128 18446 … … 7135 18453 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:src/config.h.in" ;; 7136 18454 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 18455 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; 7137 18456 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 7138 18457 "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;; … … 7865 19184 } 7866 19185 ;; 19186 "libtool":C) 19187 19188 # See if we are running on zsh, and set the options that allow our 19189 # commands through without removal of \ escapes. 19190 if test -n "${ZSH_VERSION+set}"; then 19191 setopt NO_GLOB_SUBST 19192 fi 19193 19194 cfgfile=${ofile}T 19195 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 19196 $RM "$cfgfile" 19197 19198 cat <<_LT_EOF >> "$cfgfile" 19199 #! $SHELL 19200 # Generated automatically by $as_me ($PACKAGE) $VERSION 19201 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 19202 # NOTE: Changes made to this file will be lost: look at ltmain.sh. 19203 19204 # Provide generalized library-building support services. 19205 # Written by Gordon Matzigkeit, 1996 19206 19207 # Copyright (C) 2014 Free Software Foundation, Inc. 19208 # This is free software; see the source for copying conditions. There is NO 19209 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19210 19211 # GNU Libtool is free software; you can redistribute it and/or modify 19212 # it under the terms of the GNU General Public License as published by 19213 # the Free Software Foundation; either version 2 of of the License, or 19214 # (at your option) any later version. 19215 # 19216 # As a special exception to the GNU General Public License, if you 19217 # distribute this file as part of a program or library that is built 19218 # using GNU Libtool, you may include this file under the same 19219 # distribution terms that you use for the rest of that program. 19220 # 19221 # GNU Libtool is distributed in the hope that it will be useful, but 19222 # WITHOUT ANY WARRANTY; without even the implied warranty of 19223 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19224 # GNU General Public License for more details. 19225 # 19226 # You should have received a copy of the GNU General Public License 19227 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19228 19229 19230 # The names of the tagged configurations supported by this script. 19231 available_tags='CXX ' 19232 19233 # Configured defaults for sys_lib_dlsearch_path munging. 19234 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 19235 19236 # ### BEGIN LIBTOOL CONFIG 19237 19238 # Which release of libtool.m4 was used? 19239 macro_version=$macro_version 19240 macro_revision=$macro_revision 19241 19242 # Whether or not to build shared libraries. 19243 build_libtool_libs=$enable_shared 19244 19245 # Whether or not to build static libraries. 19246 build_old_libs=$enable_static 19247 19248 # What type of objects to build. 19249 pic_mode=$pic_mode 19250 19251 # Whether or not to optimize for fast installation. 19252 fast_install=$enable_fast_install 19253 19254 # Shared archive member basename,for filename based shared library versioning on AIX. 19255 shared_archive_member_spec=$shared_archive_member_spec 19256 19257 # Shell to use when invoking shell scripts. 19258 SHELL=$lt_SHELL 19259 19260 # An echo program that protects backslashes. 19261 ECHO=$lt_ECHO 19262 19263 # The PATH separator for the build system. 19264 PATH_SEPARATOR=$lt_PATH_SEPARATOR 19265 19266 # The host system. 19267 host_alias=$host_alias 19268 host=$host 19269 host_os=$host_os 19270 19271 # The build system. 19272 build_alias=$build_alias 19273 build=$build 19274 build_os=$build_os 19275 19276 # A sed program that does not truncate output. 19277 SED=$lt_SED 19278 19279 # Sed that helps us avoid accidentally triggering echo(1) options like -n. 19280 Xsed="\$SED -e 1s/^X//" 19281 19282 # A grep program that handles long lines. 19283 GREP=$lt_GREP 19284 19285 # An ERE matcher. 19286 EGREP=$lt_EGREP 19287 19288 # A literal string matcher. 19289 FGREP=$lt_FGREP 19290 19291 # A BSD- or MS-compatible name lister. 19292 NM=$lt_NM 19293 19294 # Whether we need soft or hard links. 19295 LN_S=$lt_LN_S 19296 19297 # What is the maximum length of a command? 19298 max_cmd_len=$max_cmd_len 19299 19300 # Object file suffix (normally "o"). 19301 objext=$ac_objext 19302 19303 # Executable file suffix (normally ""). 19304 exeext=$exeext 19305 19306 # whether the shell understands "unset". 19307 lt_unset=$lt_unset 19308 19309 # turn spaces into newlines. 19310 SP2NL=$lt_lt_SP2NL 19311 19312 # turn newlines into spaces. 19313 NL2SP=$lt_lt_NL2SP 19314 19315 # convert \$build file names to \$host format. 19316 to_host_file_cmd=$lt_cv_to_host_file_cmd 19317 19318 # convert \$build files to toolchain format. 19319 to_tool_file_cmd=$lt_cv_to_tool_file_cmd 19320 19321 # An object symbol dumper. 19322 OBJDUMP=$lt_OBJDUMP 19323 19324 # Method to check whether dependent libraries are shared objects. 19325 deplibs_check_method=$lt_deplibs_check_method 19326 19327 # Command to use when deplibs_check_method = "file_magic". 19328 file_magic_cmd=$lt_file_magic_cmd 19329 19330 # How to find potential files when deplibs_check_method = "file_magic". 19331 file_magic_glob=$lt_file_magic_glob 19332 19333 # Find potential files using nocaseglob when deplibs_check_method = "file_magic". 19334 want_nocaseglob=$lt_want_nocaseglob 19335 19336 # DLL creation program. 19337 DLLTOOL=$lt_DLLTOOL 19338 19339 # Command to associate shared and link libraries. 19340 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd 19341 19342 # The archiver. 19343 AR=$lt_AR 19344 19345 # Flags to create an archive. 19346 AR_FLAGS=$lt_AR_FLAGS 19347 19348 # How to feed a file listing to the archiver. 19349 archiver_list_spec=$lt_archiver_list_spec 19350 19351 # A symbol stripping program. 19352 STRIP=$lt_STRIP 19353 19354 # Commands used to install an old-style archive. 19355 RANLIB=$lt_RANLIB 19356 old_postinstall_cmds=$lt_old_postinstall_cmds 19357 old_postuninstall_cmds=$lt_old_postuninstall_cmds 19358 19359 # Whether to use a lock for old archive extraction. 19360 lock_old_archive_extraction=$lock_old_archive_extraction 19361 19362 # A C compiler. 19363 LTCC=$lt_CC 19364 19365 # LTCC compiler flags. 19366 LTCFLAGS=$lt_CFLAGS 19367 19368 # Take the output of nm and produce a listing of raw symbols and C names. 19369 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 19370 19371 # Transform the output of nm in a proper C declaration. 19372 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 19373 19374 # Transform the output of nm into a list of symbols to manually relocate. 19375 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import 19376 19377 # Transform the output of nm in a C name address pair. 19378 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 19379 19380 # Transform the output of nm in a C name address pair when lib prefix is needed. 19381 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix 19382 19383 # The name lister interface. 19384 nm_interface=$lt_lt_cv_nm_interface 19385 19386 # Specify filename containing input files for \$NM. 19387 nm_file_list_spec=$lt_nm_file_list_spec 19388 19389 # The root where to search for dependent libraries,and where our libraries should be installed. 19390 lt_sysroot=$lt_sysroot 19391 19392 # Command to truncate a binary pipe. 19393 lt_truncate_bin=$lt_lt_cv_truncate_bin 19394 19395 # The name of the directory that contains temporary libtool files. 19396 objdir=$objdir 19397 19398 # Used to examine libraries when file_magic_cmd begins with "file". 19399 MAGIC_CMD=$MAGIC_CMD 19400 19401 # Must we lock files when doing compilation? 19402 need_locks=$lt_need_locks 19403 19404 # Manifest tool. 19405 MANIFEST_TOOL=$lt_MANIFEST_TOOL 19406 19407 # Tool to manipulate archived DWARF debug symbol files on Mac OS X. 19408 DSYMUTIL=$lt_DSYMUTIL 19409 19410 # Tool to change global to local symbols on Mac OS X. 19411 NMEDIT=$lt_NMEDIT 19412 19413 # Tool to manipulate fat objects and archives on Mac OS X. 19414 LIPO=$lt_LIPO 19415 19416 # ldd/readelf like tool for Mach-O binaries on Mac OS X. 19417 OTOOL=$lt_OTOOL 19418 19419 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. 19420 OTOOL64=$lt_OTOOL64 19421 19422 # Old archive suffix (normally "a"). 19423 libext=$libext 19424 19425 # Shared library suffix (normally ".so"). 19426 shrext_cmds=$lt_shrext_cmds 19427 19428 # The commands to extract the exported symbol list from a shared archive. 19429 extract_expsyms_cmds=$lt_extract_expsyms_cmds 19430 19431 # Variables whose values should be saved in libtool wrapper scripts and 19432 # restored at link time. 19433 variables_saved_for_relink=$lt_variables_saved_for_relink 19434 19435 # Do we need the "lib" prefix for modules? 19436 need_lib_prefix=$need_lib_prefix 19437 19438 # Do we need a version for libraries? 19439 need_version=$need_version 19440 19441 # Library versioning type. 19442 version_type=$version_type 19443 19444 # Shared library runtime path variable. 19445 runpath_var=$runpath_var 19446 19447 # Shared library path variable. 19448 shlibpath_var=$shlibpath_var 19449 19450 # Is shlibpath searched before the hard-coded library search path? 19451 shlibpath_overrides_runpath=$shlibpath_overrides_runpath 19452 19453 # Format of library name prefix. 19454 libname_spec=$lt_libname_spec 19455 19456 # List of archive names. First name is the real one, the rest are links. 19457 # The last name is the one that the linker finds with -lNAME 19458 library_names_spec=$lt_library_names_spec 19459 19460 # The coded name of the library, if different from the real name. 19461 soname_spec=$lt_soname_spec 19462 19463 # Permission mode override for installation of shared libraries. 19464 install_override_mode=$lt_install_override_mode 19465 19466 # Command to use after installation of a shared archive. 19467 postinstall_cmds=$lt_postinstall_cmds 19468 19469 # Command to use after uninstallation of a shared archive. 19470 postuninstall_cmds=$lt_postuninstall_cmds 19471 19472 # Commands used to finish a libtool library installation in a directory. 19473 finish_cmds=$lt_finish_cmds 19474 19475 # As "finish_cmds", except a single script fragment to be evaled but 19476 # not shown. 19477 finish_eval=$lt_finish_eval 19478 19479 # Whether we should hardcode library paths into libraries. 19480 hardcode_into_libs=$hardcode_into_libs 19481 19482 # Compile-time system search path for libraries. 19483 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 19484 19485 # Detected run-time system search path for libraries. 19486 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path 19487 19488 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. 19489 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path 19490 19491 # Whether dlopen is supported. 19492 dlopen_support=$enable_dlopen 19493 19494 # Whether dlopen of programs is supported. 19495 dlopen_self=$enable_dlopen_self 19496 19497 # Whether dlopen of statically linked programs is supported. 19498 dlopen_self_static=$enable_dlopen_self_static 19499 19500 # Commands to strip libraries. 19501 old_striplib=$lt_old_striplib 19502 striplib=$lt_striplib 19503 19504 19505 # The linker used to build libraries. 19506 LD=$lt_LD 19507 19508 # How to create reloadable object files. 19509 reload_flag=$lt_reload_flag 19510 reload_cmds=$lt_reload_cmds 19511 19512 # Commands used to build an old-style archive. 19513 old_archive_cmds=$lt_old_archive_cmds 19514 19515 # A language specific compiler. 19516 CC=$lt_compiler 19517 19518 # Is the compiler the GNU compiler? 19519 with_gcc=$GCC 19520 19521 # Compiler flag to turn off builtin functions. 19522 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag 19523 19524 # Additional compiler flags for building library objects. 19525 pic_flag=$lt_lt_prog_compiler_pic 19526 19527 # How to pass a linker flag through the compiler. 19528 wl=$lt_lt_prog_compiler_wl 19529 19530 # Compiler flag to prevent dynamic linking. 19531 link_static_flag=$lt_lt_prog_compiler_static 19532 19533 # Does compiler simultaneously support -c and -o options? 19534 compiler_c_o=$lt_lt_cv_prog_compiler_c_o 19535 19536 # Whether or not to add -lc for building shared libraries. 19537 build_libtool_need_lc=$archive_cmds_need_lc 19538 19539 # Whether or not to disallow shared libs when runtime libs are static. 19540 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes 19541 19542 # Compiler flag to allow reflexive dlopens. 19543 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec 19544 19545 # Compiler flag to generate shared objects directly from archives. 19546 whole_archive_flag_spec=$lt_whole_archive_flag_spec 19547 19548 # Whether the compiler copes with passing no objects directly. 19549 compiler_needs_object=$lt_compiler_needs_object 19550 19551 # Create an old-style archive from a shared archive. 19552 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds 19553 19554 # Create a temporary old-style archive to link instead of a shared archive. 19555 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds 19556 19557 # Commands used to build a shared archive. 19558 archive_cmds=$lt_archive_cmds 19559 archive_expsym_cmds=$lt_archive_expsym_cmds 19560 19561 # Commands used to build a loadable module if different from building 19562 # a shared archive. 19563 module_cmds=$lt_module_cmds 19564 module_expsym_cmds=$lt_module_expsym_cmds 19565 19566 # Whether we are building with GNU ld or not. 19567 with_gnu_ld=$lt_with_gnu_ld 19568 19569 # Flag that allows shared libraries with undefined symbols to be built. 19570 allow_undefined_flag=$lt_allow_undefined_flag 19571 19572 # Flag that enforces no undefined symbols. 19573 no_undefined_flag=$lt_no_undefined_flag 19574 19575 # Flag to hardcode \$libdir into a binary during linking. 19576 # This must work even if \$libdir does not exist 19577 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec 19578 19579 # Whether we need a single "-rpath" flag with a separated argument. 19580 hardcode_libdir_separator=$lt_hardcode_libdir_separator 19581 19582 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes 19583 # DIR into the resulting binary. 19584 hardcode_direct=$hardcode_direct 19585 19586 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes 19587 # DIR into the resulting binary and the resulting library dependency is 19588 # "absolute",i.e impossible to change by setting \$shlibpath_var if the 19589 # library is relocated. 19590 hardcode_direct_absolute=$hardcode_direct_absolute 19591 19592 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR 19593 # into the resulting binary. 19594 hardcode_minus_L=$hardcode_minus_L 19595 19596 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 19597 # into the resulting binary. 19598 hardcode_shlibpath_var=$hardcode_shlibpath_var 19599 19600 # Set to "yes" if building a shared library automatically hardcodes DIR 19601 # into the library and all subsequent libraries and executables linked 19602 # against it. 19603 hardcode_automatic=$hardcode_automatic 19604 19605 # Set to yes if linker adds runtime paths of dependent libraries 19606 # to runtime path list. 19607 inherit_rpath=$inherit_rpath 19608 19609 # Whether libtool must link a program against all its dependency libraries. 19610 link_all_deplibs=$link_all_deplibs 19611 19612 # Set to "yes" if exported symbols are required. 19613 always_export_symbols=$always_export_symbols 19614 19615 # The commands to list exported symbols. 19616 export_symbols_cmds=$lt_export_symbols_cmds 19617 19618 # Symbols that should not be listed in the preloaded symbols. 19619 exclude_expsyms=$lt_exclude_expsyms 19620 19621 # Symbols that must always be exported. 19622 include_expsyms=$lt_include_expsyms 19623 19624 # Commands necessary for linking programs (against libraries) with templates. 19625 prelink_cmds=$lt_prelink_cmds 19626 19627 # Commands necessary for finishing linking programs. 19628 postlink_cmds=$lt_postlink_cmds 19629 19630 # Specify filename containing input files. 19631 file_list_spec=$lt_file_list_spec 19632 19633 # How to hardcode a shared library path into an executable. 19634 hardcode_action=$hardcode_action 19635 19636 # The directories searched by this compiler when creating a shared library. 19637 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs 19638 19639 # Dependencies to place before and after the objects being linked to 19640 # create a shared library. 19641 predep_objects=$lt_predep_objects 19642 postdep_objects=$lt_postdep_objects 19643 predeps=$lt_predeps 19644 postdeps=$lt_postdeps 19645 19646 # The library search path used internally by the compiler when linking 19647 # a shared library. 19648 compiler_lib_search_path=$lt_compiler_lib_search_path 19649 19650 # ### END LIBTOOL CONFIG 19651 19652 _LT_EOF 19653 19654 cat <<'_LT_EOF' >> "$cfgfile" 19655 19656 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 19657 19658 # func_munge_path_list VARIABLE PATH 19659 # ----------------------------------- 19660 # VARIABLE is name of variable containing _space_ separated list of 19661 # directories to be munged by the contents of PATH, which is string 19662 # having a format: 19663 # "DIR[:DIR]:" 19664 # string "DIR[ DIR]" will be prepended to VARIABLE 19665 # ":DIR[:DIR]" 19666 # string "DIR[ DIR]" will be appended to VARIABLE 19667 # "DIRP[:DIRP]::[DIRA:]DIRA" 19668 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string 19669 # "DIRA[ DIRA]" will be appended to VARIABLE 19670 # "DIR[:DIR]" 19671 # VARIABLE will be replaced by "DIR[ DIR]" 19672 func_munge_path_list () 19673 { 19674 case x$2 in 19675 x) 19676 ;; 19677 *:) 19678 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" 19679 ;; 19680 x:*) 19681 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" 19682 ;; 19683 *::*) 19684 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 19685 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" 19686 ;; 19687 *) 19688 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" 19689 ;; 19690 esac 19691 } 19692 19693 19694 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 19695 func_cc_basename () 19696 { 19697 for cc_temp in $*""; do 19698 case $cc_temp in 19699 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; 19700 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; 19701 \-*) ;; 19702 *) break;; 19703 esac 19704 done 19705 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 19706 } 19707 19708 19709 # ### END FUNCTIONS SHARED WITH CONFIGURE 19710 19711 _LT_EOF 19712 19713 case $host_os in 19714 aix3*) 19715 cat <<\_LT_EOF >> "$cfgfile" 19716 # AIX sometimes has problems with the GCC collect2 program. For some 19717 # reason, if we set the COLLECT_NAMES environment variable, the problems 19718 # vanish in a puff of smoke. 19719 if test set != "${COLLECT_NAMES+set}"; then 19720 COLLECT_NAMES= 19721 export COLLECT_NAMES 19722 fi 19723 _LT_EOF 19724 ;; 19725 esac 19726 19727 19728 ltmain=$ac_aux_dir/ltmain.sh 19729 19730 19731 # We use sed instead of cat because bash on DJGPP gets confused if 19732 # if finds mixed CR/LF and LF-only lines. Since sed operates in 19733 # text mode, it properly converts lines to CR/LF. This bash problem 19734 # is reportedly fixed, but why not run on old versions too? 19735 sed '$q' "$ltmain" >> "$cfgfile" \ 19736 || (rm -f "$cfgfile"; exit 1) 19737 19738 mv -f "$cfgfile" "$ofile" || 19739 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19740 chmod +x "$ofile" 19741 19742 19743 cat <<_LT_EOF >> "$ofile" 19744 19745 # ### BEGIN LIBTOOL TAG CONFIG: CXX 19746 19747 # The linker used to build libraries. 19748 LD=$lt_LD_CXX 19749 19750 # How to create reloadable object files. 19751 reload_flag=$lt_reload_flag_CXX 19752 reload_cmds=$lt_reload_cmds_CXX 19753 19754 # Commands used to build an old-style archive. 19755 old_archive_cmds=$lt_old_archive_cmds_CXX 19756 19757 # A language specific compiler. 19758 CC=$lt_compiler_CXX 19759 19760 # Is the compiler the GNU compiler? 19761 with_gcc=$GCC_CXX 19762 19763 # Compiler flag to turn off builtin functions. 19764 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX 19765 19766 # Additional compiler flags for building library objects. 19767 pic_flag=$lt_lt_prog_compiler_pic_CXX 19768 19769 # How to pass a linker flag through the compiler. 19770 wl=$lt_lt_prog_compiler_wl_CXX 19771 19772 # Compiler flag to prevent dynamic linking. 19773 link_static_flag=$lt_lt_prog_compiler_static_CXX 19774 19775 # Does compiler simultaneously support -c and -o options? 19776 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX 19777 19778 # Whether or not to add -lc for building shared libraries. 19779 build_libtool_need_lc=$archive_cmds_need_lc_CXX 19780 19781 # Whether or not to disallow shared libs when runtime libs are static. 19782 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX 19783 19784 # Compiler flag to allow reflexive dlopens. 19785 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX 19786 19787 # Compiler flag to generate shared objects directly from archives. 19788 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX 19789 19790 # Whether the compiler copes with passing no objects directly. 19791 compiler_needs_object=$lt_compiler_needs_object_CXX 19792 19793 # Create an old-style archive from a shared archive. 19794 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX 19795 19796 # Create a temporary old-style archive to link instead of a shared archive. 19797 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX 19798 19799 # Commands used to build a shared archive. 19800 archive_cmds=$lt_archive_cmds_CXX 19801 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX 19802 19803 # Commands used to build a loadable module if different from building 19804 # a shared archive. 19805 module_cmds=$lt_module_cmds_CXX 19806 module_expsym_cmds=$lt_module_expsym_cmds_CXX 19807 19808 # Whether we are building with GNU ld or not. 19809 with_gnu_ld=$lt_with_gnu_ld_CXX 19810 19811 # Flag that allows shared libraries with undefined symbols to be built. 19812 allow_undefined_flag=$lt_allow_undefined_flag_CXX 19813 19814 # Flag that enforces no undefined symbols. 19815 no_undefined_flag=$lt_no_undefined_flag_CXX 19816 19817 # Flag to hardcode \$libdir into a binary during linking. 19818 # This must work even if \$libdir does not exist 19819 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX 19820 19821 # Whether we need a single "-rpath" flag with a separated argument. 19822 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX 19823 19824 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes 19825 # DIR into the resulting binary. 19826 hardcode_direct=$hardcode_direct_CXX 19827 19828 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes 19829 # DIR into the resulting binary and the resulting library dependency is 19830 # "absolute",i.e impossible to change by setting \$shlibpath_var if the 19831 # library is relocated. 19832 hardcode_direct_absolute=$hardcode_direct_absolute_CXX 19833 19834 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR 19835 # into the resulting binary. 19836 hardcode_minus_L=$hardcode_minus_L_CXX 19837 19838 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 19839 # into the resulting binary. 19840 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX 19841 19842 # Set to "yes" if building a shared library automatically hardcodes DIR 19843 # into the library and all subsequent libraries and executables linked 19844 # against it. 19845 hardcode_automatic=$hardcode_automatic_CXX 19846 19847 # Set to yes if linker adds runtime paths of dependent libraries 19848 # to runtime path list. 19849 inherit_rpath=$inherit_rpath_CXX 19850 19851 # Whether libtool must link a program against all its dependency libraries. 19852 link_all_deplibs=$link_all_deplibs_CXX 19853 19854 # Set to "yes" if exported symbols are required. 19855 always_export_symbols=$always_export_symbols_CXX 19856 19857 # The commands to list exported symbols. 19858 export_symbols_cmds=$lt_export_symbols_cmds_CXX 19859 19860 # Symbols that should not be listed in the preloaded symbols. 19861 exclude_expsyms=$lt_exclude_expsyms_CXX 19862 19863 # Symbols that must always be exported. 19864 include_expsyms=$lt_include_expsyms_CXX 19865 19866 # Commands necessary for linking programs (against libraries) with templates. 19867 prelink_cmds=$lt_prelink_cmds_CXX 19868 19869 # Commands necessary for finishing linking programs. 19870 postlink_cmds=$lt_postlink_cmds_CXX 19871 19872 # Specify filename containing input files. 19873 file_list_spec=$lt_file_list_spec_CXX 19874 19875 # How to hardcode a shared library path into an executable. 19876 hardcode_action=$hardcode_action_CXX 19877 19878 # The directories searched by this compiler when creating a shared library. 19879 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX 19880 19881 # Dependencies to place before and after the objects being linked to 19882 # create a shared library. 19883 predep_objects=$lt_predep_objects_CXX 19884 postdep_objects=$lt_postdep_objects_CXX 19885 predeps=$lt_predeps_CXX 19886 postdeps=$lt_postdeps_CXX 19887 19888 # The library search path used internally by the compiler when linking 19889 # a shared library. 19890 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX 19891 19892 # ### END LIBTOOL TAG CONFIG: CXX 19893 _LT_EOF 19894 19895 ;; 7867 19896 7868 19897 esac -
configure.ac
r5e49e47 rd0c91a6 5 5 AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca]) 6 6 AC_CONFIG_AUX_DIR([automake]) 7 AC_CONFIG_MACRO_DIRS([automake]) 7 8 #AC_CONFIG_SRCDIR([src/main.cc]) 8 9 AC_CONFIG_HEADERS([config.h:src/config.h.in]) … … 55 56 AC_SUBST([DOendif]) 56 57 AM_SUBST_NOTMAKE([DOendif]) 57 58 #==============================================================================59 # backend compiler implementation60 AC_ARG_WITH(backend-compiler,61 [ --with-backend-compiler=PROGRAM PROGRAM that performs the final code compilation (must be gcc-compatible) ],62 backendcompiler=$withval, backendcompiler="")63 if test "x$backendcompiler" != "x"; then64 BACKEND_CC=${backendcompiler}65 else66 AC_PATH_PROG(BACKEND_CC, gcc, []) # check gcc installed67 if test "x$BACKEND_CC" = "x"; then68 AC_MSG_ERROR(some version of gcc is needed. Get it at ftp://ftp.gnu.org)69 exit 170 fi71 fi72 AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${BACKEND_CC}", [Location of include files.])73 AC_SUBST(CFA_BACKEND_CC)74 58 75 59 #============================================================================== … … 200 184 AC_PROG_LEX 201 185 if test "${LEX}" = "lex" ; then echo "Error: flex required." ; exit 1 ; fi 186 AC_PROG_LIBTOOL 202 187 AC_PROG_INSTALL 203 188 AC_PROG_MAKE_SET 204 AC_PROG_RANLIB205 189 206 190 # Checks for libraries. … … 228 212 229 213 #============================================================================== 214 # backend compiler implementation 215 AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${CC}", [Backend compiler to use.]) 216 AC_SUBST(CFA_BACKEND_CC) 217 218 #============================================================================== 230 219 AC_CONFIG_FILES([ 231 220 Makefile -
doc/papers/concurrency/Paper.tex
r5e49e47 rd0c91a6 686 686 Fib f1, f2; 687 687 for ( int i = 1; i <= 10; i += 1 ) { 688 sout | next( f1 ) | next( f2 ) | endl;688 sout | next( f1 ) | next( f2 ); 689 689 } 690 690 } … … 772 772 sout | " "; // separator 773 773 } 774 sout | endl;774 sout | nl; 775 775 } 776 776 } 777 777 void ?{}( Format & fmt ) { `resume( fmt );` } 778 778 void ^?{}( Format & fmt ) with( fmt ) { 779 if ( g != 0 || b != 0 ) sout | endl;779 if ( g != 0 || b != 0 ) sout | nl; 780 780 } 781 781 void format( Format & fmt ) { … … 855 855 for ( int i = 0; i < N; i += 1 ) { 856 856 int p1 = random( 100 ), p2 = random( 100 ); 857 sout | p1 | " " | p2 | endl;857 sout | p1 | " " | p2; 858 858 int status = delivery( c, p1, p2 ); 859 sout | " $" | money | endl | status | endl;859 sout | " $" | money | nl | status; 860 860 receipt += 1; 861 861 } 862 862 stop( c ); 863 sout | "prod stops" | endl;863 sout | "prod stops"; 864 864 } 865 865 int payment( Prod & prod, int money ) { … … 895 895 int money = 1, receipt; 896 896 for ( ; ! done; ) { 897 sout | p1 | " " | p2 | endl | " $" | money | endl;897 sout | p1 | " " | p2 | nl | " $" | money; 898 898 status += 1; 899 899 receipt = payment( p, money ); 900 sout | " #" | receipt | endl;900 sout | " #" | receipt; 901 901 money += 1; 902 902 } 903 sout | "cons stops" | endl;903 sout | "cons stops"; 904 904 } 905 905 int delivery( Cons & cons, int p1, int p2 ) { … … 1099 1099 1100 1100 void main(foo & this) { 1101 sout | "Hello World!" | endl;1101 sout | "Hello World!"; 1102 1102 } 1103 1103 \end{cfa} … … 1124 1124 1125 1125 void hello(/*unused*/ int) { 1126 sout | "Hello World!" | endl;1126 sout | "Hello World!"; 1127 1127 } 1128 1128 … … 1141 1141 thread World {}; 1142 1142 void main( World & this ) { 1143 sout | "World!" | endl;1143 sout | "World!"; 1144 1144 } 1145 1145 int main() { 1146 1146 World w`[10]`; $\C{// implicit forks after creation}$ 1147 sout | "Hello " | endl; $\C{// "Hello " and 10 "World!" printed concurrently}$1147 sout | "Hello "; $\C{// "Hello " and 10 "World!" printed concurrently}$ 1148 1148 } $\C{// implicit joins before destruction}$ 1149 1149 \end{cfa} … … 1193 1193 total += subtotals[r]; $\C{// total subtotal}$ 1194 1194 } 1195 sout | total | endl;1195 sout | total; 1196 1196 } 1197 1197 \end{cfa} … … 2192 2192 BENCH( 2193 2193 for ( size_t i = 0; i < N; i += 1 ) { @resume( c );@ } ) 2194 sout | result`ns | endl;2194 sout | result`ns; 2195 2195 } 2196 2196 \end{cfa} … … 2205 2205 BENCH( 2206 2206 for ( size_t i = 0; i < N; i += 1 ) { @yield();@ } ) 2207 sout | result`ns | endl;2207 sout | result`ns; 2208 2208 } 2209 2209 \end{cfa} … … 2244 2244 int main() { 2245 2245 BENCH( for( size_t i = 0; i < N; i += 1 ) { @do_call( m1/*, m2, m3, m4*/ );@ } ) 2246 sout | result`ns | endl;2246 sout | result`ns; 2247 2247 } 2248 2248 \end{cfa} … … 2305 2305 BENCH( for ( size_t i = 0; i < N; i += 1 ) { @wait( c );@ } ); 2306 2306 go = 0; // stop other thread 2307 sout | result`ns | endl;2307 sout | result`ns; 2308 2308 } 2309 2309 int main() { … … 2356 2356 BENCH( for ( size_t i = 0; i < N; i += 1 ) { @waitfor( do_call, m );@ } ) 2357 2357 go = 0; // stop other thread 2358 sout | result`ns | endl;2358 sout | result`ns; 2359 2359 } 2360 2360 int main() { … … 2391 2391 int main() { 2392 2392 BENCH( for ( size_t i = 0; i < N; i += 1 ) { @MyThread m;@ } ) 2393 sout | result`ns | endl;2393 sout | result`ns; 2394 2394 } 2395 2395 \end{cfa} -
doc/proposals/flags.md
r5e49e47 rd0c91a6 60 60 ``` 61 61 FunFlags f = some_val(); 62 if ( f ) { sout | "f has some flag(s) set" | endl; }63 if ( f & FOO ) { sout | "f has FOO set" | endl; }62 if ( f ) { sout | "f has some flag(s) set"; } 63 if ( f & FOO ) { sout | "f has FOO set"; } 64 64 f |= FOO; // set FOO 65 65 f -= FOO; // unset FOO … … 88 88 ``` 89 89 FunFlags f = some_val(); 90 if ( f.FOO ) { sout | "f has FOO set" | endl; }90 if ( f.FOO ) { sout | "f has FOO set"; } 91 91 f.FOO = true; // set FOO 92 92 f.FOO = false; // unset FOO -
doc/user/user.tex
r5e49e47 rd0c91a6 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Wed Nov 7 17:00:49201814 %% Update Count : 3 39913 %% Last Modified On : Tue Dec 11 23:19:26 2018 14 %% Update Count : 3400 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 178 178 int main( void ) { 179 179 int x = 0, y = 1, z = 2; 180 ®sout | x | y | z | endl;®§\indexc{sout}§180 ®sout | x | y | z;®§\indexc{sout}§ 181 181 } 182 182 \end{cfa} … … 513 513 Floating exponentiation\index{exponentiation!floating} is performed using \Index{logarithm}s\index{exponentiation!logarithm}, so the base cannot be negative. 514 514 \begin{cfa} 515 sout | 2 ®\® 8u | 4 ®\® 3u | -4 ®\® 3u | 4 ®\® -3 | -4 ®\® -3 | 4.0 ®\® 2.1 | (1.0f+2.0fi) ®\® (3.0f+2.0fi) | endl;515 sout | 2 ®\® 8u | 4 ®\® 3u | -4 ®\® 3u | 4 ®\® -3 | -4 ®\® -3 | 4.0 ®\® 2.1 | (1.0f+2.0fi) ®\® (3.0f+2.0fi); 516 516 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 517 517 \end{cfa} … … 591 591 & 592 592 \begin{cfa} 593 sout | endl;594 sout | endl;595 sout | endl;596 sout | "zero" | endl;597 sout | endl;598 sout | endl;599 sout | endl;600 sout | endl;601 sout | endl;602 sout | endl;603 sout | endl;604 sout | endl;605 sout | endl;606 sout | endl;607 sout | endl;608 sout | endl;609 sout | endl | endl;610 611 sout | endl;612 sout | endl;613 sout | endl | endl;614 615 sout | endl;593 sout | nl; 594 sout | nl; 595 sout | nl; 596 sout | "zero" | nl; 597 sout | nl; 598 sout | nl; 599 sout | nl; 600 sout | nl; 601 sout | nl; 602 sout | nl; 603 sout | nl; 604 sout | nl; 605 sout | nl; 606 sout | nl; 607 sout | nl; 608 sout | nl; 609 sout | nl | nl; 610 611 sout | nl; 612 sout | nl; 613 sout | nl | nl; 614 615 sout | nl; 616 616 \end{cfa} 617 617 & … … 2459 2459 int bar( int p ) { 2460 2460 ®i® += 1; §\C{// dependent on local variable}§ 2461 sout | ®i® | endl;2461 sout | ®i®; 2462 2462 } 2463 2463 return bar; §\C{// undefined because of local dependence}§ … … 2465 2465 int main() { 2466 2466 * [int]( int ) fp = foo(); §\C{// int (* fp)( int )}§ 2467 sout | fp( 3 ) | endl;2467 sout | fp( 3 ); 2468 2468 } 2469 2469 \end{cfa} … … 3231 3231 \begin{cfa} 3232 3232 int x = 1, y = 2, z = 3; 3233 sout | x ®|® y ®|® z | endl;3233 sout | x ®|® y ®|® z; 3234 3234 \end{cfa} 3235 3235 & … … 3252 3252 \begin{cfa} 3253 3253 [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ]; 3254 sout | t1 | t2 | endl;§\C{// print tuples}§3254 sout | t1 | t2; §\C{// print tuples}§ 3255 3255 \end{cfa} 3256 3256 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 3264 3264 & 3265 3265 \begin{cfa} 3266 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;3266 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2); 3267 3267 \end{cfa} 3268 3268 \\ … … 3290 3290 A separator does not appear at the start or end of a line. 3291 3291 \begin{cfa}[belowskip=0pt] 3292 sout | 1 | 2 | 3 | endl;3292 sout | 1 | 2 | 3; 3293 3293 \end{cfa} 3294 3294 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3299 3299 A separator does not appear before or after a character literal or variable. 3300 3300 \begin{cfa} 3301 sout | '1' | '2' | '3' | endl;3301 sout | '1' | '2' | '3'; 3302 3302 123 3303 3303 \end{cfa} … … 3306 3306 A separator does not appear before or after a null (empty) C string. 3307 3307 \begin{cfa} 3308 sout | 1 | "" | 2 | "" | 3 | endl;3308 sout | 1 | "" | 2 | "" | 3; 3309 3309 123 3310 3310 \end{cfa} … … 3316 3316 \begin{cfa}[mathescape=off] 3317 3317 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x =" | 4 | "x $" | 5 | "x £" | 6 | "x ¥" 3318 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10 | endl;3318 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10; 3319 3319 \end{cfa} 3320 3320 %$ … … 3330 3330 \begin{cfa}[belowskip=0pt] 3331 3331 sout | 1 | ", x" | 2 | ". x" | 3 | "; x" | 4 | "! x" | 5 | "? x" | 6 | "% x" 3332 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;3332 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x"; 3333 3333 \end{cfa} 3334 3334 \begin{cfa}[basicstyle=\tt,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3340 3340 A seperator does not appear before or after a C string begining/ending with the \Index*{ASCII} quote or whitespace characters: \lstinline[basicstyle=\tt,showspaces=true]@`'": \t\v\f\r\n@ 3341 3341 \begin{cfa}[belowskip=0pt] 3342 sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;3342 sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx"; 3343 3343 \end{cfa} 3344 3344 \begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt] … … 3349 3349 If a space is desired before or after one of the special string start/end characters, simply insert a space. 3350 3350 \begin{cfa}[belowskip=0pt] 3351 sout | "x (§\color{red}\texttt{\textvisiblespace}§" | 1 | "§\color{red}\texttt{\textvisiblespace}§) x" | 2 | "§\color{red}\texttt{\textvisiblespace}§, x" | 3 | "§\color{red}\texttt{\textvisiblespace}§:x:§\color{red}\texttt{\textvisiblespace}§" | 4 | endl;3351 sout | "x (§\color{red}\texttt{\textvisiblespace}§" | 1 | "§\color{red}\texttt{\textvisiblespace}§) x" | 2 | "§\color{red}\texttt{\textvisiblespace}§, x" | 3 | "§\color{red}\texttt{\textvisiblespace}§:x:§\color{red}\texttt{\textvisiblespace}§" | 4; 3352 3352 \end{cfa} 3353 3353 \begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt] … … 3366 3366 \begin{cfa}[mathescape=off,belowskip=0pt] 3367 3367 sepSet( sout, ", $" ); §\C{// set separator from " " to ", \$"}§ 3368 sout | 1 | 2 | 3 | " \"" | ®sep® | "\"" | endl;3368 sout | 1 | 2 | 3 | " \"" | ®sep® | "\""; 3369 3369 \end{cfa} 3370 3370 %$ … … 3375 3375 \begin{cfa}[belowskip=0pt] 3376 3376 sepSet( sout, " " ); §\C{// reset separator to " "}§ 3377 sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\"" | endl;3377 sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\""; 3378 3378 \end{cfa} 3379 3379 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 3385 3385 strcpy( store, sepGet( sout ) ); §\C{// copy current separator}§ 3386 3386 sepSet( sout, "_" ); §\C{// change separator to underscore}§ 3387 sout | 1 | 2 | 3 | endl;3387 sout | 1 | 2 | 3; 3388 3388 \end{cfa} 3389 3389 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3392 3392 \begin{cfa}[belowskip=0pt] 3393 3393 sepSet( sout, store ); §\C{// change separator back to original}§ 3394 sout | 1 | 2 | 3 | endl;3394 sout | 1 | 2 | 3; 3395 3395 \end{cfa} 3396 3396 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 3403 3403 \begin{cfa}[belowskip=0pt] 3404 3404 sepSetTuple( sout, " " ); §\C{// set tuple separator from ", " to " "}§ 3405 sout | t1 | t2 | " \"" | ®sepTuple® | "\"" | endl;3405 sout | t1 | t2 | " \"" | ®sepTuple® | "\""; 3406 3406 \end{cfa} 3407 3407 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 3410 3410 \begin{cfa}[belowskip=0pt] 3411 3411 sepSetTuple( sout, ", " ); §\C{// reset tuple separator to ", "}§ 3412 sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\"" | endl;3412 sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\""; 3413 3413 \end{cfa} 3414 3414 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 3420 3420 Manipulators \Indexc{sepDisable}\index{manipulator!sepDisable@©sepDisable©} and \Indexc{sepEnable}\index{manipulator!sepEnable@©sepEnable©} \emph{globally} toggle printing the separator, \ie the seperator is adjusted with respect to all subsequent printed items. 3421 3421 \begin{cfa}[belowskip=0pt] 3422 sout | sepDisable | 1 | 2 | 3 | endl;§\C{// globally turn off implicit separator}§3422 sout | sepDisable | 1 | 2 | 3; §\C{// globally turn off implicit separator}§ 3423 3423 \end{cfa} 3424 3424 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3426 3426 \end{cfa} 3427 3427 \begin{cfa}[belowskip=0pt] 3428 sout | sepEnable | 1 | 2 | 3 | endl; §\C{// globally turn on implicit separator}§3428 sout | sepEnable | 1 | 2 | 3; §\C{// globally turn on implicit separator}§ 3429 3429 \end{cfa} 3430 3430 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3435 3435 Manipulators \Indexc{sepOn}\index{manipulator!sepOn@©sepOn©} and \Indexc{sepOff}\index{manipulator!sepOff@©sepOff©} \emph{locally} toggle printing the separator, \ie the seperator is adjusted only with respect to the next printed item. 3436 3436 \begin{cfa}[belowskip=0pt] 3437 sout | 1 | sepOff | 2 | 3 | endl; §\C{// locally turn off implicit separator}§3437 sout | 1 | sepOff | 2 | 3; §\C{// locally turn off implicit separator}§ 3438 3438 \end{cfa} 3439 3439 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3441 3441 \end{cfa} 3442 3442 \begin{cfa}[belowskip=0pt] 3443 sout | sepDisable | 1 | sepOn | 2 | 3 | endl; §\C{// locally turn on implicit separator}§3443 sout | sepDisable | 1 | sepOn | 2 | 3; §\C{// locally turn on implicit separator}§ 3444 3444 \end{cfa} 3445 3445 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3448 3448 The tuple separator also responses to being turned on and off. 3449 3449 \begin{cfa}[belowskip=0pt] 3450 sout | t1 | sepOff | t2 | endl; §\C{// locally turn on/off implicit separator}§3450 sout | t1 | sepOff | t2; §\C{// locally turn on/off implicit separator}§ 3451 3451 \end{cfa} 3452 3452 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3456 3456 use ©sep© to accomplish this functionality. 3457 3457 \begin{cfa}[belowskip=0pt] 3458 sout | sepOn | 1 | 2 | 3 | sepOn | endl; §\C{// sepOn does nothing at start/end of line}§3458 sout | sepOn | 1 | 2 | 3 | sepOn; §\C{// sepOn does nothing at start/end of line}§ 3459 3459 \end{cfa} 3460 3460 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3462 3462 \end{cfa} 3463 3463 \begin{cfa}[belowskip=0pt] 3464 sout | sep | 1 | 2 | 3 | sep | endl; §\C{// use sep to print separator at start/end of line}§3464 sout | sep | 1 | 2 | 3 | sep ; §\C{// use sep to print separator at start/end of line}§ 3465 3465 \end{cfa} 3466 3466 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 3475 3475 int main( void ) { 3476 3476 int x = 1, y = 2, z = 3; 3477 sout | x | y | z | endl;3477 sout | x | y | z; 3478 3478 [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ]; 3479 sout | t1 | t2 | endl; // print tuples3480 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;3481 sout | 1 | 2 | 3 | endl;3482 sout | '1' | '2' | '3' | endl;3483 sout | 1 | "" | 2 | "" | 3 | endl;3479 sout | t1 | t2; // print tuples 3480 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2); 3481 sout | 1 | 2 | 3; 3482 sout | '1' | '2' | '3'; 3483 sout | 1 | "" | 2 | "" | 3; 3484 3484 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x =" | 4 | "x $" | 5 | "x £" | 6 | "x ¥" 3485 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10 | endl;3485 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10; 3486 3486 sout | 1 | ", x" | 2 | ". x" | 3 | "; x" | 4 | "! x" | 5 | "? x" | 6 | "% x" 3487 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;3488 sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;3489 sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl;3487 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x"; 3488 sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx"; 3489 sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4; 3490 3490 3491 3491 sepSet( sout, ", $" ); // set separator from " " to ", $" 3492 sout | 1 | 2 | 3 | " \"" | sep | "\"" | endl;3492 sout | 1 | 2 | 3 | " \"" | sep | "\""; 3493 3493 sepSet( sout, " " ); // reset separator to " " 3494 sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;3494 sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\""; 3495 3495 3496 3496 char store[sepSize]; 3497 3497 strcpy( store, sepGet( sout ) ); 3498 3498 sepSet( sout, "_" ); 3499 sout | 1 | 2 | 3 | endl;3499 sout | 1 | 2 | 3; 3500 3500 sepSet( sout, store ); 3501 sout | 1 | 2 | 3 | endl;3501 sout | 1 | 2 | 3; 3502 3502 3503 3503 sepSetTuple( sout, " " ); // set tuple separator from ", " to " " 3504 sout | t1 | t2 | " \"" | sepTuple | "\"" | endl;3504 sout | t1 | t2 | " \"" | sepTuple | "\""; 3505 3505 sepSetTuple( sout, ", " ); // reset tuple separator to ", " 3506 sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;3507 3508 sout | sepDisable | 1 | 2 | 3 | endl; // globally turn off implicit separator3509 sout | sepEnable | 1 | 2 | 3 | endl; // globally turn on implicit separator3510 3511 sout | 1 | sepOff | 2 | 3 | endl; // locally turn on implicit separator3512 sout | sepDisable | 1 | sepOn | 2 | 3 | endl; // globally turn off implicit separator3506 sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\""; 3507 3508 sout | sepDisable | 1 | 2 | 3; // globally turn off implicit separator 3509 sout | sepEnable | 1 | 2 | 3; // globally turn on implicit separator 3510 3511 sout | 1 | sepOff | 2 | 3; // locally turn on implicit separator 3512 sout | sepDisable | 1 | sepOn | 2 | 3; // globally turn off implicit separator 3513 3513 sout | sepEnable; 3514 sout | t1 | sepOff | t2 | endl; // locally turn on/off implicit separator3515 3516 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // sepOn does nothing at start/end of line3517 sout | sep | 1 | 2 | 3 | sep | endl; // use sep to print separator at start/end of line3514 sout | t1 | sepOff | t2; // locally turn on/off implicit separator 3515 3516 sout | sepOn | 1 | 2 | 3 | sepOn ; // sepOn does nothing at start/end of line 3517 sout | sep | 1 | 2 | 3 | sep ; // use sep to print separator at start/end of line 3518 3518 } 3519 3519 … … 4180 4180 Fibonacci f1, f2; 4181 4181 for ( int i = 1; i <= 10; i += 1 ) { 4182 sout | next( &f1 ) | ' ' | next( &f2 ) | endl;4182 sout | next( &f1 ) | ' ' | next( &f2 ); 4183 4183 } // for 4184 4184 } … … 4246 4246 MyThread f[4]; 4247 4247 } 4248 sout | global.value | endl;4248 sout | global.value; 4249 4249 } 4250 4250 \end{cfa} … … 4324 4324 void main( First * this ) { 4325 4325 for ( int i = 0; i < 10; i += 1 ) { 4326 sout | "First : Suspend No." | i + 1 | endl;4326 sout | "First : Suspend No." | i + 1; 4327 4327 yield(); 4328 4328 } … … 4333 4333 wait( this->lock ); 4334 4334 for ( int i = 0; i < 10; i += 1 ) { 4335 sout | "Second : Suspend No." | i + 1 | endl;4335 sout | "Second : Suspend No." | i + 1; 4336 4336 yield(); 4337 4337 } … … 4340 4340 int main( void ) { 4341 4341 signal_once lock; 4342 sout | "User main begin" | endl;4342 sout | "User main begin"; 4343 4343 { 4344 4344 processor p; … … 4348 4348 } 4349 4349 } 4350 sout | "User main end" | endl;4350 sout | "User main end"; 4351 4351 } 4352 4352 \end{cfa} … … 5045 5045 void ?{}( Line * l ) { 5046 5046 l->lnth = 0.0; 5047 sout | "default" | endl;5047 sout | "default"; 5048 5048 } 5049 5049 … … 5052 5052 void ?{}( Line * l, float lnth ) { 5053 5053 l->lnth = lnth; 5054 sout | "lnth" | l->lnth | endl;5054 sout | "lnth" | l->lnth; 5055 5055 5056 5056 } … … 5058 5058 // destructor 5059 5059 void ^?() { 5060 sout | "destroyed" | endl;5060 sout | "destroyed"; 5061 5061 l.lnth = 0.0; 5062 5062 } … … 5804 5804 In particular, output of ©char© variable now print a character rather than the decimal ASCII value of the character. 5805 5805 \begin{cfa} 5806 sout | 'x' | " " | (int)'x' | endl;5806 sout | 'x' | " " | (int)'x'; 5807 5807 x 120 5808 5808 \end{cfa} … … 7034 7034 #include <gmp>§\indexc{gmp}§ 7035 7035 int main( void ) { 7036 sout | "Factorial Numbers" | endl;7036 sout | "Factorial Numbers"; 7037 7037 Int fact = 1; 7038 7038 7039 sout | 0 | fact | endl;7039 sout | 0 | fact; 7040 7040 for ( unsigned int i = 1; i <= 40; i += 1 ) { 7041 7041 fact *= i; 7042 sout | i | fact | endl;7042 sout | i | fact; 7043 7043 } 7044 7044 } -
doc/working/exception/impl/exception.c
r5e49e47 rd0c91a6 243 243 244 244 // Get a function pointer from the relative offset and call it 245 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 245 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 246 246 247 247 _Unwind_Reason_Code (*matcher)() = … … 320 320 // on how the assembly works. 321 321 // Setup the personality routine 322 #if defined(__PIC__) 323 asm volatile (".cfi_personality 0x9b,CFA.ref.__gcfa_personality_v0"); 324 // Setup the exception table 325 asm volatile (".cfi_lsda 0x1b, .LLSDACFA2"); 326 #else 322 327 asm volatile (".cfi_personality 0x3,__gcfa_personality_v0"); 323 328 // Setup the exception table 324 329 asm volatile (".cfi_lsda 0x3, .LLSDACFA2"); 330 #endif 325 331 326 332 // Label which defines the start of the area for which the handler is setup … … 356 362 // Some more works need to be done if we want to have a single 357 363 // call to the try routine 364 #if defined(__PIC__) 365 asm ( 366 //HEADER 367 ".LFECFA1:\n" 368 " .globl __gcfa_personality_v0\n" 369 " .section .gcc_except_table,\"a\",@progbits\n" 370 ".LLSDACFA2:\n" //TABLE header 371 " .byte 0xff\n" 372 " .byte 0xff\n" 373 " .byte 0x1\n" 374 " .uleb128 .LLSDACSECFA2-.LLSDACSBCFA2\n" // BODY length 375 // Body uses language specific data and therefore could be modified arbitrarily 376 ".LLSDACSBCFA2:\n" // BODY start 377 " .uleb128 .TRYSTART-__try_terminate\n" // Handled area start (relative to start of function) 378 " .uleb128 .TRYEND-.TRYSTART\n" // Handled area length 379 " .uleb128 .CATCH-__try_terminate\n" // Handler landing pad adress (relative to start of function) 380 " .uleb128 1\n" // Action code, gcc seems to use always 0 381 ".LLSDACSECFA2:\n" // BODY end 382 " .text\n" // TABLE footer 383 " .size __try_terminate, .-__try_terminate\n" 384 ); 385 386 // Somehow this piece of helps with the resolution of debug symbols. 387 __attribute__((unused)) static const int dummy = 0; 388 asm ( 389 " .hidden CFA.ref.__gcfa_personality_v0\n" // Declare an new hidden symbol 390 " .weak CFA.ref.__gcfa_personality_v0\n" 391 " .section .data.rel.local.CFA.ref.__gcfa_personality_v0,\"awG\",@progbits,CFA.ref.__gcfa_personality_v0,comdat\n" // No clue what this does specifically 392 " .align 8\n" 393 " .type CFA.ref.__gcfa_personality_v0, @object\n" // Type of our hidden symbol (it's not actually the function itself) 394 " .size CFA.ref.__gcfa_personality_v0, 8\n" // Size of our hidden symbol 395 "CFA.ref.__gcfa_personality_v0:\n" 396 " .quad __gcfa_personality_v0\n" 397 ); 398 #else 358 399 asm ( 359 400 //HEADER … … 375 416 " .text\n" // TABLE footer 376 417 " .size __try_terminate, .-__try_terminate\n" 377 " .ident \"GCC: (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901\"\n"378 // " .section .note.GNU-stack,\"x\",@progbits\n"379 418 ); 419 #endif -
doc/working/exception/impl/pdc.s
r5e49e47 rd0c91a6 101 101 .text 102 102 .size foo, .-foo 103 .ident "GCC: (Ubuntu 7. 3.0-21ubuntu1~16.04) 7.3.0"103 .ident "GCC: (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0" 104 104 .section .note.GNU-stack,"",@progbits -
doc/working/exception/impl/pic.s
r5e49e47 rd0c91a6 1 1 .file "test.c" 2 2 .text 3 .Ltext0: 3 4 .globl clean 4 5 .type clean, @function 5 6 clean: 6 7 .LFB0: 8 .file 1 "test.c" 9 .loc 1 1 0 7 10 .cfi_startproc 8 11 pushq %rbp … … 12 15 .cfi_def_cfa_register 6 13 16 movq %rdi, -8(%rbp) 17 .loc 1 1 0 14 18 nop 15 19 popq %rbp … … 23 27 foo: 24 28 .LFB1: 29 .loc 1 4 0 25 30 .cfi_startproc 26 31 .cfi_personality 0x9b,DW.ref.__gcc_personality_v0 … … 39 44 .cfi_offset 3, -40 40 45 movl %edi, -52(%rbp) 46 .loc 1 4 0 41 47 movq %fs:40, %rax 42 48 movq %rax, -40(%rbp) 43 49 xorl %eax, %eax 50 .loc 1 6 0 44 51 movl -52(%rbp), %eax 45 52 movl %eax, %edi … … 50 57 movl $0, %r12d 51 58 .L7: 59 .loc 1 5 0 52 60 leaq -44(%rbp), %rax 53 61 movq %rax, %rdi … … 56 64 cmpl $1, %r12d 57 65 je .L4 66 .loc 1 6 0 58 67 movl %r13d, %eax 68 .loc 1 7 0 59 69 movq -40(%rbp), %rdx 60 70 xorq %fs:40, %rdx … … 64 74 movq %rax, %rbx 65 75 movl $1, %r12d 76 .loc 1 5 0 66 77 jmp .L7 67 78 .L4: … … 71 82 .LEHE1: 72 83 .L10: 84 .loc 1 7 0 73 85 call __stack_chk_fail@PLT 74 86 .L8: … … 101 113 .text 102 114 .size foo, .-foo 115 .Letext0: 116 .section .debug_info,"",@progbits 117 .Ldebug_info0: 118 .long 0x9c 119 .value 0x4 120 .long .Ldebug_abbrev0 121 .byte 0x8 122 .uleb128 0x1 123 .long .LASF0 124 .byte 0xc 125 .long .LASF1 126 .long .LASF2 127 .quad .Ltext0 128 .quad .Letext0-.Ltext0 129 .long .Ldebug_line0 130 .uleb128 0x2 131 .string "foo" 132 .byte 0x1 133 .byte 0x4 134 .long 0x68 135 .quad .LFB1 136 .quad .LFE1-.LFB1 137 .uleb128 0x1 138 .byte 0x9c 139 .long 0x68 140 .uleb128 0x3 141 .string "x" 142 .byte 0x1 143 .byte 0x4 144 .long 0x68 145 .uleb128 0x3 146 .byte 0x91 147 .sleb128 -68 148 .uleb128 0x4 149 .string "i" 150 .byte 0x1 151 .byte 0x5 152 .long 0x68 153 .uleb128 0x2 154 .byte 0x91 155 .sleb128 -60 156 .byte 0 157 .uleb128 0x5 158 .byte 0x4 159 .byte 0x5 160 .string "int" 161 .uleb128 0x6 162 .long .LASF3 163 .byte 0x1 164 .byte 0x1 165 .quad .LFB0 166 .quad .LFE0-.LFB0 167 .uleb128 0x1 168 .byte 0x9c 169 .long 0x99 170 .uleb128 0x3 171 .string "p" 172 .byte 0x1 173 .byte 0x1 174 .long 0x99 175 .uleb128 0x2 176 .byte 0x91 177 .sleb128 -24 178 .byte 0 179 .uleb128 0x7 180 .byte 0x8 181 .long 0x68 182 .byte 0 183 .section .debug_abbrev,"",@progbits 184 .Ldebug_abbrev0: 185 .uleb128 0x1 186 .uleb128 0x11 187 .byte 0x1 188 .uleb128 0x25 189 .uleb128 0xe 190 .uleb128 0x13 191 .uleb128 0xb 192 .uleb128 0x3 193 .uleb128 0xe 194 .uleb128 0x1b 195 .uleb128 0xe 196 .uleb128 0x11 197 .uleb128 0x1 198 .uleb128 0x12 199 .uleb128 0x7 200 .uleb128 0x10 201 .uleb128 0x17 202 .byte 0 203 .byte 0 204 .uleb128 0x2 205 .uleb128 0x2e 206 .byte 0x1 207 .uleb128 0x3f 208 .uleb128 0x19 209 .uleb128 0x3 210 .uleb128 0x8 211 .uleb128 0x3a 212 .uleb128 0xb 213 .uleb128 0x3b 214 .uleb128 0xb 215 .uleb128 0x27 216 .uleb128 0x19 217 .uleb128 0x49 218 .uleb128 0x13 219 .uleb128 0x11 220 .uleb128 0x1 221 .uleb128 0x12 222 .uleb128 0x7 223 .uleb128 0x40 224 .uleb128 0x18 225 .uleb128 0x2116 226 .uleb128 0x19 227 .uleb128 0x1 228 .uleb128 0x13 229 .byte 0 230 .byte 0 231 .uleb128 0x3 232 .uleb128 0x5 233 .byte 0 234 .uleb128 0x3 235 .uleb128 0x8 236 .uleb128 0x3a 237 .uleb128 0xb 238 .uleb128 0x3b 239 .uleb128 0xb 240 .uleb128 0x49 241 .uleb128 0x13 242 .uleb128 0x2 243 .uleb128 0x18 244 .byte 0 245 .byte 0 246 .uleb128 0x4 247 .uleb128 0x34 248 .byte 0 249 .uleb128 0x3 250 .uleb128 0x8 251 .uleb128 0x3a 252 .uleb128 0xb 253 .uleb128 0x3b 254 .uleb128 0xb 255 .uleb128 0x49 256 .uleb128 0x13 257 .uleb128 0x2 258 .uleb128 0x18 259 .byte 0 260 .byte 0 261 .uleb128 0x5 262 .uleb128 0x24 263 .byte 0 264 .uleb128 0xb 265 .uleb128 0xb 266 .uleb128 0x3e 267 .uleb128 0xb 268 .uleb128 0x3 269 .uleb128 0x8 270 .byte 0 271 .byte 0 272 .uleb128 0x6 273 .uleb128 0x2e 274 .byte 0x1 275 .uleb128 0x3f 276 .uleb128 0x19 277 .uleb128 0x3 278 .uleb128 0xe 279 .uleb128 0x3a 280 .uleb128 0xb 281 .uleb128 0x3b 282 .uleb128 0xb 283 .uleb128 0x27 284 .uleb128 0x19 285 .uleb128 0x11 286 .uleb128 0x1 287 .uleb128 0x12 288 .uleb128 0x7 289 .uleb128 0x40 290 .uleb128 0x18 291 .uleb128 0x2117 292 .uleb128 0x19 293 .uleb128 0x1 294 .uleb128 0x13 295 .byte 0 296 .byte 0 297 .uleb128 0x7 298 .uleb128 0xf 299 .byte 0 300 .uleb128 0xb 301 .uleb128 0xb 302 .uleb128 0x49 303 .uleb128 0x13 304 .byte 0 305 .byte 0 306 .byte 0 307 .section .debug_aranges,"",@progbits 308 .long 0x2c 309 .value 0x2 310 .long .Ldebug_info0 311 .byte 0x8 312 .byte 0 313 .value 0 314 .value 0 315 .quad .Ltext0 316 .quad .Letext0-.Ltext0 317 .quad 0 318 .quad 0 319 .section .debug_line,"",@progbits 320 .Ldebug_line0: 321 .section .debug_str,"MS",@progbits,1 322 .LASF0: 323 .string "GNU C11 7.4.0 -mtune=generic -march=x86-64 -g -fexceptions -fPIC -fstack-protector-strong" 324 .LASF2: 325 .string "/home/tdelisle/workspace/cforall/main/doc/working/exception/impl" 326 .LASF1: 327 .string "test.c" 328 .LASF3: 329 .string "clean" 103 330 .hidden DW.ref.__gcc_personality_v0 104 331 .weak DW.ref.__gcc_personality_v0 105 .section .data. DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat332 .section .data.rel.local.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat 106 333 .align 8 107 334 .type DW.ref.__gcc_personality_v0, @object … … 109 336 DW.ref.__gcc_personality_v0: 110 337 .quad __gcc_personality_v0 111 .ident "GCC: (Ubuntu 7. 3.0-21ubuntu1~16.04) 7.3.0"338 .ident "GCC: (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0" 112 339 .section .note.GNU-stack,"",@progbits -
driver/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 20 # applies to both programs -
driver/Makefile.in
r5e49e47 rd0c91a6 96 96 subdir = driver 97 97 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 98 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 99 $(top_srcdir)/configure.ac 98 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 99 $(top_srcdir)/automake/ltoptions.m4 \ 100 $(top_srcdir)/automake/ltsugar.m4 \ 101 $(top_srcdir)/automake/ltversion.m4 \ 102 $(top_srcdir)/automake/lt~obsolete.m4 \ 103 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 100 104 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 101 105 $(ACLOCAL_M4) … … 110 114 as_OBJECTS = $(am_as_OBJECTS) 111 115 as_LDADD = $(LDADD) 116 AM_V_lt = $(am__v_lt_@AM_V@) 117 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 118 am__v_lt_0 = --silent 119 am__v_lt_1 = 112 120 am_cc1_OBJECTS = cc1.$(OBJEXT) 113 121 cc1_OBJECTS = $(am_cc1_OBJECTS) … … 134 142 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 135 143 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 144 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 145 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 146 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 147 $(AM_CXXFLAGS) $(CXXFLAGS) 136 148 AM_V_CXX = $(am__v_CXX_@AM_V@) 137 149 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) … … 139 151 am__v_CXX_1 = 140 152 CXXLD = $(CXX) 141 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 142 -o $@ 153 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 154 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 155 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 143 156 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 144 157 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) … … 177 190 AMTAR = @AMTAR@ 178 191 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 192 AR = @AR@ 179 193 AUTOCONF = @AUTOCONF@ 180 194 AUTOHEADER = @AUTOHEADER@ 181 195 AUTOMAKE = @AUTOMAKE@ 182 196 AWK = @AWK@ 183 BACKEND_CC = @BACKEND_CC@184 197 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 185 198 CC = @CC@ … … 201 214 CPPFLAGS = @CPPFLAGS@ 202 215 CXX = @CXX@ 216 CXXCPP = @CXXCPP@ 203 217 CXXDEPMODE = @CXXDEPMODE@ 204 218 CXXFLAGS = @CXXFLAGS@ … … 206 220 DEFS = @DEFS@ 207 221 DEPDIR = @DEPDIR@ 222 DLLTOOL = @DLLTOOL@ 208 223 DRIVER_DIR = @DRIVER_DIR@ 224 DSYMUTIL = @DSYMUTIL@ 225 DUMPBIN = @DUMPBIN@ 209 226 ECHO_C = @ECHO_C@ 210 227 ECHO_N = @ECHO_N@ … … 212 229 EGREP = @EGREP@ 213 230 EXEEXT = @EXEEXT@ 231 FGREP = @FGREP@ 214 232 GREP = @GREP@ 215 233 HOST_FLAGS = @HOST_FLAGS@ … … 219 237 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 220 238 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 239 LD = @LD@ 221 240 LDFLAGS = @LDFLAGS@ 222 241 LEX = @LEX@ … … 227 246 LIBOBJS = @LIBOBJS@ 228 247 LIBS = @LIBS@ 248 LIBTOOL = @LIBTOOL@ 249 LIPO = @LIPO@ 250 LN_S = @LN_S@ 229 251 LTLIBOBJS = @LTLIBOBJS@ 252 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 230 253 MAKEINFO = @MAKEINFO@ 254 MANIFEST_TOOL = @MANIFEST_TOOL@ 231 255 MKDIR_P = @MKDIR_P@ 256 NM = @NM@ 257 NMEDIT = @NMEDIT@ 258 OBJDUMP = @OBJDUMP@ 232 259 OBJEXT = @OBJEXT@ 260 OTOOL = @OTOOL@ 261 OTOOL64 = @OTOOL64@ 233 262 PACKAGE = @PACKAGE@ 234 263 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 240 269 PATH_SEPARATOR = @PATH_SEPARATOR@ 241 270 RANLIB = @RANLIB@ 271 SED = @SED@ 242 272 SET_MAKE = @SET_MAKE@ 243 273 SHELL = @SHELL@ … … 251 281 abs_top_builddir = @abs_top_builddir@ 252 282 abs_top_srcdir = @abs_top_srcdir@ 283 ac_ct_AR = @ac_ct_AR@ 253 284 ac_ct_CC = @ac_ct_CC@ 254 285 ac_ct_CXX = @ac_ct_CXX@ 286 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 255 287 am__include = @am__include@ 256 288 am__leading_dot = @am__leading_dot@ … … 300 332 top_srcdir = @top_srcdir@ 301 333 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 334 ACLOCAL_AMFLAGS = -I automake 302 335 303 336 # applies to both programs … … 313 346 314 347 .SUFFIXES: 315 .SUFFIXES: .cc . o .obj348 .SUFFIXES: .cc .lo .o .obj 316 349 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 317 350 @for dep in $?; do \ … … 353 386 sed 's/$(EXEEXT)$$//' | \ 354 387 while read p p1; do if test -f $$p \ 388 || test -f $$p1 \ 355 389 ; then echo "$$p"; echo "$$p"; else :; fi; \ 356 390 done | \ … … 367 401 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 368 402 test -z "$$files" || { \ 369 echo " $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cc1libdir)$$dir'"; \370 $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cc1libdir)$$dir" || exit $$?; \403 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cc1libdir)$$dir'"; \ 404 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cc1libdir)$$dir" || exit $$?; \ 371 405 } \ 372 406 ; done … … 384 418 385 419 clean-cc1libPROGRAMS: 386 -test -z "$(cc1lib_PROGRAMS)" || rm -f $(cc1lib_PROGRAMS) 420 @list='$(cc1lib_PROGRAMS)'; test -n "$$list" || exit 0; \ 421 echo " rm -f" $$list; \ 422 rm -f $$list || exit $$?; \ 423 test -n "$(EXEEXT)" || exit 0; \ 424 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 425 echo " rm -f" $$list; \ 426 rm -f $$list 387 427 388 428 clean-noinstPROGRAMS: 389 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) 429 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ 430 echo " rm -f" $$list; \ 431 rm -f $$list || exit $$?; \ 432 test -n "$(EXEEXT)" || exit 0; \ 433 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 434 echo " rm -f" $$list; \ 435 rm -f $$list 390 436 391 437 as$(EXEEXT): $(as_OBJECTS) $(as_DEPENDENCIES) $(EXTRA_as_DEPENDENCIES) … … 426 472 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 427 473 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 474 475 .cc.lo: 476 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 477 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 478 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 479 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 480 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 481 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 482 483 mostlyclean-libtool: 484 -rm -f *.lo 485 486 clean-libtool: 487 -rm -rf .libs _libs 428 488 429 489 ID: $(am__tagged_files) … … 549 609 clean: clean-am 550 610 551 clean-am: clean-cc1libPROGRAMS clean-generic clean- noinstPROGRAMS\552 mostlyclean-am611 clean-am: clean-cc1libPROGRAMS clean-generic clean-libtool \ 612 clean-noinstPROGRAMS mostlyclean-am 553 613 554 614 distclean: distclean-am … … 606 666 mostlyclean: mostlyclean-am 607 667 608 mostlyclean-am: mostlyclean-compile mostlyclean-generic 668 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 669 mostlyclean-libtool 609 670 610 671 pdf: pdf-am … … 622 683 623 684 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 624 clean-cc1libPROGRAMS clean-generic clean-noinstPROGRAMS \ 625 cscopelist-am ctags ctags-am distclean distclean-compile \ 626 distclean-generic distclean-tags distdir dvi dvi-am html \ 627 html-am info info-am install install-am install-cc1libPROGRAMS \ 628 install-data install-data-am install-dvi install-dvi-am \ 629 install-exec install-exec-am install-exec-hook install-html \ 630 install-html-am install-info install-info-am install-man \ 631 install-pdf install-pdf-am install-ps install-ps-am \ 632 install-strip installcheck installcheck-am installdirs \ 633 maintainer-clean maintainer-clean-generic mostlyclean \ 634 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 685 clean-cc1libPROGRAMS clean-generic clean-libtool \ 686 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ 687 distclean-compile distclean-generic distclean-libtool \ 688 distclean-tags distdir dvi dvi-am html html-am info info-am \ 689 install install-am install-cc1libPROGRAMS install-data \ 690 install-data-am install-dvi install-dvi-am install-exec \ 691 install-exec-am install-exec-hook install-html install-html-am \ 692 install-info install-info-am install-man install-pdf \ 693 install-pdf-am install-ps install-ps-am install-strip \ 694 installcheck installcheck-am installdirs maintainer-clean \ 695 maintainer-clean-generic mostlyclean mostlyclean-compile \ 696 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 635 697 tags tags-am uninstall uninstall-am uninstall-cc1libPROGRAMS \ 636 698 uninstall-hook -
driver/as.cc
r5e49e47 rd0c91a6 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 6 // 7 7 // as.c -- map assembler file, scan for debug information. If found, expand file by one character and insert Cforall 8 8 // language code on the N line from the start of the debug information. 9 // 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Wed Aug 1 10:49:42 2018 … … 13 13 // Last Modified On : Sat Sep 8 08:40:16 2018 14 14 // Update Count : 97 15 // 15 // 16 16 17 17 #include <cstdio> // perror … … 45 45 46 46 if ( size ) { // cannot map 0 sized file 47 char * start = (char *)mmap( NULL, size , PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );47 char * start = (char *)mmap( NULL, size + 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 ); 48 48 if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); }; 49 49 … … 65 65 } // if 66 66 67 if ( munmap( start, size ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk67 if ( munmap( start, size + 2 ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk 68 68 } // if 69 69 -
examples/ArrayN.c
r5e49e47 rd0c91a6 7 7 8 8 forall(otype index_t) 9 index_t offset_to_index(unsigned offset, index_t size) 10 { 9 index_t offset_to_index(unsigned offset, index_t size) { 11 10 return [offset / size.0, offset % size.1]; 12 11 } 13 12 14 int main(int argc, char* argv[]) 15 { 13 int main(int argc, char* argv[]) { 16 14 unsigned x = 0, y = 0, i = 0; 17 15 unsigned sx = 4, sy = 4; … … 20 18 [x, y] = offset_to_index(6, [sx, sy]); 21 19 22 sout | x | ' ' | y | endl;20 sout | x | ' ' | y; 23 21 24 22 return 0; -
examples/gc_no_raii/src/internal/collector.c
r5e49e47 rd0c91a6 38 38 void* gc_allocate(size_t target_size) 39 39 { 40 // sout | "Allocating " | target_size | " bytes" | endl;40 // sout | "Allocating " | target_size | " bytes"; 41 41 42 42 size_t size = gc_compute_size(target_size + sizeof(gc_object_header)); 43 43 44 // sout | "Object header size: " | sizeof(gc_object_header) | " bytes" | endl;45 // sout | "Actual allocation size: " | size | " bytes" | endl;44 // sout | "Object header size: " | sizeof(gc_object_header) | " bytes"; 45 // sout | "Actual allocation size: " | size | " bytes"; 46 46 47 47 check(size < POOL_SIZE_BYTES); -
examples/gc_no_raii/src/internal/state.h
r5e49e47 rd0c91a6 38 38 static inline bool gc_needs_collect(gc_state* state) 39 39 { 40 // sout | "Used Space: " | state->used_space | " bytes" | endl;40 // sout | "Used Space: " | state->used_space | " bytes"; 41 41 return state->used_space * 2 > state->total_space; 42 42 } -
examples/gc_no_raii/src/tools/print.h
r5e49e47 rd0c91a6 5 5 // #include <fstream.hfa> 6 6 // 7 // #define DEBUG_OUT(x) sout | x | endl;7 // #define DEBUG_OUT(x) sout | x; 8 8 // 9 9 // #else -
examples/multicore.c
r5e49e47 rd0c91a6 15 15 16 16 int main(int argc, char* argv[]) { 17 // sout | "User main begin" | endl;17 // sout | "User main begin"; 18 18 { 19 19 processor p; … … 22 22 } 23 23 } 24 // sout | "User main end" | endl;24 // sout | "User main end"; 25 25 } -
examples/prolog.c
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 8 22:09:39 201613 // Update Count : 512 // Last Modified On : Tue Dec 11 23:27:19 2018 13 // Update Count : 6 14 14 // 15 15 16 16 #include <fstream.hfa> 17 17 18 void printResult( int x ) { sout | "int" | endl; }19 void printResult( double x ) { sout | "double" | endl; }20 void printResult( char * x ) { sout | "char*" | endl; }18 void printResult( int x ) { sout | "int"; } 19 void printResult( double x ) { sout | "double"; } 20 void printResult( char * x ) { sout | "char*"; } 21 21 22 22 void is_arithmetic( int x ) {} -
examples/quad.c
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 8 22:07:02 201613 // Update Count : 812 // Last Modified On : Tue Dec 11 23:26:58 2018 13 // Update Count : 9 14 14 // 15 15 … … 28 28 int main() { 29 29 int N = 2; 30 sout | "result of quad of" | N | "is" | quad( N ) | endl;30 sout | "result of quad of" | N | "is" | quad( N ); 31 31 } 32 32 -
examples/square.c
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 8 22:05:48 201613 // Update Count : 2 712 // Last Modified On : Tue Dec 11 23:28:24 2018 13 // Update Count : 28 14 14 // 15 15 … … 23 23 int main() { 24 24 #if 0 25 sout | "result of squaring 9 is " | endl;25 sout | "result of squaring 9 is "; 26 26 27 27 // char does not have multiplication. … … 30 30 } // ?*? 31 31 char c = 9; 32 sout | "char\t\t\t" | square( c ) | endl;32 sout | "char\t\t\t" | square( c ); 33 33 34 sout | square( s ) | endl;34 sout | square( s ); 35 35 #endif 36 36 short s = 9; … … 38 38 #if 0 39 39 signed int i = 9; 40 sout | "signed int\t\t" | square( i ) | endl;40 sout | "signed int\t\t" | square( i ); 41 41 42 42 unsigned int ui = 9; 43 sout | "unsigned int\t\t" | square( ui ) | endl;43 sout | "unsigned int\t\t" | square( ui ); 44 44 45 45 long int li = 9; 46 sout | "signed long int\t\t" | square( li ) | endl;46 sout | "signed long int\t\t" | square( li ); 47 47 48 48 unsigned long int uli = 9; 49 sout | "unsigned long int\t" | square( uli ) | endl;49 sout | "unsigned long int\t" | square( uli ); 50 50 51 51 signed long long int lli = 9; 52 sout | "signed long long int\t" | square( lli ) | endl;52 sout | "signed long long int\t" | square( lli ); 53 53 54 54 unsigned long long int ulli = 9; 55 sout | "unsigned long long int\t" | square( ulli ) | endl;55 sout | "unsigned long long int\t" | square( ulli ); 56 56 57 57 float f = 9.0; 58 sout | "float\t\t\t" | square( f ) | endl;58 sout | "float\t\t\t" | square( f ); 59 59 60 60 double d = 9.0; 61 sout | "double\t\t\t" | square( d ) | endl;61 sout | "double\t\t\t" | square( d ); 62 62 63 63 long double ld = 9.0; 64 sout | "long double\t\t" | square( ld ) | endl;64 sout | "long double\t\t" | square( ld ); 65 65 #endif 66 66 } // main -
examples/twice.c
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Oct 19 21:52:57 201713 // Update Count : 4 612 // Last Modified On : Tue Dec 11 23:28:08 2018 13 // Update Count : 47 14 14 // 15 15 … … 28 28 29 29 int main( void ) { 30 sout | twice( ' ' ) | ' ' | twice( (signed char)0 ) | twice( (int)1 ) | twice( 3.2 ) | endl;30 sout | twice( ' ' ) | ' ' | twice( (signed char)0 ) | twice( (int)1 ) | twice( 3.2 ); 31 31 } 32 32 -
examples/wrapper/src/main.c
r5e49e47 rd0c91a6 1 1 #include "pointer.h" 2 2 3 wrapper_t make_copy(wrapper_t copy) 4 { 3 wrapper_t make_copy(wrapper_t copy) { 5 4 return copy; 6 5 } 7 6 8 int main(int argc, char const *argv[]) 9 { 7 int main(int argc, char const *argv[]) { 10 8 wrapper_t p = wrap(6); 11 12 sout | endl | "test started" | endl; 13 9 sout | nl | "test started"; 14 10 wrapper_t p2 = p; 15 16 11 clear(&p); 17 18 12 p = p2; 19 20 13 wrapper_t p3 = make_copy(p2); 21 22 sout | endl | "test ended" | endl; 23 14 sout | nl | "test ended"; 24 15 return 0; 25 16 } -
examples/wrapper/src/pointer.h
r5e49e47 rd0c91a6 34 34 void ?{}(content_t* this) 35 35 { 36 sout | "Constructing content" | endl;36 sout | "Constructing content"; 37 37 this->count = 0; 38 38 } … … 40 40 void ^?{}(content_t* this) 41 41 { 42 sout | "Destroying content" | endl;42 sout | "Destroying content"; 43 43 } 44 44 … … 53 53 void ?{}(wrapper_t* this) 54 54 { 55 sout | "Constructing empty ref pointer" | endl | endl;55 sout | "Constructing empty ref pointer" | nl; 56 56 this->ptr = NULL; 57 57 } … … 59 59 void ?{}(wrapper_t* this, wrapper_t rhs) 60 60 { 61 sout | "Constructing ref pointer from copy" | endl;61 sout | "Constructing ref pointer from copy"; 62 62 this->ptr = rhs.ptr; 63 63 this->ptr->count++; 64 sout | "Reference is " | this->ptr->count | endl | endl;64 sout | "Reference is " | this->ptr->count | nl; 65 65 } 66 66 … … 69 69 if(this->ptr) 70 70 { 71 sout | "Destroying ref pointer" | endl;71 sout | "Destroying ref pointer"; 72 72 this->ptr->count--; 73 sout | "Reference is " | this->ptr->count | endl | endl;73 sout | "Reference is " | this->ptr->count | nl; 74 74 if(!this->ptr->count) delete(this->ptr); 75 75 } 76 76 else 77 77 { 78 sout | "Destroying empty ref pointer" | endl | endl;78 sout | "Destroying empty ref pointer" | nl; 79 79 } 80 80 } … … 82 82 wrapper_t ?=?(wrapper_t* this, wrapper_t rhs) 83 83 { 84 sout | "Setting ref pointer" | endl;84 sout | "Setting ref pointer"; 85 85 if(this->ptr) 86 86 { 87 87 this->ptr->count--; 88 sout | "Reference is " | this->ptr->count | endl | endl;88 sout | "Reference is " | this->ptr->count | nl; 89 89 if(!this->ptr->count) delete(this->ptr); 90 90 } 91 91 this->ptr = rhs.ptr; 92 92 this->ptr->count++; 93 sout | "Reference is " | this->ptr->count | endl | endl;93 sout | "Reference is " | this->ptr->count | nl; 94 94 } 95 95 … … 98 98 this->ptr = c; 99 99 this->ptr->count++; 100 sout | "Setting ref pointer" | endl;101 sout | "Reference is " | this->ptr->count | endl | endl;100 sout | "Setting ref pointer"; 101 sout | "Reference is " | this->ptr->count | nl; 102 102 } 103 103 104 104 void clear(wrapper_t* this) 105 105 { 106 sout | "Clearing ref pointer" | endl;106 sout | "Clearing ref pointer"; 107 107 this->ptr->count--; 108 sout | "Reference is " | this->ptr->count | endl | endl;108 sout | "Reference is " | this->ptr->count | nl; 109 109 if(!this->ptr->count) delete(this->ptr); 110 110 this->ptr = NULL; -
examples/zero_one.c
r5e49e47 rd0c91a6 3 3 void foo(zero_t o) 4 4 { 5 sout | "It's a Zero!" | endl;5 sout | "It's a Zero!"; 6 6 } 7 7 8 8 void foo(one_t o) 9 9 { 10 sout | "It's a One!" | endl;10 sout | "It's a One!"; 11 11 } 12 12 13 13 void foo(int o) 14 14 { 15 sout | "It's a Number!" | endl;15 sout | "It's a Number!"; 16 16 } 17 17 -
libcfa/configure
r5e49e47 rd0c91a6 2970 2970 CONFIG_CFAFLAGS="-nodebug" 2971 2971 CONFIG_BUILDLIB="no" 2972 ;; 2973 *) 2974 as_fn_error $? "'Invalid value $CONFIGURATION for \$CONFIGURATION'" "$LINENO" 5 2972 2975 ;; 2973 2976 esac … … 16773 16776 16774 16777 16778 16775 16779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 16776 16780 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -
libcfa/configure.ac
r5e49e47 rd0c91a6 59 59 CONFIG_BUILDLIB="no" 60 60 ;; 61 *) 62 AC_MSG_ERROR('Invalid value $CONFIGURATION for \$CONFIGURATION') 63 ;; 61 64 esac 62 65 … … 81 84 AC_PROG_CC 82 85 AM_PROG_AS 86 AC_PROG_LIBTOOL 83 87 AC_PROG_INSTALL 84 88 AC_PROG_MAKE_SET -
libcfa/src/Makefile.am
r5e49e47 rd0c91a6 68 68 libdeps = $(join \ 69 69 $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ 70 $(notdir ${libobjs:.lo=.P o}) \70 $(notdir ${libobjs:.lo=.Plo}) \ 71 71 ) 72 72 … … 74 74 75 75 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ 76 ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@}76 ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} 77 77 78 78 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ 79 79 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 80 @CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@}80 @CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} 81 81 82 82 -
libcfa/src/Makefile.in
r5e49e47 rd0c91a6 407 407 am__v_CFA_0 = @echo " CFA " $@; 408 408 am__v_CFA_1 = 409 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@) 410 am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@) 411 am__v_JAVAC_0 = @echo " JAVAC " $@; 412 am__v_JAVAC_1 = 413 AM_V_GOC = $(am__v_GOC_@AM_V@) 414 am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@) 415 am__v_GOC_0 = @echo " GOC " $@; 416 am__v_GOC_1 = 417 UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS) 418 AM_V_UPP = $(am__v_UPP_@AM_V@) 419 am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@) 420 am__v_UPP_0 = @echo " UPP " $@; 421 am__v_UPP_1 = 409 422 lib_LTLIBRARIES = libcfa.la 410 423 … … 453 466 libdeps = $(join \ 454 467 $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ 455 $(notdir ${libobjs:.lo=.P o}) \468 $(notdir ${libobjs:.lo=.Plo}) \ 456 469 ) 457 470 … … 912 925 913 926 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ 914 ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@}927 ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} 915 928 916 929 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ 917 930 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 918 @CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@}931 @CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} 919 932 920 933 #---------------------------------------------------------------------------------------------------------------- -
libcfa/src/bits/locks.hfa
r5e49e47 rd0c91a6 37 37 #endif 38 38 39 #if defined( __i386 ) || defined( __x86_64 ) || defined( __ARM_ARCH )40 // Intel recommendation41 #define __ALIGN__ __attribute__(( aligned (128) ))42 #elif defined( __sparc )43 #define __ALIGN__ CALIGN44 #else45 #error unsupported architecture46 #endif47 48 39 struct __spinlock_t { 49 40 // Wrap in struct to prevent false sharing with debug info 50 struct { 51 // Align lock on 128-bit boundary 52 __ALIGN__ volatile bool lock; 53 }; 41 volatile bool lock; 54 42 #ifdef __CFA_DEBUG__ 55 43 // previous function to acquire the lock … … 58 46 void* prev_thrd; 59 47 #endif 60 } __ALIGN__;48 }; 61 49 62 50 #ifdef __cforall -
libcfa/src/concurrency/coroutine.cfa
r5e49e47 rd0c91a6 22 22 #include <string.h> 23 23 #include <unistd.h> 24 // use this define to make unwind.h play nice, definetely a hack 25 #define HIDE_EXPORTS 26 #include <unwind.h> 27 #undef HIDE_EXPORTS 24 28 #include <sys/mman.h> 25 29 } … … 29 33 #define __CFA_INVOKE_PRIVATE__ 30 34 #include "invoke.h" 35 36 extern "C" { 37 void _CtxCoroutine_Unwind(struct _Unwind_Exception * storage) __attribute__ ((__noreturn__)); 38 static void _CtxCoroutine_UnwindCleanup(_Unwind_Reason_Code, struct _Unwind_Exception *) __attribute__ ((__noreturn__)); 39 static void _CtxCoroutine_UnwindCleanup(_Unwind_Reason_Code, struct _Unwind_Exception *) { 40 abort(); 41 } 42 } 31 43 32 44 //----------------------------------------------------------------------------- … … 67 79 starter = NULL; 68 80 last = NULL; 69 } 70 71 void ^?{}(coroutine_desc& this) {} 81 cancellation = NULL; 82 } 83 84 void ^?{}(coroutine_desc& this) { 85 if(this.state != Halted) { 86 coroutine_desc * src = TL_GET( this_coroutine ); 87 coroutine_desc * dst = &this; 88 89 struct _Unwind_Exception storage; 90 storage.exception_class = -1; 91 storage.exception_cleanup = _CtxCoroutine_UnwindCleanup; 92 this.cancellation = &storage; 93 this.last = src; 94 95 // not resuming self ? 96 if ( src == dst ) { 97 abort( "Attempt by coroutine %.256s (%p) to terminate itself.\n", src->name, src ); 98 } 99 100 CoroutineCtxSwitch( src, dst ); 101 } 102 } 72 103 73 104 // Part of the Public API … … 105 136 // Safety note : This could cause some false positives due to preemption 106 137 verify( TL_GET( preemption_state.enabled ) || TL_GET( this_processor )->do_terminate ); 138 139 if( unlikely(src->cancellation != NULL) ) { 140 _CtxCoroutine_Unwind(src->cancellation); 141 } 107 142 } //ctxSwitchDirect 108 143 … … 162 197 } 163 198 164 void __leave_coroutine( void) {199 void __leave_coroutine() { 165 200 coroutine_desc * src = TL_GET( this_coroutine ); // optimization 166 167 assertf( src->starter != 0, 201 coroutine_desc * starter = src->cancellation != 0 ? src->last : src->starter; 202 203 src->state = Halted; 204 205 assertf( starter != 0, 168 206 "Attempt to suspend/leave coroutine \"%.256s\" (%p) that has never been resumed.\n" 169 207 "Possible cause is a suspend executed in a member called by a coroutine user rather than by the coroutine main.", 170 208 src->name, src ); 171 assertf( s rc->starter->state != Halted,209 assertf( starter->state != Halted, 172 210 "Attempt by coroutine \"%.256s\" (%p) to suspend/leave back to terminated coroutine \"%.256s\" (%p).\n" 173 211 "Possible cause is terminated coroutine's main routine has already returned.", 174 src->name, src, s rc->starter->name, src->starter );175 176 CoroutineCtxSwitch( src, s rc->starter );212 src->name, src, starter->name, starter ); 213 214 CoroutineCtxSwitch( src, starter ); 177 215 } 178 216 } -
libcfa/src/concurrency/invoke.c
r5e49e47 rd0c91a6 17 17 #include <stdlib.h> 18 18 #include <stdio.h> 19 #include <unwind.h> 19 20 20 21 #include "invoke.h" … … 50 51 main( this ); 51 52 52 cor->state = Halted;53 54 53 //Final suspend, should never return 55 54 __leave_coroutine(); 56 55 __cabi_abort( "Resumed dead coroutine" ); 56 } 57 58 static _Unwind_Reason_Code _CtxCoroutine_UnwindStop( 59 __attribute((__unused__)) int version, 60 _Unwind_Action actions, 61 __attribute((__unused__)) _Unwind_Exception_Class exceptionClass, 62 __attribute((__unused__)) struct _Unwind_Exception * unwind_exception, 63 __attribute((__unused__)) struct _Unwind_Context * context, 64 __attribute((__unused__)) void * param 65 ) { 66 if( actions & _UA_END_OF_STACK ) { 67 // We finished unwinding the coroutine, 68 // leave it 69 __leave_coroutine(); 70 __cabi_abort( "Resumed dead coroutine" ); 71 } 72 if( actions & _UA_CLEANUP_PHASE ) return _URC_NO_REASON; 73 74 return _URC_FATAL_PHASE2_ERROR; 75 } 76 77 void _CtxCoroutine_Unwind(struct _Unwind_Exception * storage) __attribute__ ((__noreturn__)); 78 void _CtxCoroutine_Unwind(struct _Unwind_Exception * storage) { 79 _Unwind_Reason_Code ret = _Unwind_ForcedUnwind( storage, _CtxCoroutine_UnwindStop, NULL ); 80 printf("UNWIND ERROR %d after force unwind\n", ret); 81 abort(); 57 82 } 58 83 -
libcfa/src/concurrency/invoke.h
r5e49e47 rd0c91a6 80 80 81 81 struct coroutine_desc { 82 struct coStack_t stack; // stack information of the coroutine 83 const char * name; // textual name for coroutine/task, initialized by uC++ generated code 84 int errno_; // copy of global UNIX variable errno 85 enum coroutine_state state; // current execution status for coroutine 86 struct coroutine_desc * starter; // first coroutine to resume this one 87 struct coroutine_desc * last; // last coroutine to resume this one 88 }; 89 82 // stack information of the coroutine 83 struct coStack_t stack; 84 85 // textual name for coroutine/task, initialized by uC++ generated code 86 const char * name; 87 88 // copy of global UNIX variable errno 89 int errno_; 90 91 // current execution status for coroutine 92 enum coroutine_state state; 93 // first coroutine to resume this one 94 struct coroutine_desc * starter; 95 96 // last coroutine to resume this one 97 struct coroutine_desc * last; 98 99 // If non-null stack must be unwound with this exception 100 struct _Unwind_Exception * cancellation; 101 102 }; 103 104 // struct which calls the monitor is accepting 90 105 struct __waitfor_mask_t { 91 106 // the index of the accepted function, -1 if none -
libcfa/src/fstream.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 10 18:19:40201813 // Update Count : 28412 // Last Modified On : Mon Dec 24 18:33:38 2018 13 // Update Count : 304 14 14 // 15 15 … … 20 20 #include <stdarg.h> // varargs 21 21 #include <string.h> // strlen 22 #include <stdbool.h> // true/false23 22 #include <float.h> // DBL_DIG, LDBL_DIG 24 23 #include <complex.h> // creal, cimag … … 27 26 #define IO_MSG "I/O error: " 28 27 29 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, const char * separator, const char * tupleSeparator ) {28 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, bool nlOnOff, bool prt, const char * separator, const char * tupleSeparator ) { 30 29 os.file = file; 31 30 os.sepDefault = sepDefault; 32 31 os.sepOnOff = sepOnOff; 32 os.nlOnOff = nlOnOff; 33 os.prt = prt; 33 34 sepSet( os, separator ); 34 35 sepSetCur( os, sepGet( os ) ); … … 44 45 bool getNL( ofstream & os ) { return os.sawNL; } 45 46 void setNL( ofstream & os, bool state ) { os.sawNL = state; } 47 bool getANL( ofstream & os ) { return os.nlOnOff; } 48 bool getPrt( ofstream & os ) { return os.prt; } 49 void setPrt( ofstream & os, bool state ) { os.prt = state; } 46 50 47 51 // public … … 72 76 } // sepEnable 73 77 78 void nlOn( ofstream & os ) { os.nlOnOff = true; } 79 void nlOff( ofstream & os ) { os.nlOnOff = false; } 80 74 81 const char * sepGet( ofstream & os ) { return os.separator; } 75 82 void sepSet( ofstream & os, const char * s ) { … … 103 110 } // if 104 111 #endif // __CFA_DEBUG__ 105 (os){ file, true, false, " ", ", " };112 (os){ file, true, false, true, false, " ", ", " }; 106 113 } // open 107 114 … … 143 150 va_end( args ); 144 151 152 setPrt( os, true ); // called in output cascade 145 153 sepReset( os ); // reset separator 146 154 return len; 147 155 } // fmt 148 156 149 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, " ", ", " };157 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, true, false, " ", ", " }; 150 158 ofstream & sout = soutFile; 151 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, " ", ", " };159 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, true, false, " ", ", " }; 152 160 ofstream & serr = serrFile; 153 161 -
libcfa/src/fstream.hfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 11 13:54:27201813 // Update Count : 1 3212 // Last Modified On : Mon Dec 24 18:33:41 2018 13 // Update Count : 149 14 14 // 15 15 … … 23 23 bool sepDefault; 24 24 bool sepOnOff; 25 bool nlOnOff; 26 bool prt; // print text 25 27 bool sawNL; 26 28 const char * sepCur; … … 37 39 bool getNL( ofstream & ); 38 40 void setNL( ofstream &, bool ); 41 bool getANL( ofstream & ); 42 bool getPrt( ofstream & ); 43 void setPrt( ofstream &, bool ); 39 44 40 45 // public … … 43 48 bool sepDisable( ofstream & ); 44 49 bool sepEnable( ofstream & ); 50 void nlOn( ofstream & ); 51 void nlOff( ofstream & ); 45 52 46 53 const char * sepGet( ofstream & ); … … 55 62 void close( ofstream & ); 56 63 ofstream & write( ofstream &, const char * data, size_t size ); 57 int fmt( ofstream &, const char f mt[], ... );64 int fmt( ofstream &, const char format[], ... ); 58 65 59 66 void ?{}( ofstream & os ); … … 76 83 ifstream & read( ifstream & is, char * data, size_t size ); 77 84 ifstream & ungetc( ifstream & is, char c ); 78 int fmt( ifstream &, const char f mt[], ... );85 int fmt( ifstream &, const char format[], ... ); 79 86 80 87 void ?{}( ifstream & is ); -
libcfa/src/gmp.hfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Apr 19 08:43:43 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Dec 7 09:10:41 201713 // Update Count : 2 112 // Last Modified On : Tue Dec 4 23:25:51 2018 13 // Update Count : 22 14 14 // 15 15 … … 262 262 } // ?|? 263 263 264 static inline forall( dtype ostype | ostream( ostype ) ) 265 ostype & ?|?( ostype & os, Int mp ) { 266 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 267 gmp_printf( "%Zd", mp.mpz ); 268 sepOn( os ); 269 return os; 270 } // ?|? 264 static inline forall( dtype ostype | ostream( ostype ) ) { 265 ostype & ?|?( ostype & os, Int mp ) { 266 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 267 gmp_printf( "%Zd", mp.mpz ); 268 sepOn( os ); 269 return os; 270 } // ?|? 271 272 void ?|?( ostype & os, Int mp ) { 273 (ostype)(os | mp); if ( getANL( os ) ) nl( os ); 274 } // ?|? 275 } // distribution 271 276 272 277 // Local Variables: // -
libcfa/src/iostream.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Nov 2 07:17:05201813 // Update Count : 47412 // Last Modified On : Mon Dec 24 18:33:40 2018 13 // Update Count : 589 14 14 // 15 15 … … 19 19 #include <stdio.h> 20 20 #include <stdbool.h> // true/false 21 //#include <string.h> 21 //#include <string.h> // strlen, strcmp 22 22 extern int strcmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 23 23 extern size_t strlen (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); … … 32 32 return os; 33 33 } // ?|? 34 35 ostype & ?|?( ostype & os, char ch ) { 36 fmt( os, "%c", ch ); 37 if ( ch == '\n' ) setNL( os, true ); 38 sepOff( os ); 39 return os; 40 } // ?|? 41 42 ostype & ?|?( ostype & os, signed char c ) { 43 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 44 fmt( os, "%hhd", c ); 45 return os; 46 } // ?|? 47 48 ostype & ?|?( ostype & os, unsigned char c ) { 49 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 50 fmt( os, "%hhu", c ); 51 return os; 34 void ?|?( ostype & os, bool b ) { 35 (ostype &)(os | b); nl( os ); 36 } // ?|? 37 38 ostype & ?|?( ostype & os, char c ) { 39 fmt( os, "%c", c ); 40 if ( c == '\n' ) setNL( os, true ); 41 return sepOff( os ); 42 } // ?|? 43 void ?|?( ostype & os, char c ) { 44 (ostype &)(os | c); nl( os ); 45 } // ?|? 46 47 ostype & ?|?( ostype & os, signed char sc ) { 48 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 49 fmt( os, "%hhd", sc ); 50 return os; 51 } // ?|? 52 void ?|?( ostype & os, signed char sc ) { 53 (ostype &)(os | sc); nl( os ); 54 } // ?|? 55 56 ostype & ?|?( ostype & os, unsigned char usc ) { 57 if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); 58 fmt( os, "%hhu", usc ); 59 return os; 60 } // ?|? 61 void ?|?( ostype & os, unsigned char usc ) { 62 (ostype &)(os | usc); nl( os ); 52 63 } // ?|? 53 64 … … 57 68 return os; 58 69 } // ?|? 70 void & ?|?( ostype & os, short int si ) { 71 (ostype &)(os | si); nl( os ); 72 } // ?|? 59 73 60 74 ostype & ?|?( ostype & os, unsigned short int usi ) { … … 63 77 return os; 64 78 } // ?|? 79 void & ?|?( ostype & os, unsigned short int usi ) { 80 (ostype &)(os | usi); nl( os ); 81 } // ?|? 65 82 66 83 ostype & ?|?( ostype & os, int i ) { … … 69 86 return os; 70 87 } // ?|? 88 void & ?|?( ostype & os, int i ) { 89 (ostype &)(os | i); nl( os ); 90 } // ?|? 71 91 72 92 ostype & ?|?( ostype & os, unsigned int ui ) { … … 75 95 return os; 76 96 } // ?|? 97 void & ?|?( ostype & os, unsigned int ui ) { 98 (ostype &)(os | ui); nl( os ); 99 } // ?|? 77 100 78 101 ostype & ?|?( ostype & os, long int li ) { … … 81 104 return os; 82 105 } // ?|? 106 void & ?|?( ostype & os, long int li ) { 107 (ostype &)(os | li); nl( os ); 108 } // ?|? 83 109 84 110 ostype & ?|?( ostype & os, unsigned long int uli ) { … … 87 113 return os; 88 114 } // ?|? 115 void & ?|?( ostype & os, unsigned long int uli ) { 116 (ostype &)(os | uli); nl( os ); 117 } // ?|? 89 118 90 119 ostype & ?|?( ostype & os, long long int lli ) { … … 93 122 return os; 94 123 } // ?|? 124 void & ?|?( ostype & os, long long int lli ) { 125 (ostype &)(os | lli); nl( os ); 126 } // ?|? 95 127 96 128 ostype & ?|?( ostype & os, unsigned long long int ulli ) { … … 99 131 return os; 100 132 } // ?|? 133 void & ?|?( ostype & os, unsigned long long int ulli ) { 134 (ostype &)(os | ulli); nl( os ); 135 } // ?|? 101 136 102 137 ostype & ?|?( ostype & os, float f ) { … … 105 140 return os; 106 141 } // ?|? 142 void & ?|?( ostype & os, float f ) { 143 (ostype &)(os | f); nl( os ); 144 } // ?|? 107 145 108 146 ostype & ?|?( ostype & os, double d ) { … … 111 149 return os; 112 150 } // ?|? 151 void & ?|?( ostype & os, double d ) { 152 (ostype &)(os | d); nl( os ); 153 } // ?|? 113 154 114 155 ostype & ?|?( ostype & os, long double ld ) { … … 117 158 return os; 118 159 } // ?|? 160 void & ?|?( ostype & os, long double ld ) { 161 (ostype &)(os | ld); nl( os ); 162 } // ?|? 119 163 120 164 ostype & ?|?( ostype & os, float _Complex fc ) { … … 123 167 return os; 124 168 } // ?|? 169 void & ?|?( ostype & os, float _Complex fc ) { 170 (ostype &)(os | fc); nl( os ); 171 } // ?|? 125 172 126 173 ostype & ?|?( ostype & os, double _Complex dc ) { … … 129 176 return os; 130 177 } // ?|? 178 void & ?|?( ostype & os, double _Complex dc ) { 179 (ostype &)(os | dc); nl( os ); 180 } // ?|? 131 181 132 182 ostype & ?|?( ostype & os, long double _Complex ldc ) { … … 134 184 fmt( os, "%.*Lg%+.*Lgi", LDBL_DIG, creall( ldc ), LDBL_DIG, cimagl( ldc ) ); 135 185 return os; 186 } // ?|? 187 void & ?|?( ostype & os, long double _Complex ldc ) { 188 (ostype &)(os | ldc); nl( os ); 136 189 } // ?|? 137 190 … … 174 227 return write( os, str, len ); 175 228 } // ?|? 229 void ?|?( ostype & os, const char * str ) { 230 (ostype &)(os | str); nl( os ); 231 } // ?|? 176 232 177 233 // ostype & ?|?( ostype & os, const char16_t * str ) { … … 200 256 return os; 201 257 } // ?|? 202 258 void ?|?( ostype & os, const void * p ) { 259 (ostype &)(os | p); nl( os ); 260 } // ?|? 203 261 204 262 // manipulators 205 263 ostype & ?|?( ostype & os, ostype & (* manip)( ostype & ) ) { 206 return manip( os ); 264 (ostype &)(manip( os )); 265 return os; 266 } // ?|? 267 void ?|?( ostype & os, ostype & (* manip)( ostype & ) ) { 268 (ostype &)(manip( os )); 269 if ( getPrt( os ) ) nl( os ); // something printed ? 270 setPrt( os, false ); // turn off 207 271 } // ?|? 208 272 209 273 ostype & sep( ostype & os ) { 210 os | sepGet( os ); 211 return os; 274 return (ostype &)(os | sepGet( os )); 212 275 } // sep 213 276 214 277 ostype & sepTuple( ostype & os ) { 215 os | sepGetTuple( os ); 216 return os; 278 return os | sepGetTuple( os ); 217 279 } // sepTuple 218 280 219 ostype & endl( ostype & os ) { 220 os | '\n'; 281 ostype & nl( ostype & os ) { 282 (ostype &)(os | '\n'); 283 setPrt( os, false ); // turn off 221 284 setNL( os, true ); 222 285 flush( os ); 223 sepOff( os ); // prepare for next line 224 return os; 225 } // endl 286 return sepOff( os ); // prepare for next line 287 } // nl 288 289 void nl( ostype & os ) { 290 if ( getANL( os ) ) (ostype &)(nl( os )); // implementation only 291 else setPrt( os, false ); // turn off 292 } // nl 293 294 ostype & nonl( ostype & os ) { 295 setPrt( os, false ); // turn off 296 return os; 297 } // nonl 226 298 227 299 ostype & sepOn( ostype & os ) { 228 sepOn( os ); 300 sepOn( os ); // call void returning 229 301 return os; 230 302 } // sepOn 231 303 232 304 ostype & sepOff( ostype & os ) { 233 sepOff( os ); 305 sepOff( os ); // call void returning 234 306 return os; 235 307 } // sepOff 236 308 237 309 ostype & sepEnable( ostype & os ) { 238 sepEnable( os ); 310 sepEnable( os ); // call void returning 239 311 return os; 240 312 } // sepEnable 241 313 242 314 ostype & sepDisable( ostype & os ) { 243 sepDisable( os ); 315 sepDisable( os ); // call void returning 244 316 return os; 245 317 } // sepDisable 318 319 ostype & nlOn( ostype & os ) { 320 nlOn( os ); // call void returning 321 return os; 322 } // nlOn 323 324 ostype & nlOff( ostype & os ) { 325 nlOff( os ); // call void returning 326 return os; 327 } // nlOff 246 328 } // distribution 247 329 248 249 330 // tuples 250 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) 251 ostype & ?|?( ostype & os, T arg, Params rest ) { 252 os | arg; // print first argument 253 sepSetCur( os, sepGetTuple( os ) ); // switch to tuple separator 254 os | rest; // print remaining arguments 255 sepSetCur( os, sepGet( os ) ); // switch to regular separator 256 return os; 257 } // ?|? 331 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) { 332 ostype & ?|?( ostype & os, T arg, Params rest ) { 333 (ostype &)(os | arg); // print first argument 334 sepSetCur( os, sepGetTuple( os ) ); // switch to tuple separator 335 (ostype &)(os | rest); // print remaining arguments 336 sepSetCur( os, sepGet( os ) ); // switch to regular separator 337 return os; 338 } // ?|? 339 void ?|?( ostype & os, T arg, Params rest ) { 340 // (ostype &)(?|?( os, arg, rest )); nl( os ); 341 (ostype &)(os | arg); // print first argument 342 sepSetCur( os, sepGetTuple( os ) ); // switch to tuple separator 343 (ostype &)(os | rest); // print remaining arguments 344 sepSetCur( os, sepGet( os ) ); // switch to regular separator 345 nl( os ); 346 } // ?|? 347 } // distribution 258 348 259 349 //--------------------------------------- 260 350 261 351 // writes the range [begin, end) to the given stream 262 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 263 void write( iterator_type begin, iterator_type end, ostype & os ) {264 void print( elt_type i ) { os | i; }265 for_each( begin, end, print );266 } // ?|?267 268 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 269 void write_reverse( iterator_type begin, iterator_type end, ostype & os ) { 270 void print( elt_type i ) { os | i; }271 for_each_reverse( begin, end, print );272 } // ?|?352 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) { 353 void write( iterator_type begin, iterator_type end, ostype & os ) { 354 void print( elt_type i ) { os | i; } 355 for_each( begin, end, print ); 356 } // ?|? 357 358 void write_reverse( iterator_type begin, iterator_type end, ostype & os ) { 359 void print( elt_type i ) { os | i; } 360 for_each_reverse( begin, end, print ); 361 } // ?|? 362 } // distribution 273 363 274 364 //--------------------------------------- … … 386 476 } // ?|? 387 477 388 istype & endl( istype & is ) {478 istype & nl( istype & is ) { 389 479 fmt( is, "%*[ \t\f\n\r\v]" ); // ignore whitespace 390 480 return is; 391 } // endl481 } // nl 392 482 } // distribution 393 483 -
libcfa/src/iostream.hfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 11 08:22:49201813 // Update Count : 15612 // Last Modified On : Mon Dec 24 18:33:40 2018 13 // Update Count : 220 14 14 // 15 15 … … 20 20 trait ostream( dtype ostype ) { 21 21 // private 22 bool sepPrt( ostype & ); // returnseparator state (on/off)22 bool sepPrt( ostype & ); // get separator state (on/off) 23 23 void sepReset( ostype & ); // set separator state to default state 24 24 void sepReset( ostype &, bool ); // set separator and default state 25 25 const char * sepGetCur( ostype & ); // get current separator string 26 26 void sepSetCur( ostype &, const char * ); // set current separator string 27 bool getNL( ostype & ); // check newline27 bool getNL( ostype & ); // check newline 28 28 void setNL( ostype &, bool ); // saw newline 29 bool getANL( ostype & ); // get auto newline (on/off) 30 bool getPrt( ostype & ); // get fmt called in output cascade 31 void setPrt( ostype &, bool ); // set fmt called in output cascade 29 32 // public 30 33 void sepOn( ostype & ); // turn separator state on 31 34 void sepOff( ostype & ); // turn separator state off 32 35 bool sepDisable( ostype & ); // set default state to off, and return previous state 33 bool sepEnable( ostype & ); // set default state to on, and return previous state 36 bool sepEnable( ostype & ); // set default state to on, and return previous state 37 void nlOn( ostype & ); // turn auto-newline state on 38 void nlOff( ostype & ); // turn auto-newline state off 34 39 35 40 const char * sepGet( ostype & ); // get separator string … … 43 48 void close( ostype & os ); 44 49 ostype & write( ostype &, const char *, size_t ); 45 int fmt( ostype &, const char f mt[], ... );50 int fmt( ostype &, const char format[], ... ); 46 51 }; // ostream 47 52 … … 58 63 forall( dtype ostype | ostream( ostype ) ) { 59 64 ostype & ?|?( ostype &, bool ); 65 void ?|?( ostype &, bool ); 60 66 61 67 ostype & ?|?( ostype &, char ); 68 void ?|?( ostype &, char ); 62 69 ostype & ?|?( ostype &, signed char ); 70 void ?|?( ostype &, signed char ); 63 71 ostype & ?|?( ostype &, unsigned char ); 72 void ?|?( ostype &, unsigned char ); 64 73 65 74 ostype & ?|?( ostype &, short int ); 75 void ?|?( ostype &, short int ); 66 76 ostype & ?|?( ostype &, unsigned short int ); 77 void ?|?( ostype &, unsigned short int ); 67 78 ostype & ?|?( ostype &, int ); 79 void ?|?( ostype &, int ); 68 80 ostype & ?|?( ostype &, unsigned int ); 81 void ?|?( ostype &, unsigned int ); 69 82 ostype & ?|?( ostype &, long int ); 83 void ?|?( ostype &, long int ); 70 84 ostype & ?|?( ostype &, long long int ); 85 void ?|?( ostype &, long long int ); 71 86 ostype & ?|?( ostype &, unsigned long int ); 87 void ?|?( ostype &, unsigned long int ); 72 88 ostype & ?|?( ostype &, unsigned long long int ); 89 void ?|?( ostype &, unsigned long long int ); 73 90 74 91 ostype & ?|?( ostype &, float ); // FIX ME: should not be required 92 void ?|?( ostype &, float ); // FIX ME: should not be required 75 93 ostype & ?|?( ostype &, double ); 94 void ?|?( ostype &, double ); 76 95 ostype & ?|?( ostype &, long double ); 96 void ?|?( ostype &, long double ); 77 97 78 98 ostype & ?|?( ostype &, float _Complex ); 99 void ?|?( ostype &, float _Complex ); 79 100 ostype & ?|?( ostype &, double _Complex ); 101 void ?|?( ostype &, double _Complex ); 80 102 ostype & ?|?( ostype &, long double _Complex ); 103 void ?|?( ostype &, long double _Complex ); 81 104 82 105 ostype & ?|?( ostype &, const char * ); 106 void ?|?( ostype &, const char * ); 83 107 // ostype & ?|?( ostype &, const char16_t * ); 84 108 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous … … 87 111 // ostype & ?|?( ostype &, const wchar_t * ); 88 112 ostype & ?|?( ostype &, const void * ); 113 void ?|?( ostype &, const void * ); 89 114 90 115 // manipulators 91 116 ostype & ?|?( ostype &, ostype & (*)( ostype & ) ); 92 ostype & endl( ostype & ); 117 void ?|?( ostype &, ostype & (*)( ostype & ) ); 118 ostype & nl( ostype & ); 119 void nl( ostype & ); 120 ostype & nonl( ostype & ); 93 121 ostype & sep( ostype & ); 94 122 ostype & sepTuple( ostype & ); … … 97 125 ostype & sepDisable( ostype & ); 98 126 ostype & sepEnable( ostype & ); 127 ostype & nlOn( ostype & ); 128 ostype & nlOff( ostype & ); 99 129 } // distribution 100 130 101 131 // tuples 102 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) 103 ostype & ?|?( ostype & os, T arg, Params rest ); 132 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) { 133 ostype & ?|?( ostype & os, T arg, Params rest ); 134 void ?|?( ostype & os, T arg, Params rest ); 135 } // distribution 104 136 105 137 // writes the range [begin, end) to the given stream 106 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 107 void write( iterator_type begin, iterator_type end, ostype & os ); 108 109 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 110 void write_reverse( iterator_type begin, iterator_type end, ostype & os ); 138 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) { 139 void write( iterator_type begin, iterator_type end, ostype & os ); 140 void write_reverse( iterator_type begin, iterator_type end, ostype & os ); 141 } // distribution 111 142 112 143 //--------------------------------------- … … 119 150 istype & read( istype &, char *, size_t ); 120 151 istype & ungetc( istype &, char ); 121 int fmt( istype &, const char f mt[], ... );152 int fmt( istype &, const char format[], ... ); 122 153 }; // istream 123 154 … … 152 183 // manipulators 153 184 istype & ?|?( istype &, istype & (*)( istype & ) ); 154 istype & endl( istype & is );185 istype & nl( istype & is ); 155 186 } // distribution 156 187 … … 164 195 165 196 166 #include <time_t.hfa> // Duration (constructors) / Time (constructors) 167 168 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur ); 169 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Time time ); 170 197 #include <time_t.hfa> // Duration (constructors) / Time (constructors) 198 199 forall( dtype ostype | ostream( ostype ) ) { 200 ostype & ?|?( ostype & os, Duration dur ); 201 void ?|?( ostype & os, Duration dur ); 202 ostype & ?|?( ostype & os, Time time ); 203 void ?|?( ostype & os, Time time ); 204 } // distribution 171 205 172 206 // Local Variables: // -
libcfa/src/rational.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Apr 6 17:54:28 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at Jun 2 09:24:33201813 // Update Count : 1 6212 // Last Modified On : Sun Dec 23 22:56:49 2018 13 // Update Count : 170 14 14 // 15 15 … … 35 35 static RationalImpl simplify( RationalImpl & n, RationalImpl & d ) { 36 36 if ( d == (RationalImpl){0} ) { 37 serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;37 serr | "Invalid rational number construction: denominator cannot be equal to 0."; 38 38 exit( EXIT_FAILURE ); 39 39 } // exit … … 175 175 } // ?|? 176 176 177 forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) 178 ostype & ?|?( ostype & os, Rational(RationalImpl ) r ) { 179 return os | r.numerator | '/' | r.denominator; 180 } // ?|? 177 forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) { 178 ostype & ?|?( ostype & os, Rational(RationalImpl) r ) { 179 return os | r.numerator | '/' | r.denominator; 180 } // ?|? 181 182 void ?|?( ostype & os, Rational(RationalImpl) r ) { 183 (ostype &)(os | r); nl( os ); 184 } // ?|? 185 } // distribution 181 186 } // distribution 182 187 -
libcfa/src/rational.hfa
r5e49e47 rd0c91a6 12 12 // Created On : Wed Apr 6 17:56:25 2016 13 13 // Last Modified By : Peter A. Buhr 14 // Last Modified On : Sat Jun 2 09:10:01201815 // Update Count : 10 514 // Last Modified On : Tue Dec 4 23:07:46 2018 15 // Update Count : 106 16 16 // 17 17 … … 92 92 istype & ?|?( istype &, Rational(RationalImpl) & ); 93 93 94 forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) 95 ostype & ?|?( ostype &, Rational(RationalImpl ) ); 94 forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) { 95 ostype & ?|?( ostype &, Rational(RationalImpl) ); 96 void ?|?( ostype &, Rational(RationalImpl) ); 97 } // distribution 96 98 } // distribution 97 99 -
libcfa/src/stdlib.hfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 27 07:21:36201813 // Update Count : 34 512 // Last Modified On : Mon Dec 17 15:37:45 2018 13 // Update Count : 346 14 14 // 15 15 … … 178 178 179 179 static inline { 180 int ato( const char * sptr ) { return (int)strtol( sptr, 0, 10 ); }180 int ato( const char * sptr ) { return (int)strtol( sptr, 0, 10 ); } 181 181 unsigned int ato( const char * sptr ) { return (unsigned int)strtoul( sptr, 0, 10 ); } 182 182 long int ato( const char * sptr ) { return strtol( sptr, 0, 10 ); } -
libcfa/src/time.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Mar 27 13:33:14 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 6 22:26:00201813 // Update Count : 3712 // Last Modified On : Sun Dec 23 22:57:48 2018 13 // Update Count : 57 14 14 // 15 15 … … 31 31 32 32 33 forall( dtype ostype | ostream( ostype ) ) 34 ostype & ?|?( ostype & os, Duration dur ) with( dur ) { 35 os | tv / TIMEGRAN; // print seconds 36 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 37 if ( ns != 0 ) { // some ? 38 char buf[16]; 39 os | nanomsd( ns, buf ); // print nanoseconds 40 } // if 41 return os; 42 } // ?|? 33 forall( dtype ostype | ostream( ostype ) ) { 34 ostype & ?|?( ostype & os, Duration dur ) with( dur ) { 35 (ostype &)(os | tv / TIMEGRAN); // print seconds 36 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 37 if ( ns != 0 ) { // some ? 38 char buf[16]; 39 (ostype &)(os | nanomsd( ns, buf )); // print nanoseconds 40 } // if 41 return os; 42 } // ?|? 43 44 void ?|?( ostype & os, Duration dur ) with( dur ) { 45 (ostype &)(os | dur); nl( os ); 46 } // ?|? 47 } // distribution 43 48 44 49 … … 137 142 } // strftime 138 143 139 forall( dtype ostype | ostream( ostype ) ) 140 ostype & ?|?( ostype & os, Time time ) with( time ) { 141 char buf[32]; // at least 26 142 time_t s = tv / TIMEGRAN; 143 ctime_r( &s, (char *)&buf ); // 26 characters: "Wed Jun 30 21:49:08 1993\n" 144 buf[24] = '\0'; // remove trailing '\n' 145 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 146 if ( ns == 0 ) { // none ? 147 os | buf; // print date/time/year 148 } else { 149 buf[19] = '\0'; // truncate to "Wed Jun 30 21:49:08" 150 os | buf; // print date/time 151 char buf2[16]; 152 nanomsd( ns, buf2 ); // compute nanoseconds 153 os | buf2 | ' ' | &buf[20]; // print nanoseconds and year 154 } // if 155 return os; 156 } // ?|? 144 forall( dtype ostype | ostream( ostype ) ) { 145 ostype & ?|?( ostype & os, Time time ) with( time ) { 146 char buf[32]; // at least 26 147 time_t s = tv / TIMEGRAN; 148 ctime_r( &s, (char *)&buf ); // 26 characters: "Wed Jun 30 21:49:08 1993\n" 149 buf[24] = '\0'; // remove trailing '\n' 150 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 151 if ( ns == 0 ) { // none ? 152 (ostype &)(os | buf); // print date/time/year 153 } else { 154 buf[19] = '\0'; // truncate to "Wed Jun 30 21:49:08" 155 char buf2[16]; 156 nanomsd( ns, buf2 ); // compute nanoseconds 157 (ostype &)(os | buf | buf2 | ' ' | &buf[20]); // print date/time, nanoseconds and year 158 } // if 159 return os; 160 } // ?|? 161 162 void ?|?( ostype & os, Time time ) with( time ) { 163 (ostype &)(os | time); nl( os ); 164 } // ?|? 165 } // distribution 157 166 158 167 // Local Variables: // -
src/CodeTools/ResolvProtoDump.cc
r5e49e47 rd0c91a6 51 51 52 52 /// Child constructor 53 ProtoDump(const ProtoDump* p, Type* r) 53 ProtoDump(const ProtoDump* p, Type* r) 54 54 : decls(), exprs(), subs(), closed(p->closed), parent(p), rtnType(r) {} 55 55 56 56 // Fix copy issues 57 ProtoDump(const ProtoDump& o) 58 : decls(o.decls), exprs(o.exprs), subs(o.subs), closed(o.closed), parent(o.parent), 57 ProtoDump(const ProtoDump& o) 58 : decls(o.decls), exprs(o.exprs), subs(o.subs), closed(o.closed), parent(o.parent), 59 59 rtnType(maybeClone(o.rtnType.get())) {} 60 60 ProtoDump( ProtoDump&& ) = default; … … 69 69 parent = o.parent; 70 70 rtnType.reset( maybeClone(o.rtnType.get()) ); 71 71 72 72 return *this; 73 73 } 74 ProtoDump& operator= (ProtoDump&&) = de fault;74 ProtoDump& operator= (ProtoDump&&) = delete; 75 75 76 76 private: … … 96 96 subs.emplace_back( std::move(sub.pass) ); 97 97 } 98 98 99 99 /// Whether lists should be separated, terminated, or preceded by their separator 100 100 enum septype { separated, terminated, preceded }; … … 102 102 /// builds space-separated list of types 103 103 template<typename V> 104 static void build( V& visitor, const std::list< Type* >& tys, std::stringstream& ss, 104 static void build( V& visitor, const std::list< Type* >& tys, std::stringstream& ss, 105 105 septype mode = separated ) { 106 106 if ( tys.empty() ) return; … … 121 121 /// builds list of types wrapped as tuple type 122 122 template<typename V> 123 static void buildAsTuple( V& visitor, const std::list< Type* >& tys, 123 static void buildAsTuple( V& visitor, const std::list< Type* >& tys, 124 124 std::stringstream& ss ) { 125 125 switch ( tys.size() ) { … … 162 162 if ( name.compare( 0, 10, "_operator_" ) == 0 ) { 163 163 ss << name.substr(10); 164 } else if ( name.compare( "_constructor" ) == 0 164 } else if ( name.compare( "_constructor" ) == 0 165 165 || name.compare( "_destructor" ) == 0 ) { 166 166 ss << name.substr(1); … … 173 173 174 174 /// replaces operators with resolv-proto names 175 static void rp_name( const std::string& name, std::stringstream& ss, 175 static void rp_name( const std::string& name, std::stringstream& ss, 176 176 std::string&& pre = "" ) { 177 177 // safety check for anonymous names … … 187 187 op_name( info.outputName, ss ); 188 188 return; 189 } 190 189 } 190 191 191 // replace retval names 192 192 if ( name.compare( 0, 8, "_retval_" ) == 0 ) { … … 195 195 return; 196 196 } 197 197 198 198 // default to just name, with first character in lowercase 199 ss << pre 199 ss << pre 200 200 << (char)std::tolower( static_cast<unsigned char>(name[0]) ) 201 201 << (name.c_str() + 1); … … 221 221 // strip trailing "_generic_" from autogen names (avoids some user-generation issues) 222 222 char generic[] = "_generic_"; size_t n_generic = sizeof(generic) - 1; 223 if ( stripped.size() >= n_generic 223 if ( stripped.size() >= n_generic 224 224 && stripped.substr( stripped.size() - n_generic ) == generic ) { 225 225 stripped.resize( stripped.size() - n_generic ); … … 237 237 unsigned depth; ///< Depth of nesting from root type 238 238 239 TypePrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 239 TypePrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 240 240 : ss(ss), closed(closed), depth(0) {} 241 241 … … 337 337 } 338 338 }; 339 339 340 340 /// builds description of function 341 341 void build( const std::string& name, FunctionType* fnTy, std::stringstream& ss ) { … … 350 350 for ( TypeDecl* tyvar : fnTy->forall ) { 351 351 for ( DeclarationWithType* assn : tyvar->assertions ) { 352 ss << " | "; 352 ss << " | "; 353 353 build( assn->name, assn->get_type(), ss ); 354 354 } … … 360 360 // ignore top-level references 361 361 Type *norefs = ty->stripReferences(); 362 362 363 363 // fall back to function declaration if function type 364 364 if ( PointerType* pTy = dynamic_cast< PointerType* >(norefs) ) { … … 409 409 std::stringstream& ss; ///< Output to print to 410 410 411 ExprPrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 411 ExprPrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 412 412 : closed(closed), ss(ss) {} 413 413 … … 476 476 visit_children = false; 477 477 } 478 478 479 479 /// Member access handled as function from aggregate to member 480 480 void previsit( UntypedMemberExpr* expr ) { … … 662 662 } 663 663 } 664 664 665 665 // add named parameters and returns to local scope 666 666 body.pass.addAll( decl->type->returnVals ); … … 679 679 void previsit( StructDecl* sd ) { addAggregateFields(sd); } 680 680 void previsit( UnionDecl* ud ) { addAggregateFields(ud); } 681 681 682 682 void previsit( EnumDecl* ed ) { 683 std::unique_ptr<Type> eType = 683 std::unique_ptr<Type> eType = 684 684 std::make_unique<BasicType>( Type::Qualifiers{}, BasicType::SignedInt ); 685 685 686 686 // add field names directly to enclosing scope 687 687 for ( Declaration* member : ed->members ) { -
src/Common/utility.h
r5e49e47 rd0c91a6 26 26 #include <string> 27 27 #include <type_traits> 28 #include <utility> 28 29 29 30 #include <cassert> … … 462 463 std::pair<long long int, bool> eval(Expression * expr); 463 464 465 // ----------------------------------------------------------------------------- 466 /// Reorders the input range in-place so that the minimal-value elements according to the 467 /// comparator are in front; 468 /// returns the iterator after the last minimal-value element. 469 template<typename Iter, typename Compare> 470 Iter sort_mins( Iter begin, Iter end, Compare& lt ) { 471 if ( begin == end ) return end; 472 473 Iter min_pos = begin; 474 for ( Iter i = begin + 1; i != end; ++i ) { 475 if ( lt( *i, *min_pos ) ) { 476 // new minimum cost; swap into first position 477 min_pos = begin; 478 std::iter_swap( min_pos, i ); 479 } else if ( ! lt( *min_pos, *i ) ) { 480 // duplicate minimum cost; swap into next minimum position 481 ++min_pos; 482 std::iter_swap( min_pos, i ); 483 } 484 } 485 return ++min_pos; 486 } 487 488 template<typename Iter, typename Compare> 489 inline Iter sort_mins( Iter begin, Iter end, Compare&& lt ) { 490 return sort_mins( begin, end, lt ); 491 } 492 493 /// sort_mins defaulted to use std::less 494 template<typename Iter> 495 inline Iter sort_mins( Iter begin, Iter end ) { 496 return sort_mins( begin, end, std::less<typename std::iterator_traits<Iter>::value_type>{} ); 497 } 498 464 499 // Local Variables: // 465 500 // tab-width: 4 // -
src/GenPoly/Box.cc
r5e49e47 rd0c91a6 798 798 for ( Type::ForallList::iterator tyVar = functionType->get_forall().begin(); tyVar != functionType->get_forall().end(); ++tyVar ) { 799 799 for ( std::list< DeclarationWithType *>::iterator assert = (*tyVar)->assertions.begin(); assert != (*tyVar)->assertions.end(); ++assert ) { 800 InferredParams::const_iterator inferParam = appExpr-> get_inferParams().find( (*assert)->get_uniqueId() );801 assertf( inferParam != appExpr-> get_inferParams().end(), "addInferredParams missing inferred parameter: %s in: %s", toString( *assert ).c_str(), toString( appExpr ).c_str() );800 InferredParams::const_iterator inferParam = appExpr->inferParams.find( (*assert)->get_uniqueId() ); 801 assertf( inferParam != appExpr->inferParams.end(), "addInferredParams missing inferred parameter: %s in: %s", toString( *assert ).c_str(), toString( appExpr ).c_str() ); 802 802 Expression *newExpr = inferParam->second.expr->clone(); 803 803 addCast( newExpr, (*assert)->get_type(), tyVars ); -
src/GenPoly/Specialize.cc
r5e49e47 rd0c91a6 245 245 appExpr->env = TypeSubstitution::newFromExpr( appExpr, env ); 246 246 if ( inferParams ) { 247 appExpr-> get_inferParams()= *inferParams;247 appExpr->inferParams = *inferParams; 248 248 } // if 249 249 … … 284 284 std::list< Expression* >::iterator actual; 285 285 for ( formal = function->get_parameters().begin(), actual = appExpr->get_args().begin(); formal != function->get_parameters().end() && actual != appExpr->get_args().end(); ++formal, ++actual ) { 286 *actual = doSpecialization( (*formal)->get_type(), *actual, &appExpr-> get_inferParams());286 *actual = doSpecialization( (*formal)->get_type(), *actual, &appExpr->inferParams ); 287 287 } 288 288 } … … 295 295 // alternatively, if order starts to matter then copy appExpr's inferParams and pass them to handleExplicitParams. 296 296 handleExplicitParams( appExpr ); 297 for ( InferredParams::iterator inferParam = appExpr-> get_inferParams().begin(); inferParam != appExpr->get_inferParams().end(); ++inferParam ) {298 inferParam->second.expr = doSpecialization( inferParam->second.formalType, inferParam->second.expr, inferParam->second.inferParams.get());297 for ( InferredParams::iterator inferParam = appExpr->inferParams.begin(); inferParam != appExpr->inferParams.end(); ++inferParam ) { 298 inferParam->second.expr = doSpecialization( inferParam->second.formalType, inferParam->second.expr, &inferParam->second.expr->inferParams ); 299 299 } 300 300 } -
src/Makefile.am
r5e49e47 rd0c91a6 17 17 # create object files in directory with source files 18 18 AUTOMAKE_OPTIONS = foreign subdir-objects 19 ACLOCAL_AMFLAGS = -I automake 19 20 20 21 SRC = main.cc \ … … 126 127 ResolvExpr/PtrsCastable.cc \ 127 128 ResolvExpr/RenameVars.cc \ 129 ResolvExpr/ResolveAssertions.cc \ 128 130 ResolvExpr/Resolver.cc \ 129 131 ResolvExpr/ResolveTypeof.cc \ 132 ResolvExpr/SpecCost.cc \ 130 133 ResolvExpr/TypeEnvironment.cc \ 131 134 ResolvExpr/Unify.cc \ -
src/Makefile.in
r5e49e47 rd0c91a6 141 141 subdir = src 142 142 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 143 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 144 $(top_srcdir)/configure.ac 143 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 144 $(top_srcdir)/automake/ltoptions.m4 \ 145 $(top_srcdir)/automake/ltsugar.m4 \ 146 $(top_srcdir)/automake/ltversion.m4 \ 147 $(top_srcdir)/automake/lt~obsolete.m4 \ 148 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 145 149 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 146 150 $(ACLOCAL_M4) … … 151 155 CONFIG_CLEAN_VPATH_FILES = 152 156 LIBRARIES = $(noinst_LIBRARIES) 153 AR = ar154 157 AM_V_AR = $(am__v_AR_@AM_V@) 155 158 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) … … 203 206 ResolvExpr/PtrsAssignable.$(OBJEXT) \ 204 207 ResolvExpr/PtrsCastable.$(OBJEXT) \ 205 ResolvExpr/RenameVars.$(OBJEXT) ResolvExpr/Resolver.$(OBJEXT) \ 208 ResolvExpr/RenameVars.$(OBJEXT) \ 209 ResolvExpr/ResolveAssertions.$(OBJEXT) \ 210 ResolvExpr/Resolver.$(OBJEXT) \ 206 211 ResolvExpr/ResolveTypeof.$(OBJEXT) \ 212 ResolvExpr/SpecCost.$(OBJEXT) \ 207 213 ResolvExpr/TypeEnvironment.$(OBJEXT) \ 208 214 ResolvExpr/Unify.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \ … … 259 265 ResolvExpr/TypeEnvironment.$(OBJEXT) \ 260 266 ResolvExpr/CurrentObject.$(OBJEXT) \ 261 ResolvExpr/ExplodedActual.$(OBJEXT) SymTab/Indexer.$(OBJEXT) \ 262 SymTab/Mangler.$(OBJEXT) SymTab/ManglerCommon.$(OBJEXT) \ 263 SymTab/Validate.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \ 264 SymTab/Autogen.$(OBJEXT) SynTree/Type.$(OBJEXT) \ 265 SynTree/VoidType.$(OBJEXT) SynTree/BasicType.$(OBJEXT) \ 266 SynTree/PointerType.$(OBJEXT) SynTree/ArrayType.$(OBJEXT) \ 267 SynTree/ReferenceType.$(OBJEXT) SynTree/FunctionType.$(OBJEXT) \ 267 ResolvExpr/ExplodedActual.$(OBJEXT) \ 268 ResolvExpr/SpecCost.$(OBJEXT) \ 269 ResolvExpr/ResolveAssertions.$(OBJEXT) \ 270 SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \ 271 SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT) \ 272 SymTab/FixFunction.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \ 273 SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \ 274 SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \ 275 SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \ 276 SynTree/FunctionType.$(OBJEXT) \ 268 277 SynTree/ReferenceToType.$(OBJEXT) SynTree/TupleType.$(OBJEXT) \ 269 278 SynTree/TypeofType.$(OBJEXT) SynTree/AttrType.$(OBJEXT) \ … … 289 298 ___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS) 290 299 ___driver_cfa_cpp_DEPENDENCIES = 300 AM_V_lt = $(am__v_lt_@AM_V@) 301 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 302 am__v_lt_0 = --silent 303 am__v_lt_1 = 291 304 am_demangler_OBJECTS = SymTab/demangler.$(OBJEXT) 292 305 demangler_OBJECTS = $(am_demangler_OBJECTS) … … 310 323 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 311 324 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 325 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 326 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 327 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 328 $(AM_CXXFLAGS) $(CXXFLAGS) 312 329 AM_V_CXX = $(am__v_CXX_@AM_V@) 313 330 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) … … 315 332 am__v_CXX_1 = 316 333 CXXLD = $(CXX) 317 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 318 -o $@ 334 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 335 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 336 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 319 337 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 320 338 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) … … 322 340 am__v_CXXLD_1 = 323 341 LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) 342 LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ 343 $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) 324 344 AM_V_LEX = $(am__v_LEX_@AM_V@) 325 345 am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) … … 330 350 -e s/c++$$/h++/ -e s/c$$/h/ 331 351 YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) 352 LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ 353 $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) 332 354 AM_V_YACC = $(am__v_YACC_@AM_V@) 333 355 am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) … … 336 358 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 337 359 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 360 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 361 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 362 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 363 $(AM_CFLAGS) $(CFLAGS) 338 364 AM_V_CC = $(am__v_CC_@AM_V@) 339 365 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) … … 341 367 am__v_CC_1 = 342 368 CCLD = $(CC) 343 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 369 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 370 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 371 $(AM_LDFLAGS) $(LDFLAGS) -o $@ 344 372 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 345 373 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) … … 391 419 AMTAR = @AMTAR@ 392 420 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 421 AR = @AR@ 393 422 AUTOCONF = @AUTOCONF@ 394 423 AUTOHEADER = @AUTOHEADER@ 395 424 AUTOMAKE = @AUTOMAKE@ 396 425 AWK = @AWK@ 397 BACKEND_CC = @BACKEND_CC@398 426 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 399 427 CC = @CC@ … … 415 443 CPPFLAGS = @CPPFLAGS@ 416 444 CXX = @CXX@ 445 CXXCPP = @CXXCPP@ 417 446 CXXDEPMODE = @CXXDEPMODE@ 418 447 CXXFLAGS = @CXXFLAGS@ … … 420 449 DEFS = @DEFS@ 421 450 DEPDIR = @DEPDIR@ 451 DLLTOOL = @DLLTOOL@ 422 452 DRIVER_DIR = @DRIVER_DIR@ 453 DSYMUTIL = @DSYMUTIL@ 454 DUMPBIN = @DUMPBIN@ 423 455 ECHO_C = @ECHO_C@ 424 456 ECHO_N = @ECHO_N@ … … 426 458 EGREP = @EGREP@ 427 459 EXEEXT = @EXEEXT@ 460 FGREP = @FGREP@ 428 461 GREP = @GREP@ 429 462 HOST_FLAGS = @HOST_FLAGS@ … … 433 466 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 434 467 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 468 LD = @LD@ 435 469 LDFLAGS = @LDFLAGS@ 436 470 LEX = @LEX@ … … 441 475 LIBOBJS = @LIBOBJS@ 442 476 LIBS = @LIBS@ 477 LIBTOOL = @LIBTOOL@ 478 LIPO = @LIPO@ 479 LN_S = @LN_S@ 443 480 LTLIBOBJS = @LTLIBOBJS@ 481 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 444 482 MAKEINFO = @MAKEINFO@ 483 MANIFEST_TOOL = @MANIFEST_TOOL@ 445 484 MKDIR_P = @MKDIR_P@ 485 NM = @NM@ 486 NMEDIT = @NMEDIT@ 487 OBJDUMP = @OBJDUMP@ 446 488 OBJEXT = @OBJEXT@ 489 OTOOL = @OTOOL@ 490 OTOOL64 = @OTOOL64@ 447 491 PACKAGE = @PACKAGE@ 448 492 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 454 498 PATH_SEPARATOR = @PATH_SEPARATOR@ 455 499 RANLIB = @RANLIB@ 500 SED = @SED@ 456 501 SET_MAKE = @SET_MAKE@ 457 502 SHELL = @SHELL@ … … 465 510 abs_top_builddir = @abs_top_builddir@ 466 511 abs_top_srcdir = @abs_top_srcdir@ 512 ac_ct_AR = @ac_ct_AR@ 467 513 ac_ct_CC = @ac_ct_CC@ 468 514 ac_ct_CXX = @ac_ct_CXX@ 515 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 469 516 am__include = @am__include@ 470 517 am__leading_dot = @am__leading_dot@ … … 516 563 # create object files in directory with source files 517 564 AUTOMAKE_OPTIONS = foreign subdir-objects 565 ACLOCAL_AMFLAGS = -I automake 518 566 SRC = main.cc MakeLibCfa.cc CompilationState.cc CodeGen/Generate.cc \ 519 567 CodeGen/CodeGenerator.cc CodeGen/GenType.cc \ … … 547 595 ResolvExpr/Occurs.cc ResolvExpr/TypeEnvironment.cc \ 548 596 ResolvExpr/CurrentObject.cc ResolvExpr/ExplodedActual.cc \ 597 ResolvExpr/SpecCost.cc ResolvExpr/ResolveAssertions.cc \ 549 598 SymTab/Indexer.cc SymTab/Mangler.cc SymTab/ManglerCommon.cc \ 550 599 SymTab/Validate.cc SymTab/FixFunction.cc SymTab/Autogen.cc \ … … 654 703 ResolvExpr/PtrsCastable.cc \ 655 704 ResolvExpr/RenameVars.cc \ 705 ResolvExpr/ResolveAssertions.cc \ 656 706 ResolvExpr/Resolver.cc \ 657 707 ResolvExpr/ResolveTypeof.cc \ 708 ResolvExpr/SpecCost.cc \ 658 709 ResolvExpr/TypeEnvironment.cc \ 659 710 ResolvExpr/Unify.cc \ … … 672 723 673 724 .SUFFIXES: 674 .SUFFIXES: .cc .ll . o .obj .yy725 .SUFFIXES: .cc .ll .lo .o .obj .yy 675 726 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps) 676 727 @for dep in $?; do \ … … 904 955 ResolvExpr/RenameVars.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ 905 956 ResolvExpr/$(DEPDIR)/$(am__dirstamp) 957 ResolvExpr/ResolveAssertions.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ 958 ResolvExpr/$(DEPDIR)/$(am__dirstamp) 906 959 ResolvExpr/Resolver.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ 907 960 ResolvExpr/$(DEPDIR)/$(am__dirstamp) 908 961 ResolvExpr/ResolveTypeof.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ 962 ResolvExpr/$(DEPDIR)/$(am__dirstamp) 963 ResolvExpr/SpecCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ 909 964 ResolvExpr/$(DEPDIR)/$(am__dirstamp) 910 965 ResolvExpr/TypeEnvironment.$(OBJEXT): ResolvExpr/$(am__dirstamp) \ … … 957 1012 sed 's/$(EXEEXT)$$//' | \ 958 1013 while read p p1; do if test -f $$p \ 1014 || test -f $$p1 \ 959 1015 ; then echo "$$p"; echo "$$p"; else :; fi; \ 960 1016 done | \ … … 971 1027 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 972 1028 test -z "$$files" || { \ 973 echo " $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cfa_cpplibdir)$$dir'"; \974 $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cfa_cpplibdir)$$dir" || exit $$?; \1029 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cfa_cpplibdir)$$dir'"; \ 1030 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cfa_cpplibdir)$$dir" || exit $$?; \ 975 1031 } \ 976 1032 ; done … … 988 1044 989 1045 clean-cfa_cpplibPROGRAMS: 990 -test -z "$(cfa_cpplib_PROGRAMS)" || rm -f $(cfa_cpplib_PROGRAMS) 1046 @list='$(cfa_cpplib_PROGRAMS)'; test -n "$$list" || exit 0; \ 1047 echo " rm -f" $$list; \ 1048 rm -f $$list || exit $$?; \ 1049 test -n "$(EXEEXT)" || exit 0; \ 1050 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 1051 echo " rm -f" $$list; \ 1052 rm -f $$list 991 1053 CodeGen/Generate.$(OBJEXT): CodeGen/$(am__dirstamp) \ 992 1054 CodeGen/$(DEPDIR)/$(am__dirstamp) … … 1158 1220 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/PtrsCastable.Po@am__quote@ 1159 1221 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/RenameVars.Po@am__quote@ 1222 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/ResolveAssertions.Po@am__quote@ 1160 1223 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/ResolveTypeof.Po@am__quote@ 1161 1224 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/Resolver.Po@am__quote@ 1225 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/SpecCost.Po@am__quote@ 1162 1226 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/TypeEnvironment.Po@am__quote@ 1163 1227 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/Unify.Po@am__quote@ … … 1226 1290 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 1227 1291 1292 .cc.lo: 1293 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 1294 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 1295 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 1296 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 1297 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1298 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 1299 1228 1300 .ll.cc: 1229 1301 $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) … … 1231 1303 .yy.cc: 1232 1304 $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) 1305 1306 mostlyclean-libtool: 1307 -rm -f *.lo 1308 1309 clean-libtool: 1310 -rm -rf .libs _libs 1311 -rm -rf ../driver/.libs ../driver/_libs 1233 1312 1234 1313 ID: $(am__tagged_files) … … 1390 1469 clean: clean-am 1391 1470 1392 clean-am: clean-cfa_cpplibPROGRAMS clean-generic clean- noinstLIBRARIES\1393 mostlyclean-am1471 clean-am: clean-cfa_cpplibPROGRAMS clean-generic clean-libtool \ 1472 clean-noinstLIBRARIES mostlyclean-am 1394 1473 1395 1474 distclean: distclean-am … … 1446 1525 mostlyclean: mostlyclean-am 1447 1526 1448 mostlyclean-am: mostlyclean-compile mostlyclean-generic 1527 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 1528 mostlyclean-libtool 1449 1529 1450 1530 pdf: pdf-am … … 1461 1541 1462 1542 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 1463 clean-cfa_cpplibPROGRAMS clean-generic clean-noinstLIBRARIES \ 1464 cscopelist-am ctags ctags-am distclean distclean-compile \ 1465 distclean-generic distclean-tags distdir dvi dvi-am html \ 1466 html-am info info-am install install-am \ 1467 install-cfa_cpplibPROGRAMS install-data install-data-am \ 1468 install-dvi install-dvi-am install-exec install-exec-am \ 1469 install-html install-html-am install-info install-info-am \ 1470 install-man install-pdf install-pdf-am install-ps \ 1471 install-ps-am install-strip installcheck installcheck-am \ 1472 installdirs maintainer-clean maintainer-clean-generic \ 1473 mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ 1474 ps ps-am tags tags-am uninstall uninstall-am \ 1543 clean-cfa_cpplibPROGRAMS clean-generic clean-libtool \ 1544 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ 1545 distclean-compile distclean-generic distclean-libtool \ 1546 distclean-tags distdir dvi dvi-am html html-am info info-am \ 1547 install install-am install-cfa_cpplibPROGRAMS install-data \ 1548 install-data-am install-dvi install-dvi-am install-exec \ 1549 install-exec-am install-html install-html-am install-info \ 1550 install-info-am install-man install-pdf install-pdf-am \ 1551 install-ps install-ps-am install-strip installcheck \ 1552 installcheck-am installdirs maintainer-clean \ 1553 maintainer-clean-generic mostlyclean mostlyclean-compile \ 1554 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 1555 tags tags-am uninstall uninstall-am \ 1475 1556 uninstall-cfa_cpplibPROGRAMS 1476 1557 -
src/Parser/TypeData.cc
r5e49e47 rd0c91a6 322 322 function.params->printList( os, indent + 4 ); 323 323 } else { 324 os << string( indent + 2, ' ' ) << "with no parameters 324 os << string( indent + 2, ' ' ) << "with no parameters" << endl; 325 325 } // if 326 326 if ( function.idList ) { … … 347 347 os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl; 348 348 if ( aggregate.params ) { 349 os << string( indent + 2, ' ' ) << "with type parameters 349 os << string( indent + 2, ' ' ) << "with type parameters" << endl; 350 350 aggregate.params->printList( os, indent + 4 ); 351 351 } // if 352 352 if ( aggregate.actuals ) { 353 os << string( indent + 2, ' ' ) << "instantiated with actual parameters 353 os << string( indent + 2, ' ' ) << "instantiated with actual parameters" << endl; 354 354 aggregate.actuals->printList( os, indent + 4 ); 355 355 } // if 356 356 if ( aggregate.fields ) { 357 os << string( indent + 2, ' ' ) << "with members 357 os << string( indent + 2, ' ' ) << "with members" << endl; 358 358 aggregate.fields->printList( os, indent + 4 ); 359 359 } // if 360 360 if ( aggregate.body ) { 361 os << string( indent + 2, ' ' ) << " with body 361 os << string( indent + 2, ' ' ) << " with body" << endl; 362 362 } // if 363 363 break; … … 370 370 } // if 371 371 if ( aggInst.params ) { 372 os << string( indent + 2, ' ' ) << "with parameters 372 os << string( indent + 2, ' ' ) << "with parameters" << endl; 373 373 aggInst.params->printList( os, indent + 2 ); 374 374 } // if … … 381 381 } // if 382 382 if ( enumeration.body ) { 383 os << string( indent + 2, ' ' ) << " with body 383 os << string( indent + 2, ' ' ) << " with body" << endl; 384 384 } // if 385 385 break; … … 418 418 os << "tuple "; 419 419 if ( tuple ) { 420 os << "with members 420 os << "with members" << endl; 421 421 tuple->printList( os, indent + 2 ); 422 422 } // if … … 942 942 assert( td->typeexpr ); 943 943 // assert( td->typeexpr->expr ); 944 return new TypeofType{ 944 return new TypeofType{ 945 945 buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof }; 946 946 } // buildTypeof -
src/ResolvExpr/Alternative.cc
r5e49e47 rd0c91a6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:44:23 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat May 16 23:54:23 201513 // Update Count : 211 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Thu Oct 11 10:55:00 2018 13 // Update Count : 3 14 14 // 15 15 … … 20 20 #include <utility> // for move 21 21 22 #include "Common/utility.h" // for maybeClone22 #include "Common/utility.h" // for cloneAll 23 23 #include "ResolvExpr/Cost.h" // for Cost, Cost::zero, operator<< 24 24 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment … … 27 27 28 28 namespace ResolvExpr { 29 Alternative::Alternative() : cost( Cost::zero ), cvtCost( Cost::zero ), expr( nullptr ) {} 29 Alternative::Alternative() 30 : cost( Cost::zero ), cvtCost( Cost::zero ), expr( nullptr ), env(), openVars(), need() {} 30 31 31 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost ) 32 : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( env ) {} 32 Alternative::Alternative( Expression *expr, const TypeEnvironment &env ) 33 : cost( Cost::zero ), cvtCost( Cost::zero ), expr( expr ), env( env ), openVars(), need() {} 34 35 Alternative::Alternative( const Alternative &o, Expression *expr, const Cost &cost ) 36 : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( o.env ), openVars( o.openVars ), 37 need() { cloneAll( o.need, need ); } 33 38 34 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost, const Cost &cvtCost ) 35 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ) {} 39 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, 40 const OpenVarSet& openVars, const AssertionList& oneed, const Cost& cost ) 41 : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( env ), openVars( openVars ), 42 need() { cloneAll( oneed, need ); } 36 43 37 Alternative::Alternative( const Alternative &other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( maybeClone( other.expr ) ), env( other.env ) { 38 } 44 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, 45 const OpenVarSet& openVars, const AssertionList& oneed, const Cost& cost, 46 const Cost &cvtCost ) 47 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ), openVars( openVars ), 48 need() { cloneAll( oneed, need ); } 49 50 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, 51 const OpenVarSet &openVars, const AssertionSet &oneed, const Cost &cost) 52 : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( env ), openVars( openVars ), 53 need() { cloneAll( oneed, need ); } 54 55 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, 56 const OpenVarSet &openVars, const AssertionSet &oneed, const Cost &cost, 57 const Cost& cvtCost ) 58 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ), openVars( openVars ), 59 need() { cloneAll( oneed, need ); } 60 61 Alternative::Alternative( Expression *expr, TypeEnvironment &&env, OpenVarSet &&openVars, 62 AssertionSet &&needSet, const Cost &cost ) 63 : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( std::move(env) ), 64 openVars( std::move(openVars) ), need( needSet.begin(), needSet.end() ) {} 65 66 Alternative::Alternative( Expression *expr, TypeEnvironment &&env, OpenVarSet &&openVars, 67 AssertionSet &&needSet, const Cost &cost, const Cost &cvtCost ) 68 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( std::move(env) ), 69 openVars( std::move(openVars) ), need( needSet.begin(), needSet.end() ) {} 70 71 Alternative::Alternative( const Alternative &other ) 72 : cost( other.cost ), cvtCost( other.cvtCost ), expr( maybeClone( other.expr ) ), 73 env( other.env ), openVars( other.openVars ), need() { cloneAll( other.need, need ); } 39 74 40 75 Alternative &Alternative::operator=( const Alternative &other ) { … … 45 80 expr = maybeClone( other.expr ); 46 81 env = other.env; 82 openVars = other.openVars; 83 need.clear(); 84 cloneAll( other.need, need ); 47 85 return *this; 48 86 } 49 87 50 Alternative::Alternative( Alternative && other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( other.expr ), env( std::move( other.env ) ) { 51 other.expr = nullptr; 52 } 88 Alternative::Alternative( Alternative && other ) 89 : cost( other.cost ), cvtCost( other.cvtCost ), expr( other.expr ), 90 env( std::move( other.env ) ), openVars( std::move( other.openVars ) ), 91 need( std::move( other.need ) ) { other.expr = nullptr; } 53 92 54 93 Alternative & Alternative::operator=( Alternative && other ) { … … 59 98 expr = other.expr; 60 99 env = std::move( other.env ); 100 openVars = std::move( other.openVars ); 101 need = std::move( other.need ); 61 102 other.expr = nullptr; 62 103 return *this; … … 64 105 65 106 Alternative::~Alternative() { 107 for ( AssertionItem& n : need ) { delete n.decl; } 66 108 delete expr; 67 109 } … … 78 120 os << "Null expression!" << std::endl; 79 121 } // if 80 os << indent << "Environment: 122 os << indent << "Environment:"; 81 123 env.print( os, indent+1 ); 82 124 os << std::endl; -
src/ResolvExpr/Alternative.h
r5e49e47 rd0c91a6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:45:43 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:36:36 201713 // Update Count : 311 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Thu Oct 11 10:55:00 2018 13 // Update Count : 4 14 14 // 15 15 … … 20 20 21 21 #include "Cost.h" // for Cost 22 #include "TypeEnvironment.h" // for TypeEnvironment 22 #include "TypeEnvironment.h" // for TypeEnvironment, AssertionSetValue 23 24 #include "Common/utility.h" // for maybeClone 23 25 24 26 class Expression; 25 27 26 28 namespace ResolvExpr { 29 /// One assertion to resolve 30 struct AssertionItem { 31 DeclarationWithType* decl; 32 AssertionSetValue info; 33 34 AssertionItem() = default; 35 AssertionItem( DeclarationWithType* decl, const AssertionSetValue& info ) 36 : decl(decl), info(info) {} 37 AssertionItem( const AssertionSet::value_type& e ) : decl(e.first), info(e.second) {} 38 operator AssertionSet::value_type () const { return { decl, info }; } 39 40 // to support cloneAll 41 AssertionItem clone() const { return { maybeClone(decl), info }; } 42 }; 43 /// A list of unresolved assertions 44 using AssertionList = std::vector<AssertionItem>; 45 46 /// Clones an assertion list into an assertion set 47 static inline void cloneAll( const AssertionList& src, AssertionSet& dst ) { 48 for ( const AssertionItem& item : src ) { 49 dst.emplace( maybeClone(item.decl), item.info ); 50 } 51 } 52 53 /// Clones an assertion set into an assertion list 54 static inline void cloneAll( const AssertionSet& src, AssertionList& dst ) { 55 dst.reserve( dst.size() + src.size() ); 56 for ( const auto& entry : src ) { 57 dst.emplace_back( maybeClone(entry.first), entry.second ); 58 } 59 } 60 61 /// Clones an assertion list into an assertion list 62 static inline void cloneAll( const AssertionList& src, AssertionList& dst ) { 63 dst.reserve( dst.size() + src.size() ); 64 for ( const AssertionItem& item : src ) { 65 dst.emplace_back( maybeClone(item.decl), item.info ); 66 } 67 } 68 69 /// One option for resolution of an expression 27 70 struct Alternative { 28 71 Alternative(); 29 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost ); 30 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost ); 72 Alternative( Expression *expr, const TypeEnvironment &env ); 73 Alternative( const Alternative &o, Expression *expr, const Cost &cost ); 74 Alternative( Expression *expr, const TypeEnvironment &env, const OpenVarSet& openVars, 75 const AssertionList& need, const Cost &cost ); 76 Alternative( Expression *expr, const TypeEnvironment &env, const OpenVarSet& openVars, 77 const AssertionList& need, const Cost &cost, const Cost &cvtCost ); 78 Alternative( Expression *expr, const TypeEnvironment &env, const OpenVarSet &openVars, 79 const AssertionSet &need, const Cost &cost); 80 Alternative( Expression *expr, const TypeEnvironment &env, const OpenVarSet &openVars, 81 const AssertionSet &need, const Cost &cost, const Cost& cvtCost ); 82 Alternative( Expression *expr, TypeEnvironment &&env, OpenVarSet &&openVars, 83 AssertionSet &&need, const Cost &cost ); 84 Alternative( Expression *expr, TypeEnvironment &&env, OpenVarSet &&openVars, 85 AssertionSet &&need, const Cost &cost, const Cost &cvtCost ); 31 86 Alternative( const Alternative &other ); 32 87 Alternative &operator=( const Alternative &other ); … … 44 99 } 45 100 46 Cost cost; 47 Cost cvtCost; 48 Expression *expr; 49 TypeEnvironment env; 101 /// Sorts by cost 102 bool operator< ( const Alternative& o ) const { return cost < o.cost; } 103 104 Cost cost; ///< Cost of the whole expression 105 Cost cvtCost; ///< Cost of conversions to the satisfying expression 106 Expression *expr; ///< Satisfying expression 107 TypeEnvironment env; ///< Containing type environment 108 OpenVarSet openVars; ///< Open variables for environment 109 AssertionList need; ///< Assertions which need to be resolved 50 110 }; 51 111 -
src/ResolvExpr/AlternativeFinder.cc
r5e49e47 rd0c91a6 11 11 // Last Modified By : Peter A. Buhr 12 12 // Last Modified On : Thu Nov 1 21:00:56 2018 13 // Update Count : 3 413 // Update Count : 35 14 14 // 15 15 … … 34 34 #include "InitTweak/InitTweak.h" // for getFunctionName 35 35 #include "RenameVars.h" // for RenameVars, global_renamer 36 #include "ResolveAssertions.h" // for resolveAssertions 36 37 #include "ResolveTypeof.h" // for resolveTypeof 37 38 #include "Resolver.h" // for resolveStmtExpr … … 102 103 void addAnonConversions( const Alternative & alt ); 103 104 /// Adds alternatives for member expressions, given the aggregate, conversion cost for that aggregate, and name of the member 104 template< typename StructOrUnionType > void addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const TypeEnvironment & env, const std::string & name );105 template< typename StructOrUnionType > void addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Alternative &alt, const Cost &newCost, const std::string & name ); 105 106 /// Adds alternatives for member expressions where the left side has tuple type 106 void addTupleMembers( TupleType * tupleType, Expression *expr, const Cost &newCost, const TypeEnvironment & env, Expression *member );107 void addTupleMembers( TupleType *tupleType, Expression *expr, const Alternative &alt, const Cost &newCost, Expression *member ); 107 108 /// Adds alternatives for offsetof expressions, given the base type and name of the member 108 109 template< typename StructOrUnionType > void addOffsetof( StructOrUnionType *aggInst, const std::string &name ); … … 113 114 template<typename OutputIterator> 114 115 void makeFunctionAlternatives( const Alternative &func, FunctionType *funcType, const ExplodedArgs& args, OutputIterator out ); 115 /// Checks if assertion parameters match for a newalternative116 /// Sets up parameter inference for an output alternative 116 117 template< typename OutputIterator > 117 void inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out );118 void inferParameters( Alternative &newAlt, OutputIterator out ); 118 119 private: 119 120 AlternativeFinder & altFinder; … … 244 245 } 245 246 246 void AlternativeFinder::find( Expression *expr, bool adjust, bool prune, bool failFast) {247 void AlternativeFinder::find( Expression *expr, ResolvMode mode ) { 247 248 PassVisitor<Finder> finder( *this ); 248 249 expr->accept( finder ); 249 if ( failFast && alternatives.empty() ) {250 if ( mode.failFast && alternatives.empty() ) { 250 251 PRINT( 251 252 std::cerr << "No reasonable alternatives for expression " << expr << std::endl; … … 253 254 SemanticError( expr, "No reasonable alternatives for expression " ); 254 255 } 255 if ( prune ) { 256 if ( mode.resolveAssns || mode.prune ) { 257 // trim candidates just to those where the assertions resolve 258 // - necessary pre-requisite to pruning 259 AltList candidates; 260 for ( unsigned i = 0; i < alternatives.size(); ++i ) { 261 resolveAssertions( alternatives[i], indexer, candidates ); 262 } 263 // fail early if none such 264 if ( mode.failFast && candidates.empty() ) { 265 std::ostringstream stream; 266 stream << "No resolvable alternatives for expression " << expr << "\n" 267 << "Alternatives with failing assertions are:\n"; 268 printAlts( alternatives, stream, 1 ); 269 SemanticError( expr->location, stream.str() ); 270 } 271 // reset alternatives 272 alternatives = std::move( candidates ); 273 } 274 if ( mode.prune ) { 256 275 auto oldsize = alternatives.size(); 257 276 PRINT( … … 261 280 AltList pruned; 262 281 pruneAlternatives( alternatives.begin(), alternatives.end(), back_inserter( pruned ) ); 263 if ( failFast && pruned.empty() ) {282 if ( mode.failFast && pruned.empty() ) { 264 283 std::ostringstream stream; 265 284 AltList winners; … … 280 299 } 281 300 // adjust types after pruning so that types substituted by pruneAlternatives are correctly adjusted 282 for ( AltList::iterator i = alternatives.begin(); i != alternatives.end(); ++i) {283 if ( adjust) {284 adjustExprType( i ->expr->get_result(), i->env, indexer );301 if ( mode.adjust ) { 302 for ( Alternative& i : alternatives ) { 303 adjustExprType( i.expr->get_result(), i.env, indexer ); 285 304 } 286 305 } … … 294 313 295 314 void AlternativeFinder::findWithAdjustment( Expression *expr ) { 296 find( expr, true);315 find( expr, ResolvMode::withAdjustment() ); 297 316 } 298 317 299 318 void AlternativeFinder::findWithoutPrune( Expression * expr ) { 300 find( expr, true, false);319 find( expr, ResolvMode::withoutPrune() ); 301 320 } 302 321 303 322 void AlternativeFinder::maybeFind( Expression * expr ) { 304 find( expr, true, true, false);323 find( expr, ResolvMode::withoutFailFast() ); 305 324 } 306 325 … … 317 336 318 337 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->result ) ) { 319 addAggMembers( structInst, aggrExpr.get(), alt .cost+Cost::safe, alt.env, "" );338 addAggMembers( structInst, aggrExpr.get(), alt, alt.cost+Cost::safe, "" ); 320 339 } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->result ) ) { 321 addAggMembers( unionInst, aggrExpr.get(), alt .cost+Cost::safe, alt.env, "" );340 addAggMembers( unionInst, aggrExpr.get(), alt, alt.cost+Cost::safe, "" ); 322 341 } // if 323 342 } 324 343 325 344 template< typename StructOrUnionType > 326 void AlternativeFinder::Finder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const TypeEnvironment & env, const std::string & name ) {345 void AlternativeFinder::Finder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Alternative& alt, const Cost &newCost, const std::string & name ) { 327 346 std::list< Declaration* > members; 328 347 aggInst->lookup( name, members ); … … 332 351 // addAnonAlternatives uses vector::push_back, which invalidates references to existing elements, so 333 352 // can't construct in place and use vector::back 334 Alternative newAlt ( new MemberExpr( dwt, expr->clone() ), env, newCost );353 Alternative newAlt{ alt, new MemberExpr{ dwt, expr->clone() }, newCost }; 335 354 renameTypes( newAlt.expr ); 336 355 addAnonConversions( newAlt ); // add anonymous member interpretations whenever an aggregate value type is seen as a member expression. … … 342 361 } 343 362 344 void AlternativeFinder::Finder::addTupleMembers( TupleType * tupleType, Expression *expr, const Cost &newCost, const TypeEnvironment & env, Expression *member ) {363 void AlternativeFinder::Finder::addTupleMembers( TupleType *tupleType, Expression *expr, const Alternative &alt, const Cost &newCost, Expression *member ) { 345 364 if ( ConstantExpr * constantExpr = dynamic_cast< ConstantExpr * >( member ) ) { 346 365 // get the value of the constant expression as an int, must be between 0 and the length of the tuple type to have meaning … … 348 367 std::string tmp; 349 368 if ( val >= 0 && (unsigned long long)val < tupleType->size() ) { 350 alternatives.push_back( Alternative( new TupleIndexExpr( expr->clone(), val ), env, newCost ) ); 369 alternatives.push_back( Alternative{ 370 alt, new TupleIndexExpr( expr->clone(), val ), newCost } ); 351 371 } // if 352 372 } // if … … 354 374 355 375 void AlternativeFinder::Finder::postvisit( ApplicationExpr *applicationExpr ) { 356 alternatives.push_back( Alternative ( applicationExpr->clone(), env, Cost::zero ));376 alternatives.push_back( Alternative{ applicationExpr->clone(), env } ); 357 377 } 358 378 … … 410 430 Cost computeApplicationConversionCost( Alternative &alt, const SymTab::Indexer &indexer ) { 411 431 ApplicationExpr *appExpr = strict_dynamic_cast< ApplicationExpr* >( alt.expr ); 412 PointerType *pointer = strict_dynamic_cast< PointerType* >( appExpr-> get_function()->get_result());413 FunctionType *function = strict_dynamic_cast< FunctionType* >( pointer-> get_base());432 PointerType *pointer = strict_dynamic_cast< PointerType* >( appExpr->function->result ); 433 FunctionType *function = strict_dynamic_cast< FunctionType* >( pointer->base ); 414 434 415 435 Cost convCost = Cost::zero; 416 std::list< DeclarationWithType* >& formals = function-> get_parameters();436 std::list< DeclarationWithType* >& formals = function->parameters; 417 437 std::list< DeclarationWithType* >::iterator formal = formals.begin(); 418 std::list< Expression* >& actuals = appExpr-> get_args();419 420 for ( std::list< Expression* >::iterator actualExpr = actuals.begin(); actualExpr != actuals.end(); ++actualExpr) {421 Type * actualType = (*actualExpr)->get_result();438 std::list< Expression* >& actuals = appExpr->args; 439 440 for ( Expression*& actualExpr : actuals ) { 441 Type * actualType = actualExpr->result; 422 442 PRINT( 423 443 std::cerr << "actual expression:" << std::endl; 424 (*actualExpr)->print( std::cerr, 8 );444 actualExpr->print( std::cerr, 8 ); 425 445 std::cerr << "--- results are" << std::endl; 426 446 actualType->print( std::cerr, 8 ); 427 447 ) 428 448 if ( formal == formals.end() ) { 429 if ( function-> get_isVarArgs()) {449 if ( function->isVarArgs ) { 430 450 convCost.incUnsafe(); 431 451 PRINT( std::cerr << "end of formals with varargs function: inc unsafe: " << convCost << std::endl; ; ) 432 452 // convert reference-typed expressions to value-typed expressions 433 referenceToRvalueConversion( *actualExpr, convCost );453 referenceToRvalueConversion( actualExpr, convCost ); 434 454 continue; 435 455 } else { … … 437 457 } 438 458 } 439 if ( DefaultArgExpr * def = dynamic_cast< DefaultArgExpr * >( *actualExpr ) ) {459 if ( DefaultArgExpr * def = dynamic_cast< DefaultArgExpr * >( actualExpr ) ) { 440 460 // default arguments should be free - don't include conversion cost. 441 461 // Unwrap them here because they are not relevant to the rest of the system. 442 *actualExpr = def->expr;462 actualExpr = def->expr; 443 463 ++formal; 444 464 continue; 445 465 } 466 // mark conversion cost to formal and also specialization cost of formal type 446 467 Type * formalType = (*formal)->get_type(); 447 convCost += computeExpressionConversionCost( *actualExpr, formalType, indexer, alt.env ); 468 convCost += computeExpressionConversionCost( actualExpr, formalType, indexer, alt.env ); 469 convCost.decSpec( specCost( formalType ) ); 448 470 ++formal; // can't be in for-loop update because of the continue 449 471 } … … 452 474 } 453 475 454 for ( InferredParams::const_iterator assert = appExpr->get_inferParams().begin(); assert != appExpr->get_inferParams().end(); ++assert ) { 476 // mark specialization cost of return types 477 for ( DeclarationWithType* returnVal : function->returnVals ) { 478 convCost.decSpec( specCost( returnVal->get_type() ) ); 479 } 480 481 // mark type variable and specialization cost of forall clause 482 convCost.incVar( function->forall.size() ); 483 for ( TypeDecl* td : function->forall ) { 484 convCost.decSpec( td->assertions.size() ); 485 } 486 487 // xxx -- replace with new costs in resolver 488 for ( InferredParams::const_iterator assert = appExpr->inferParams.begin(); assert != appExpr->inferParams.end(); ++assert ) { 455 489 convCost += computeConversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env ); 456 490 } … … 466 500 needAssertions[ *assert ].isUsed = true; 467 501 } 468 /// needAssertions.insert( needAssertions.end(), (*tyvar)->get_assertions().begin(), (*tyvar)->get_assertions().end() ); 469 } 470 } 471 472 static const int recursionLimit = /*10*/ 4; ///< Limit to depth of recursion satisfaction 473 474 void addToIndexer( AssertionSet &assertSet, SymTab::Indexer &indexer ) { 475 for ( AssertionSet::iterator i = assertSet.begin(); i != assertSet.end(); ++i ) { 476 if ( i->second.isUsed ) { 477 indexer.addId( i->first ); 478 } 479 } 480 } 481 482 template< typename ForwardIterator, typename OutputIterator > 483 void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) { 484 if ( newAlt.cost == Cost::infinity ) return; // don't proceed down this dead end 485 if ( begin == end ) { 486 if ( newNeed.empty() ) { 487 PRINT( 488 std::cerr << "all assertions satisfied, output alternative: "; 489 newAlt.print( std::cerr ); 490 std::cerr << std::endl; 491 ); 492 *out++ = newAlt; 493 return; 494 } else if ( level >= recursionLimit ) { 495 SemanticError( newAlt.expr->location, "Too many recursive assertions" ); 496 } else { 497 AssertionSet newerNeed; 498 PRINT( 499 std::cerr << "recursing with new set:" << std::endl; 500 printAssertionSet( newNeed, std::cerr, 8 ); 501 ) 502 inferRecursive( newNeed.begin(), newNeed.end(), newAlt, openVars, decls, newerNeed, level+1, indexer, out ); 503 return; 504 } 505 } 506 507 ForwardIterator cur = begin++; 508 if ( ! cur->second.isUsed ) { 509 inferRecursive( begin, end, newAlt, openVars, decls, newNeed, level, indexer, out ); 510 return; // xxx - should this continue? previously this wasn't here, and it looks like it should be 511 } 512 DeclarationWithType *curDecl = cur->first; 513 514 PRINT( 515 std::cerr << "inferRecursive: assertion is "; 516 curDecl->print( std::cerr ); 517 std::cerr << std::endl; 518 ) 519 std::list< SymTab::Indexer::IdData > candidates; 520 decls.lookupId( curDecl->get_name(), candidates ); 521 /// if ( candidates.empty() ) { std::cerr << "no candidates!" << std::endl; } 522 for ( const auto & data : candidates ) { 523 DeclarationWithType * candidate = data.id; 524 PRINT( 525 std::cerr << "inferRecursive: candidate is "; 526 candidate->print( std::cerr ); 527 std::cerr << std::endl; 528 ) 529 530 AssertionSet newHave, newerNeed( newNeed ); 531 TypeEnvironment newEnv( newAlt.env ); 532 OpenVarSet newOpenVars( openVars ); 533 Type *adjType = candidate->get_type()->clone(); 534 adjustExprType( adjType, newEnv, indexer ); 535 renameTyVars( adjType ); 536 PRINT( 537 std::cerr << "unifying "; 538 curDecl->get_type()->print( std::cerr ); 539 std::cerr << " with "; 540 adjType->print( std::cerr ); 541 std::cerr << std::endl; 542 ) 543 if ( unify( curDecl->get_type(), adjType, newEnv, newerNeed, newHave, newOpenVars, indexer ) ) { 544 PRINT( 545 std::cerr << "success!" << std::endl; 546 ) 547 SymTab::Indexer newDecls( decls ); 548 addToIndexer( newHave, newDecls ); 549 Alternative newerAlt( newAlt ); 550 newerAlt.env = newEnv; 551 assertf( candidate->get_uniqueId(), "Assertion candidate does not have a unique ID: %s", toString( candidate ).c_str() ); 552 553 // everything with an empty idChain was pulled in by the current assertion. 554 // add current assertion's idChain + current assertion's ID so that the correct inferParameters can be found. 555 for ( auto & a : newerNeed ) { 556 if ( a.second.idChain.empty() ) { 557 a.second.idChain = cur->second.idChain; 558 a.second.idChain.push_back( curDecl->get_uniqueId() ); 559 } 560 } 561 562 Expression *varExpr = data.combine( newerAlt.cvtCost ); 563 delete varExpr->get_result(); 564 varExpr->set_result( adjType->clone() ); 565 PRINT( 566 std::cerr << "satisfying assertion " << curDecl->get_uniqueId() << " "; 567 curDecl->print( std::cerr ); 568 std::cerr << " with declaration " << candidate->get_uniqueId() << " "; 569 candidate->print( std::cerr ); 570 std::cerr << std::endl; 571 ) 572 // follow the current assertion's ID chain to find the correct set of inferred parameters to add the candidate to (i.e. the set of inferred parameters belonging to the entity which requested the assertion parameter). 573 InferredParams * inferParameters = &newerAlt.expr->get_inferParams(); 574 for ( UniqueId id : cur->second.idChain ) { 575 inferParameters = (*inferParameters)[ id ].inferParams.get(); 576 } 577 // XXX: this is a memory leak, but adjType can't be deleted because it might contain assertions 578 (*inferParameters)[ curDecl->get_uniqueId() ] = ParamEntry( candidate->get_uniqueId(), adjType->clone(), curDecl->get_type()->clone(), varExpr ); 579 inferRecursive( begin, end, newerAlt, newOpenVars, newDecls, newerNeed, level, indexer, out ); 580 } else { 581 delete adjType; 582 } 583 } 584 } 502 } 503 } 504 505 /// Unique identifier for matching expression resolutions to their requesting expression 506 UniqueId globalResnSlot = 0; 585 507 586 508 template< typename OutputIterator > 587 void AlternativeFinder::Finder::inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out ) { 588 // PRINT( 589 // std::cerr << "inferParameters: assertions needed are" << std::endl; 590 // printAll( need, std::cerr, 8 ); 591 // ) 592 SymTab::Indexer decls( indexer ); 593 // PRINT( 594 // std::cerr << "============= original indexer" << std::endl; 595 // indexer.print( std::cerr ); 596 // std::cerr << "============= new indexer" << std::endl; 597 // decls.print( std::cerr ); 598 // ) 599 addToIndexer( have, decls ); 600 AssertionSet newNeed; 601 PRINT( 602 std::cerr << "env is: " << std::endl; 603 newAlt.env.print( std::cerr, 0 ); 604 std::cerr << std::endl; 605 ) 606 607 inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, 0, indexer, out ); 608 // PRINT( 609 // std::cerr << "declaration 14 is "; 610 // Declaration::declFromId 611 // *out++ = newAlt; 612 // ) 509 void AlternativeFinder::Finder::inferParameters( Alternative &newAlt, OutputIterator out ) { 510 // Set need bindings for any unbound assertions 511 UniqueId crntResnSlot = 0; // matching ID for this expression's assertions 512 for ( auto& assn : newAlt.need ) { 513 // skip already-matched assertions 514 if ( assn.info.resnSlot != 0 ) continue; 515 // assign slot for expression if needed 516 if ( crntResnSlot == 0 ) { crntResnSlot = ++globalResnSlot; } 517 // fix slot to assertion 518 assn.info.resnSlot = crntResnSlot; 519 } 520 // pair slot to expression 521 if ( crntResnSlot != 0 ) { newAlt.expr->resnSlots.push_back( crntResnSlot ); } 522 523 // add to output list, assertion resolution is deferred 524 *out++ = newAlt; 613 525 } 614 526 … … 951 863 } 952 864 // build and validate new alternative 953 Alternative newAlt ( appExpr, result.env, cost );865 Alternative newAlt{ appExpr, result.env, result.openVars, result.need, cost }; 954 866 PRINT( 955 867 std::cerr << "instantiate function success: " << appExpr << std::endl; … … 957 869 printAssertionSet( result.need, std::cerr, 8 ); 958 870 ) 959 inferParameters( result.need, result.have, newAlt, result.openVars, out );871 inferParameters( newAlt, out ); 960 872 } 961 873 … … 1202 1114 1203 1115 // function may return struct or union value, in which case we need to add alternatives 1204 // for implicit conversions to each of the anonymous members, must happen after findMinCost1116 // for implicit conversions to each of the anonymous members, must happen after findMinCost 1205 1117 // since anon conversions are never the cheapest expression 1206 1118 for ( const Alternative & alt : winners ) { … … 1234 1146 if ( isLvalue( alt.expr ) ) { 1235 1147 alternatives.push_back( 1236 Alternative{ new AddressExpr( alt.expr->clone() ), alt.env, alt.cost } );1148 Alternative{ alt, new AddressExpr( alt.expr->clone() ), alt.cost } ); 1237 1149 } // if 1238 1150 } // for … … 1240 1152 1241 1153 void AlternativeFinder::Finder::postvisit( LabelAddressExpr * expr ) { 1242 alternatives.push_back( Alternative{ expr->clone(), env , Cost::zero} );1154 alternatives.push_back( Alternative{ expr->clone(), env } ); 1243 1155 } 1244 1156 … … 1285 1197 AltList candidates; 1286 1198 for ( Alternative & alt : finder.alternatives ) { 1287 AssertionSet needAssertions, haveAssertions; 1288 OpenVarSet openVars; 1199 AssertionSet needAssertions( alt.need.begin(), alt.need.end() ); 1200 AssertionSet haveAssertions; 1201 OpenVarSet openVars{ alt.openVars }; 1289 1202 1290 1203 alt.env.extractOpenVars( openVars ); … … 1314 1227 // count one safe conversion for each value that is thrown away 1315 1228 thisCost.incSafe( discardedValues ); 1316 Alternative newAlt ( restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), alt.env,1317 alt.cost, thisCost );1318 inferParameters( needAssertions, haveAssertions, newAlt, openVars,1319 1229 Alternative newAlt{ 1230 restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 1231 alt.env, openVars, needAssertions, alt.cost + thisCost, thisCost }; 1232 inferParameters( newAlt, back_inserter( candidates ) ); 1320 1233 } // if 1321 1234 } // for … … 1330 1243 1331 1244 void AlternativeFinder::Finder::postvisit( VirtualCastExpr * castExpr ) { 1332 assertf( castExpr->get_result(), "Implic atevirtual cast targets not yet supported." );1245 assertf( castExpr->get_result(), "Implicit virtual cast targets not yet supported." ); 1333 1246 AlternativeFinder finder( indexer, env ); 1334 1247 // don't prune here, since it's guaranteed all alternatives will have the same type 1335 1248 finder.findWithoutPrune( castExpr->get_arg() ); 1336 1249 for ( Alternative & alt : finder.alternatives ) { 1337 alternatives.push_back( Alternative (1338 new VirtualCastExpr( alt.expr->clone(), castExpr->get_result()->clone() ),1339 alt. env, alt.cost ));1250 alternatives.push_back( Alternative{ 1251 alt, new VirtualCastExpr{ alt.expr->clone(), castExpr->get_result()->clone() }, 1252 alt.cost } ); 1340 1253 } 1341 1254 } … … 1365 1278 // find member of the given type 1366 1279 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->get_result() ) ) { 1367 addAggMembers( structInst, aggrExpr, cost, agg->env, get_member_name(memberExpr) );1280 addAggMembers( structInst, aggrExpr, *agg, cost, get_member_name(memberExpr) ); 1368 1281 } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->get_result() ) ) { 1369 addAggMembers( unionInst, aggrExpr, cost, agg->env, get_member_name(memberExpr) );1282 addAggMembers( unionInst, aggrExpr, *agg, cost, get_member_name(memberExpr) ); 1370 1283 } else if ( TupleType * tupleType = dynamic_cast< TupleType * >( aggrExpr->get_result() ) ) { 1371 addTupleMembers( tupleType, aggrExpr, cost, agg->env, memberExpr->get_member() );1284 addTupleMembers( tupleType, aggrExpr, *agg, cost, memberExpr->get_member() ); 1372 1285 } // if 1373 1286 } // for … … 1375 1288 1376 1289 void AlternativeFinder::Finder::postvisit( MemberExpr *memberExpr ) { 1377 alternatives.push_back( Alternative ( memberExpr->clone(), env, Cost::zero ));1290 alternatives.push_back( Alternative{ memberExpr->clone(), env } ); 1378 1291 } 1379 1292 … … 1388 1301 // addAnonAlternatives uses vector::push_back, which invalidates references to existing elements, so 1389 1302 // can't construct in place and use vector::back 1390 Alternative newAlt ( newExpr, env, Cost::zero, cost );1303 Alternative newAlt{ newExpr, env, OpenVarSet{}, AssertionList{}, Cost::zero, cost }; 1391 1304 PRINT( 1392 1305 std::cerr << "decl is "; … … 1406 1319 // not sufficient to clone here, because variable's type may have changed 1407 1320 // since the VariableExpr was originally created. 1408 alternatives.push_back( Alternative ( new VariableExpr( variableExpr->var ), env, Cost::zero ));1321 alternatives.push_back( Alternative{ new VariableExpr{ variableExpr->var }, env } ); 1409 1322 } 1410 1323 1411 1324 void AlternativeFinder::Finder::postvisit( ConstantExpr *constantExpr ) { 1412 alternatives.push_back( Alternative ( constantExpr->clone(), env, Cost::zero ));1325 alternatives.push_back( Alternative{ constantExpr->clone(), env } ); 1413 1326 } 1414 1327 … … 1416 1329 if ( sizeofExpr->get_isType() ) { 1417 1330 Type * newType = sizeofExpr->get_type()->clone(); 1418 alternatives.push_back( Alternative( new SizeofExpr( resolveTypeof( newType, indexer ) ), env, Cost::zero ) ); 1331 alternatives.push_back( Alternative{ 1332 new SizeofExpr{ resolveTypeof( newType, indexer ) }, env } ); 1419 1333 } else { 1420 1334 // find all alternatives for the argument to sizeof … … 1430 1344 Alternative &choice = winners.front(); 1431 1345 referenceToRvalueConversion( choice.expr, choice.cost ); 1432 alternatives.push_back( Alternative( new SizeofExpr( choice.expr->clone() ), choice.env, Cost::zero ) ); 1346 alternatives.push_back( Alternative{ 1347 choice, new SizeofExpr( choice.expr->clone() ), Cost::zero } ); 1433 1348 } // if 1434 1349 } … … 1437 1352 if ( alignofExpr->get_isType() ) { 1438 1353 Type * newType = alignofExpr->get_type()->clone(); 1439 alternatives.push_back( Alternative( new AlignofExpr( resolveTypeof( newType, indexer ) ), env, Cost::zero ) ); 1354 alternatives.push_back( Alternative{ 1355 new AlignofExpr{ resolveTypeof( newType, indexer ) }, env } ); 1440 1356 } else { 1441 1357 // find all alternatives for the argument to sizeof … … 1451 1367 Alternative &choice = winners.front(); 1452 1368 referenceToRvalueConversion( choice.expr, choice.cost ); 1453 alternatives.push_back( Alternative( new AlignofExpr( choice.expr->clone() ), choice.env, Cost::zero ) ); 1369 alternatives.push_back( Alternative{ 1370 choice, new AlignofExpr{ choice.expr->clone() }, Cost::zero } ); 1454 1371 } // if 1455 1372 } … … 1461 1378 for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) { 1462 1379 if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) { 1463 alternatives.push_back( Alternative( new OffsetofExpr( aggInst->clone(), dwt ), env, Cost::zero ) ); 1380 alternatives.push_back( Alternative{ 1381 new OffsetofExpr{ aggInst->clone(), dwt }, env } ); 1464 1382 renameTypes( alternatives.back().expr ); 1465 1383 } else { … … 1480 1398 1481 1399 void AlternativeFinder::Finder::postvisit( OffsetofExpr *offsetofExpr ) { 1482 alternatives.push_back( Alternative ( offsetofExpr->clone(), env, Cost::zero ));1400 alternatives.push_back( Alternative{ offsetofExpr->clone(), env } ); 1483 1401 } 1484 1402 1485 1403 void AlternativeFinder::Finder::postvisit( OffsetPackExpr *offsetPackExpr ) { 1486 alternatives.push_back( Alternative ( offsetPackExpr->clone(), env, Cost::zero ));1404 alternatives.push_back( Alternative{ offsetPackExpr->clone(), env } ); 1487 1405 } 1488 1406 … … 1504 1422 Cost cost = Cost::zero; 1505 1423 Expression * newExpr = data.combine( cost ); 1506 alternatives.push_back( Alternative( new AttrExpr( newExpr, argType->clone() ), env, Cost::zero, cost ) ); 1424 alternatives.push_back( Alternative{ 1425 new AttrExpr{ newExpr, argType->clone() }, env, OpenVarSet{}, 1426 AssertionList{}, Cost::zero, cost } ); 1507 1427 for ( DeclarationWithType * retVal : function->returnVals ) { 1508 1428 alternatives.back().expr->result = retVal->get_type()->clone(); … … 1543 1463 Cost cost = Cost::zero; 1544 1464 Expression * newExpr = data.combine( cost ); 1545 alternatives.push_back( Alternative( newExpr, env, Cost::zero, cost ) ); 1465 alternatives.push_back( Alternative{ 1466 newExpr, env, OpenVarSet{}, AssertionList{}, Cost::zero, cost } ); 1546 1467 renameTypes( alternatives.back().expr ); 1547 1468 } // for … … 1558 1479 for ( const Alternative & first : firstFinder.alternatives ) { 1559 1480 for ( const Alternative & second : secondFinder.alternatives ) { 1560 TypeEnvironment compositeEnv; 1561 compositeEnv.simpleCombine( first.env ); 1481 TypeEnvironment compositeEnv{ first.env }; 1562 1482 compositeEnv.simpleCombine( second.env ); 1563 1564 LogicalExpr *newExpr = new LogicalExpr( first.expr->clone(), second.expr->clone(), logicalExpr->get_isAnd() ); 1565 alternatives.push_back( Alternative( newExpr, compositeEnv, first.cost + second.cost ) ); 1483 OpenVarSet openVars{ first.openVars }; 1484 mergeOpenVars( openVars, second.openVars ); 1485 AssertionSet need; 1486 cloneAll( first.need, need ); 1487 cloneAll( second.need, need ); 1488 1489 LogicalExpr *newExpr = new LogicalExpr{ 1490 first.expr->clone(), second.expr->clone(), logicalExpr->get_isAnd() }; 1491 alternatives.push_back( Alternative{ 1492 newExpr, std::move(compositeEnv), std::move(openVars), 1493 AssertionList( need.begin(), need.end() ), first.cost + second.cost } ); 1566 1494 } 1567 1495 } … … 1584 1512 for ( const Alternative & second : secondFinder.alternatives ) { 1585 1513 for ( const Alternative & third : thirdFinder.alternatives ) { 1586 TypeEnvironment compositeEnv; 1587 compositeEnv.simpleCombine( first.env ); 1514 TypeEnvironment compositeEnv{ first.env }; 1588 1515 compositeEnv.simpleCombine( second.env ); 1589 1516 compositeEnv.simpleCombine( third.env ); 1590 1517 OpenVarSet openVars{ first.openVars }; 1518 mergeOpenVars( openVars, second.openVars ); 1519 mergeOpenVars( openVars, third.openVars ); 1520 AssertionSet need; 1521 cloneAll( first.need, need ); 1522 cloneAll( second.need, need ); 1523 cloneAll( third.need, need ); 1524 AssertionSet have; 1525 1591 1526 // unify true and false types, then infer parameters to produce new alternatives 1592 OpenVarSet openVars;1593 AssertionSet needAssertions, haveAssertions;1594 Alternative newAlt( 0, compositeEnv, first.cost + second.cost + third.cost );1595 1527 Type* commonType = nullptr; 1596 if ( unify( second.expr->result, third.expr->result, newAlt.env, needAssertions, haveAssertions, openVars, indexer, commonType ) ) { 1597 ConditionalExpr *newExpr = new ConditionalExpr( first.expr->clone(), second.expr->clone(), third.expr->clone() ); 1528 if ( unify( second.expr->result, third.expr->result, compositeEnv, 1529 need, have, openVars, indexer, commonType ) ) { 1530 ConditionalExpr *newExpr = new ConditionalExpr{ 1531 first.expr->clone(), second.expr->clone(), third.expr->clone() }; 1598 1532 newExpr->result = commonType ? commonType : second.expr->result->clone(); 1599 1533 // convert both options to the conditional result type 1600 newAlt.cost += computeExpressionConversionCost( newExpr->arg2, newExpr->result, indexer, newAlt.env ); 1601 newAlt.cost += computeExpressionConversionCost( newExpr->arg3, newExpr->result, indexer, newAlt.env ); 1602 newAlt.expr = newExpr; 1603 inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( alternatives ) ); 1534 Cost cost = first.cost + second.cost + third.cost; 1535 cost += computeExpressionConversionCost( 1536 newExpr->arg2, newExpr->result, indexer, compositeEnv ); 1537 cost += computeExpressionConversionCost( 1538 newExpr->arg3, newExpr->result, indexer, compositeEnv ); 1539 // output alternative 1540 Alternative newAlt{ 1541 newExpr, std::move(compositeEnv), std::move(openVars), 1542 AssertionList( need.begin(), need.end() ), cost }; 1543 inferParameters( newAlt, back_inserter( alternatives ) ); 1604 1544 } // if 1605 1545 } // for … … 1614 1554 secondFinder.findWithAdjustment( commaExpr->get_arg2() ); 1615 1555 for ( const Alternative & alt : secondFinder.alternatives ) { 1616 alternatives.push_back( Alternative( new CommaExpr( newFirstArg->clone(), alt.expr->clone() ), alt.env, alt.cost ) ); 1556 alternatives.push_back( Alternative{ 1557 alt, new CommaExpr{ newFirstArg->clone(), alt.expr->clone() }, alt.cost } ); 1617 1558 } // for 1618 1559 delete newFirstArg; … … 1629 1570 for ( const Alternative & first : firstFinder.alternatives ) { 1630 1571 for ( const Alternative & second : secondFinder.alternatives ) { 1631 TypeEnvironment compositeEnv; 1632 compositeEnv.simpleCombine( first.env ); 1572 TypeEnvironment compositeEnv{ first.env }; 1633 1573 compositeEnv.simpleCombine( second.env ); 1634 OpenVarSet openVars; 1635 AssertionSet needAssertions, haveAssertions; 1636 Alternative newAlt( 0, compositeEnv, first.cost + second.cost ); 1574 OpenVarSet openVars{ first.openVars }; 1575 mergeOpenVars( openVars, second.openVars ); 1576 AssertionSet need; 1577 cloneAll( first.need, need ); 1578 cloneAll( second.need, need ); 1579 AssertionSet have; 1580 1637 1581 Type* commonType = nullptr; 1638 if ( unify( first.expr->result, second.expr->result, newAlt.env, needAssertions, haveAssertions, openVars, indexer, commonType ) ) { 1639 RangeExpr * newExpr = new RangeExpr( first.expr->clone(), second.expr->clone() ); 1582 if ( unify( first.expr->result, second.expr->result, compositeEnv, need, have, 1583 openVars, indexer, commonType ) ) { 1584 RangeExpr * newExpr = 1585 new RangeExpr{ first.expr->clone(), second.expr->clone() }; 1640 1586 newExpr->result = commonType ? commonType : first.expr->result->clone(); 1641 newAlt.expr = newExpr; 1642 inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( alternatives ) ); 1587 Alternative newAlt{ 1588 newExpr, std::move(compositeEnv), std::move(openVars), 1589 AssertionList( need.begin(), need.end() ), first.cost + second.cost }; 1590 inferParameters( newAlt, back_inserter( alternatives ) ); 1643 1591 } // if 1644 1592 } // for … … 1658 1606 1659 1607 TypeEnvironment compositeEnv; 1660 simpleCombineEnvironments( alts.begin(), alts.end(), compositeEnv ); 1661 alternatives.push_back( 1662 Alternative{ new TupleExpr( exprs ), compositeEnv, sumCost( alts ) } ); 1608 OpenVarSet openVars; 1609 AssertionSet need; 1610 for ( const Alternative& alt : alts ) { 1611 compositeEnv.simpleCombine( alt.env ); 1612 mergeOpenVars( openVars, alt.openVars ); 1613 cloneAll( alt.need, need ); 1614 } 1615 1616 alternatives.push_back( Alternative{ 1617 new TupleExpr{ exprs }, std::move(compositeEnv), std::move(openVars), 1618 AssertionList( need.begin(), need.end() ), sumCost( alts ) } ); 1663 1619 } // for 1664 1620 } 1665 1621 1666 1622 void AlternativeFinder::Finder::postvisit( TupleExpr *tupleExpr ) { 1667 alternatives.push_back( Alternative ( tupleExpr->clone(), env, Cost::zero ));1623 alternatives.push_back( Alternative{ tupleExpr->clone(), env } ); 1668 1624 } 1669 1625 1670 1626 void AlternativeFinder::Finder::postvisit( ImplicitCopyCtorExpr * impCpCtorExpr ) { 1671 alternatives.push_back( Alternative ( impCpCtorExpr->clone(), env, Cost::zero ));1627 alternatives.push_back( Alternative{ impCpCtorExpr->clone(), env } ); 1672 1628 } 1673 1629 … … 1678 1634 finder.findWithoutPrune( ctorExpr->get_callExpr() ); 1679 1635 for ( Alternative & alt : finder.alternatives ) { 1680 alternatives.push_back( Alternative( new ConstructorExpr( alt.expr->clone() ), alt.env, alt.cost ) ); 1636 alternatives.push_back( Alternative{ 1637 alt, new ConstructorExpr( alt.expr->clone() ), alt.cost } ); 1681 1638 } 1682 1639 } 1683 1640 1684 1641 void AlternativeFinder::Finder::postvisit( TupleIndexExpr *tupleExpr ) { 1685 alternatives.push_back( Alternative ( tupleExpr->clone(), env, Cost::zero ));1642 alternatives.push_back( Alternative{ tupleExpr->clone(), env } ); 1686 1643 } 1687 1644 1688 1645 void AlternativeFinder::Finder::postvisit( TupleAssignExpr *tupleAssignExpr ) { 1689 alternatives.push_back( Alternative ( tupleAssignExpr->clone(), env, Cost::zero ));1646 alternatives.push_back( Alternative{ tupleAssignExpr->clone(), env } ); 1690 1647 } 1691 1648 … … 1696 1653 // ensure that the id is passed on to the UniqueExpr alternative so that the expressions are "linked" 1697 1654 UniqueExpr * newUnqExpr = new UniqueExpr( alt.expr->clone(), unqExpr->get_id() ); 1698 alternatives.push_back( Alternative ( newUnqExpr, alt.env, alt.cost ));1655 alternatives.push_back( Alternative{ alt, newUnqExpr, alt.cost } ); 1699 1656 } 1700 1657 } … … 1704 1661 ResolvExpr::resolveStmtExpr( newStmtExpr, indexer ); 1705 1662 // xxx - this env is almost certainly wrong, and needs to somehow contain the combined environments from all of the statements in the stmtExpr... 1706 alternatives.push_back( Alternative ( newStmtExpr, env, Cost::zero ));1663 alternatives.push_back( Alternative{ newStmtExpr, env } ); 1707 1664 } 1708 1665 … … 1726 1683 for ( Alternative & alt : finder.get_alternatives() ) { 1727 1684 TypeEnvironment newEnv( alt.env ); 1728 AssertionSet needAssertions, haveAssertions; 1729 OpenVarSet openVars; // find things in env that don't have a "representative type" and claim those are open vars? 1685 AssertionSet need; 1686 cloneAll( alt.need, need ); 1687 AssertionSet have; 1688 OpenVarSet openVars( alt.openVars ); 1689 // xxx - find things in env that don't have a "representative type" and claim 1690 // those are open vars? 1730 1691 PRINT( 1731 1692 std::cerr << " @ " << toType << " " << initAlt.designation << std::endl; 1732 1693 ) 1733 // It's possible that a cast can throw away some values in a multiply-valued expression. (An example is a 1734 // cast-to-void, which casts from one value to zero.) Figure out the prefix of the subexpression results 1735 // that are cast directly. The candidate is invalid if it has fewer results than there are types to cast 1736 // to. 1694 // It's possible that a cast can throw away some values in a multiply-valued 1695 // expression. (An example is a cast-to-void, which casts from one value to 1696 // zero.) Figure out the prefix of the subexpression results that are cast 1697 // directly. The candidate is invalid if it has fewer results than there are 1698 // types to cast to. 1737 1699 int discardedValues = alt.expr->result->size() - toType->size(); 1738 1700 if ( discardedValues < 0 ) continue; 1739 // xxx - may need to go into tuple types and extract relevant types and use unifyList. Note that currently, this does not 1740 // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3])) 1701 // xxx - may need to go into tuple types and extract relevant types and use 1702 // unifyList. Note that currently, this does not allow casting a tuple to an 1703 // atomic type (e.g. (int)([1, 2, 3])) 1704 1741 1705 // unification run for side-effects 1742 unify( toType, alt.expr->result, newEnv, needAssertions, haveAssertions, openVars, indexer ); // xxx - do some inspecting on this line... why isn't result bound to initAlt.type?? 1706 unify( toType, alt.expr->result, newEnv, need, have, openVars, indexer ); 1707 // xxx - do some inspecting on this line... why isn't result bound to initAlt.type? 1743 1708 1744 1709 Cost thisCost = castCost( alt.expr->result, toType, indexer, newEnv ); … … 1746 1711 // count one safe conversion for each value that is thrown away 1747 1712 thisCost.incSafe( discardedValues ); 1748 Alternative newAlt( new InitExpr( restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() ), newEnv, alt.cost, thisCost ); 1749 inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( candidates ) ); 1713 Alternative newAlt{ 1714 new InitExpr{ 1715 restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() }, 1716 std::move(newEnv), std::move(openVars), 1717 AssertionList( need.begin(), need.end() ), alt.cost, thisCost }; 1718 inferParameters( newAlt, back_inserter( candidates ) ); 1750 1719 } 1751 1720 } -
src/ResolvExpr/AlternativeFinder.h
r5e49e47 rd0c91a6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:56:12 2015 11 // Last Modified By : A ndrew Beach12 // Last Modified On : Wed Jul 26 11:24:00 201713 // Update Count : 411 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Fri Oct -5 10:01:00 2018 13 // Update Count : 5 14 14 // 15 15 … … 24 24 #include "ResolvExpr/Cost.h" // for Cost, Cost::infinity 25 25 #include "ResolvExpr/TypeEnvironment.h" // for AssertionSet, OpenVarSet 26 #include "ResolvMode.h" // for ResolvMode 26 27 #include "SynTree/Visitor.h" // for Visitor 27 28 #include "SynTree/SynTree.h" // for Visitor Nodes … … 68 69 } 69 70 70 void find( Expression *expr, bool adjust = false, bool prune = true, bool failFast = true);71 void find( Expression *expr, ResolvMode mode = ResolvMode{} ); 71 72 /// Calls find with the adjust flag set; adjustment turns array and function types into equivalent pointer types 72 73 void findWithAdjustment( Expression *expr ); -
src/ResolvExpr/ConversionCost.cc
r5e49e47 rd0c91a6 28 28 29 29 namespace ResolvExpr { 30 const Cost Cost::zero = Cost( 0, 0, 0, 0 ); 31 const Cost Cost::infinity = Cost( -1, -1, -1, -1 ); 32 const Cost Cost::unsafe = Cost( 1, 0, 0, 0 ); 33 const Cost Cost::poly = Cost( 0, 1, 0, 0 ); 34 const Cost Cost::safe = Cost( 0, 0, 1, 0 ); 35 const Cost Cost::reference = Cost( 0, 0, 0, 1 ); 30 const Cost Cost::zero = Cost{ 0, 0, 0, 0, 0, 0 }; 31 const Cost Cost::infinity = Cost{ -1, -1, -1, -1, 1, -1 }; 32 const Cost Cost::unsafe = Cost{ 1, 0, 0, 0, 0, 0 }; 33 const Cost Cost::poly = Cost{ 0, 1, 0, 0, 0, 0 }; 34 const Cost Cost::safe = Cost{ 0, 0, 1, 0, 0, 0 }; 35 const Cost Cost::var = Cost{ 0, 0, 0, 1, 0, 0 }; 36 const Cost Cost::spec = Cost{ 0, 0, 0, 0, -1, 0 }; 37 const Cost Cost::reference = Cost{ 0, 0, 0, 0, 0, 1 }; 36 38 37 39 #if 0 -
src/ResolvExpr/Cost.h
r5e49e47 rd0c91a6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 09:39:50 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:35:55 201713 // Update Count : 511 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Fri Oct 05 14:32:00 2018 13 // Update Count : 7 14 14 // 15 15 … … 21 21 class Cost { 22 22 private: 23 Cost( int unsafeCost, int polyCost, int safeCost, int referenceCost ); 23 Cost( int unsafeCost, int polyCost, int safeCost, int varCost, int specCost, 24 int referenceCost ); 24 25 25 26 public: … … 27 28 Cost & incPoly( int inc = 1 ); 28 29 Cost & incSafe( int inc = 1 ); 30 Cost & incVar( int inc = 1 ); 31 Cost & decSpec( int inc = 1 ); 29 32 Cost & incReference( int inc = 1 ); 30 33 … … 32 35 int get_polyCost() const { return polyCost; } 33 36 int get_safeCost() const { return safeCost; } 37 int get_varCost() const { return varCost; } 38 int get_specCost() const { return specCost; } 34 39 int get_referenceCost() const { return referenceCost; } 35 40 … … 41 46 bool operator!=( const Cost &other ) const; 42 47 friend std::ostream &operator<<( std::ostream &os, const Cost &cost ); 48 // returns negative for *this < other, 0 for *this == other, positive for *this > other 49 int compare( const Cost &other ) const; 43 50 44 51 static const Cost zero; … … 48 55 static const Cost poly; 49 56 static const Cost safe; 57 static const Cost var; 58 static const Cost spec; 50 59 static const Cost reference; 60 51 61 private: 52 int compare( const Cost &other ) const;53 54 int unsafeCost;55 int polyCost;56 int s afeCost;57 int referenceCost; 62 int unsafeCost; ///< Unsafe (narrowing) conversions 63 int polyCost; ///< Count of parameters and return values bound to some poly type 64 int safeCost; ///< Safe (widening) conversions 65 int varCost; ///< Count of polymorphic type variables 66 int specCost; ///< Polymorphic type specializations (type assertions), negative cost 67 int referenceCost; ///< reference conversions 58 68 }; 59 69 60 inline Cost::Cost( int unsafeCost, int polyCost, int safeCost, int referenceCost ) : unsafeCost( unsafeCost ), polyCost( polyCost ), safeCost( safeCost ), referenceCost( referenceCost ) {} 70 inline Cost::Cost( int unsafeCost, int polyCost, int safeCost, int varCost, int specCost, 71 int referenceCost ) 72 : unsafeCost( unsafeCost ), polyCost( polyCost ), safeCost( safeCost ), varCost( varCost ), 73 specCost( specCost ), referenceCost( referenceCost ) {} 61 74 62 75 inline Cost & Cost::incUnsafe( int inc ) { … … 75 88 if ( *this == infinity ) return *this; 76 89 safeCost += inc; 90 return *this; 91 } 92 93 inline Cost & Cost::incVar( int inc ) { 94 if ( *this == infinity ) return *this; 95 varCost += inc; 96 return *this; 97 } 98 99 inline Cost& Cost::decSpec( int dec ) { 100 if ( *this == infinity ) return *this; 101 specCost -= dec; 77 102 return *this; 78 103 } … … 86 111 inline Cost Cost::operator+( const Cost &other ) const { 87 112 if ( *this == infinity || other == infinity ) return infinity; 88 return Cost( unsafeCost + other.unsafeCost, polyCost + other.polyCost, safeCost + other.safeCost, referenceCost + other.referenceCost ); 113 return Cost{ 114 unsafeCost + other.unsafeCost, polyCost + other.polyCost, safeCost + other.safeCost, 115 varCost + other.varCost, specCost + other.specCost, 116 referenceCost + other.referenceCost }; 89 117 } 90 118 91 119 inline Cost Cost::operator-( const Cost &other ) const { 92 120 if ( *this == infinity || other == infinity ) return infinity; 93 return Cost( unsafeCost - other.unsafeCost, polyCost - other.polyCost, safeCost - other.safeCost, referenceCost - other.referenceCost ); 121 return Cost{ 122 unsafeCost - other.unsafeCost, polyCost - other.polyCost, safeCost - other.safeCost, 123 varCost - other.varCost, specCost - other.specCost, 124 referenceCost - other.referenceCost }; 94 125 } 95 126 … … 103 134 polyCost += other.polyCost; 104 135 safeCost += other.safeCost; 136 varCost += other.varCost; 137 specCost += other.specCost; 105 138 referenceCost += other.referenceCost; 106 139 return *this; … … 123 156 } else if ( safeCost < other.safeCost ) { 124 157 return true; 158 } else if ( varCost > other.varCost ) { 159 return false; 160 } else if ( varCost < other.varCost ) { 161 return true; 162 } else if ( specCost > other.specCost ) { 163 return false; 164 } else if ( specCost > other.specCost ) { 165 return true; 125 166 } else if ( referenceCost > other.referenceCost ) { 126 167 return false; … … 130 171 return false; 131 172 } // if 173 } 174 175 inline int Cost::compare( const Cost &other ) const { 176 if ( *this == infinity ) return +1; 177 if ( other == infinity ) return -1; 178 179 int c = unsafeCost - other.unsafeCost; if ( c ) return c; 180 c = polyCost - other.polyCost; if ( c ) return c; 181 c = safeCost - other.safeCost; if ( c ) return c; 182 c = varCost - other.varCost; if ( c ) return c; 183 c = specCost - other.specCost; if ( c ) return c; 184 return referenceCost - other.referenceCost; 132 185 } 133 186 … … 136 189 && polyCost == other.polyCost 137 190 && safeCost == other.safeCost 191 && varCost == other.varCost 192 && specCost == other.specCost 138 193 && referenceCost == other.referenceCost; 139 194 } … … 144 199 145 200 inline std::ostream &operator<<( std::ostream &os, const Cost &cost ) { 146 os << "( " << cost.unsafeCost << ", " << cost.polyCost << ", " << cost.safeCost << ", " << cost.referenceCost << " )"; 147 return os; 201 return os << "( " << cost.unsafeCost << ", " << cost.polyCost << ", " 202 << cost.safeCost << ", " << cost.varCost << ", " << cost.specCost << ", " 203 << cost.referenceCost << " )"; 148 204 } 149 205 } // namespace ResolvExpr -
src/ResolvExpr/Resolver.cc
r5e49e47 rd0c91a6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:17:01 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Feb 17 11:19:40 201813 // Update Count : 21 311 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Fri Oct 05 09:43:00 2018 13 // Update Count : 214 14 14 // 15 15 16 #include <stddef.h> // for NULL17 16 #include <cassert> // for strict_dynamic_cast, assert 18 17 #include <memory> // for allocator, allocator_traits<... 19 18 #include <tuple> // for get 20 #include <vector> 19 #include <vector> // for vector 21 20 22 21 #include "Alternative.h" // for Alternative, AltList … … 31 30 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment 32 31 #include "Resolver.h" 32 #include "ResolvMode.h" // for ResolvMode 33 33 #include "SymTab/Autogen.h" // for SizeType 34 34 #include "SymTab/Indexer.h" // for Indexer … … 168 168 169 169 namespace { 170 void findUnfinishedKindExpression(Expression * untyped, Alternative & alt, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, bool adjust = false, bool prune = true, bool failFast = true) {170 void findUnfinishedKindExpression(Expression * untyped, Alternative & alt, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, ResolvMode mode = ResolvMode{} ) { 171 171 assertf( untyped, "expected a non-null expression." ); 172 173 // xxx - this isn't thread-safe, but should work until we parallelize the resolver 174 static unsigned recursion_level = 0; 175 176 ++recursion_level; 172 177 TypeEnvironment env; 173 178 AlternativeFinder finder( indexer, env ); 174 finder.find( untyped, adjust, prune, failFast ); 179 finder.find( untyped, recursion_level == 1 ? mode.atTopLevel() : mode ); 180 --recursion_level; 175 181 176 182 #if 0 … … 185 191 #endif 186 192 193 // produce filtered list of alternatives 187 194 AltList candidates; 188 195 for ( Alternative & alt : finder.get_alternatives() ) { … … 192 199 } 193 200 194 // xxx - if > 1 alternative with same cost, ignore deleted and pick from remaining 195 // choose the lowest cost expression among the candidates 201 // produce invalid error if no candidates 202 if ( candidates.empty() ) { 203 SemanticError( untyped, toString( "No reasonable alternatives for ", kindStr, (kindStr != "" ? " " : ""), "expression: ") ); 204 } 205 206 // search for cheapest candidate 196 207 AltList winners; 197 findMinCost( candidates.begin(), candidates.end(), back_inserter( winners ) ); 198 if ( winners.size() == 0 ) { 199 SemanticError( untyped, toString( "No reasonable alternatives for ", kindStr, (kindStr != "" ? " " : ""), "expression: ") ); 200 } else if ( winners.size() != 1 ) { 208 bool seen_undeleted = false; 209 for ( unsigned i = 0; i < candidates.size(); ++i ) { 210 int c = winners.empty() ? -1 : candidates[i].cost.compare( winners.front().cost ); 211 212 if ( c > 0 ) continue; // skip more expensive than winner 213 214 if ( c < 0 ) { 215 // reset on new cheapest 216 seen_undeleted = ! findDeletedExpr( candidates[i].expr ); 217 winners.clear(); 218 } else /* if ( c == 0 ) */ { 219 if ( findDeletedExpr( candidates[i].expr ) ) { 220 // skip deleted expression if already seen one equivalent-cost not 221 if ( seen_undeleted ) continue; 222 } else if ( ! seen_undeleted ) { 223 // replace list of equivalent-cost deleted expressions with one non-deleted 224 winners.clear(); 225 seen_undeleted = true; 226 } 227 } 228 229 winners.emplace_back( std::move( candidates[i] ) ); 230 } 231 232 // promote alternative.cvtCost to .cost 233 // xxx - I don't know why this is done, but I'm keeping the behaviour from findMinCost 234 for ( Alternative& winner : winners ) { 235 winner.cost = winner.cvtCost; 236 } 237 238 // produce ambiguous errors, if applicable 239 if ( winners.size() != 1 ) { 201 240 std::ostringstream stream; 202 241 stream << "Cannot choose between " << winners.size() << " alternatives for " << kindStr << (kindStr != "" ? " " : "") << "expression\n"; … … 207 246 } 208 247 209 // there is one unambiguous interpretation - move the expression into the with statement 210 Alternative & choice = winners.front(); 211 if ( findDeletedExpr( choice.expr ) ) { 248 // single selected choice 249 Alternative& choice = winners.front(); 250 251 // fail on only expression deleted 252 if ( ! seen_undeleted ) { 212 253 SemanticError( untyped->location, choice.expr, "Unique best alternative includes deleted identifier in " ); 213 254 } 255 256 // xxx - check for ambiguous expressions 257 258 // output selected choice 214 259 alt = std::move( choice ); 215 260 } 216 261 217 262 /// resolve `untyped` to the expression whose alternative satisfies `pred` with the lowest cost; kindStr is used for providing better error messages 218 void findKindExpression(Expression *& untyped, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, bool adjust = false, bool prune = true, bool failFast = true) {263 void findKindExpression(Expression *& untyped, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, ResolvMode mode = ResolvMode{}) { 219 264 if ( ! untyped ) return; 220 265 Alternative choice; 221 findUnfinishedKindExpression( untyped, choice, indexer, kindStr, pred, adjust, prune, failFast);266 findUnfinishedKindExpression( untyped, choice, indexer, kindStr, pred, mode ); 222 267 finishExpr( choice.expr, choice.env, untyped->env ); 223 268 delete untyped; … … 250 295 untyped.arg = expr; 251 296 Alternative choice; 252 findUnfinishedKindExpression( &untyped, choice, indexer, "", standardAlternativeFilter, true);297 findUnfinishedKindExpression( &untyped, choice, indexer, "", standardAlternativeFilter, ResolvMode::withAdjustment() ); 253 298 CastExpr * castExpr = strict_dynamic_cast< CastExpr * >( choice.expr ); 254 299 env = std::move( choice.env ); … … 357 402 358 403 void Resolver::previsit( ObjectDecl *objectDecl ) { 359 // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable360 // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes361 // initContext because of a function type can contain object declarations in the return and parameter types. So362 // each value of initContext is retained, so the type on the first analysis is preserved and used for selecting363 // the RHS.404 // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that 405 // class-variable initContext is changed multiple time because the LHS is analysed twice. 406 // The second analysis changes initContext because of a function type can contain object 407 // declarations in the return and parameter types. So each value of initContext is 408 // retained, so the type on the first analysis is preserved and used for selecting the RHS. 364 409 GuardValue( currentObject ); 365 410 currentObject = CurrentObject( objectDecl->get_type() ); … … 397 442 398 443 void Resolver::postvisit( FunctionDecl *functionDecl ) { 399 // default value expressions have an environment which shouldn't be there and trips up later passes. 400 // xxx - it might be necessary to somehow keep the information from this environment, but I can't currently 401 // see how it's useful. 444 // default value expressions have an environment which shouldn't be there and trips up 445 // later passes. 446 // xxx - it might be necessary to somehow keep the information from this environment, but I 447 // can't currently see how it's useful. 402 448 for ( Declaration * d : functionDecl->type->parameters ) { 403 449 if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( d ) ) { … … 749 795 initExpr->expr = nullptr; 750 796 std::swap( initExpr->env, newExpr->env ); 751 // InitExpr may have inferParams in the case where the expression specializes a function pointer, 752 // and newExpr may already have inferParams of its own, so a simple swap is not sufficient. 797 // InitExpr may have inferParams in the case where the expression specializes a function 798 // pointer, and newExpr may already have inferParams of its own, so a simple swap is not 799 // sufficient. 753 800 newExpr->spliceInferParams( initExpr ); 754 801 delete initExpr; 755 802 756 // get the actual object's type (may not exactly match what comes back from the resolver due to conversions) 803 // get the actual object's type (may not exactly match what comes back from the resolver 804 // due to conversions) 757 805 Type * initContext = currentObject.getCurrentType(); 758 806 … … 766 814 if ( isCharType( pt->get_base() ) ) { 767 815 if ( CastExpr *ce = dynamic_cast< CastExpr * >( newExpr ) ) { 768 // strip cast if we're initializing a char[] with a char *, e.g. char x[] = "hello"; 816 // strip cast if we're initializing a char[] with a char *, 817 // e.g. char x[] = "hello"; 769 818 newExpr = ce->get_arg(); 770 819 ce->set_arg( nullptr ); … … 788 837 // move cursor into brace-enclosed initializer-list 789 838 currentObject.enterListInit(); 790 // xxx - fix this so that the list isn't copied, iterator should be used to change current element 839 // xxx - fix this so that the list isn't copied, iterator should be used to change current 840 // element 791 841 std::list<Designation *> newDesignations; 792 842 for ( auto p : group_iterate(listInit->get_designations(), listInit->get_initializers()) ) { 793 // iterate designations and initializers in pairs, moving the cursor to the current designated object and resolving794 // the initializer against that object.843 // iterate designations and initializers in pairs, moving the cursor to the current 844 // designated object and resolving the initializer against that object. 795 845 Designation * des = std::get<0>(p); 796 846 Initializer * init = std::get<1>(p); … … 822 872 // fall back on C-style initializer 823 873 delete ctorInit->get_ctor(); 824 ctorInit->set_ctor( NULL);874 ctorInit->set_ctor( nullptr ); 825 875 delete ctorInit->get_dtor(); 826 ctorInit->set_dtor( NULL);876 ctorInit->set_dtor( nullptr ); 827 877 maybeAccept( ctorInit->get_init(), *visitor ); 828 878 } … … 867 917 868 918 // xxx - todo -- what about arrays? 869 // if ( dtor == NULL&& InitTweak::isIntrinsicCallStmt( ctorInit->get_ctor() ) ) {919 // if ( dtor == nullptr && InitTweak::isIntrinsicCallStmt( ctorInit->get_ctor() ) ) { 870 920 // // can reduce the constructor down to a SingleInit using the 871 921 // // second argument from the ctor call, since 872 922 // delete ctorInit->get_ctor(); 873 // ctorInit->set_ctor( NULL);923 // ctorInit->set_ctor( nullptr ); 874 924 875 925 // Expression * arg = -
src/ResolvExpr/TypeEnvironment.cc
r5e49e47 rd0c91a6 120 120 121 121 const EqvClass* TypeEnvironment::lookup( const std::string &var ) const { 122 for ( std::list< EqvClass >::const_iterator i = env.begin(); i != env.end(); ++i ) {122 for ( ClassList::const_iterator i = env.begin(); i != env.end(); ++i ) { 123 123 if ( i->vars.find( var ) != i->vars.end() ) return &*i; 124 124 } // for … … 168 168 169 169 void TypeEnvironment::makeSubstitution( TypeSubstitution &sub ) const { 170 for ( std::list< EqvClass >::const_iterator theClass = env.begin(); theClass != env.end(); ++theClass ) {170 for ( ClassList::const_iterator theClass = env.begin(); theClass != env.end(); ++theClass ) { 171 171 for ( std::set< std::string >::const_iterator theVar = theClass->vars.begin(); theVar != theClass->vars.end(); ++theVar ) { 172 172 if ( theClass->type ) { … … 188 188 } 189 189 190 std::list< EqvClass >::iterator TypeEnvironment::internal_lookup( const std::string &var ) {191 for ( std::list< EqvClass >::iterator i = env.begin(); i != env.end(); ++i ) {190 TypeEnvironment::ClassList::iterator TypeEnvironment::internal_lookup( const std::string &var ) { 191 for ( ClassList::iterator i = env.begin(); i != env.end(); ++i ) { 192 192 if ( i->vars.count( var ) ) return i; 193 193 } // for … … 199 199 } 200 200 201 // xxx -- this should maybe be worrying about iterator invalidation (see resolv-proto) 202 bool TypeEnvironment::mergeBound( EqvClass& to, const EqvClass& from, OpenVarSet& openVars, const SymTab::Indexer& indexer ) { 203 if ( from.type ) { 204 if ( to.type ) { 205 // attempt to unify bound types 206 std::unique_ptr<Type> toType{ to.type->clone() }, fromType{ from.type->clone() }; 207 WidenMode widenMode{ to.allowWidening, from.allowWidening }; 208 Type* common = nullptr; 209 AssertionSet need, have; 210 if ( unifyInexact( toType.get(), fromType.get(), *this, need, have, openVars, widenMode, indexer, common ) ) { 211 // unifies, set common type if necessary 212 if ( common ) { 213 common->get_qualifiers() = Type::Qualifiers{}; 214 to.set_type( common ); 215 } 216 } else return false; // cannot unify 217 } else { 218 to.type = from.type->clone(); 219 } 220 } 221 222 // unify widening if matches 223 to.allowWidening &= from.allowWidening; 224 return true; 225 } 226 227 // xxx -- this should maybe be worrying about iterator invalidation (see resolv-proto) 228 bool TypeEnvironment::mergeClasses( TypeEnvironment::ClassList::iterator to, TypeEnvironment::ClassList::iterator from, OpenVarSet& openVars, const SymTab::Indexer& indexer ) { 229 EqvClass& r = *to; 230 EqvClass& s = *from; 231 232 // ensure bounds match 233 if ( ! mergeBound( r, s, openVars, indexer ) ) return false; 234 235 // check safely bindable 236 if ( r.type && occursIn( r.type, s.vars.begin(), s.vars.end(), *this ) ) return false; 237 238 // merge classes in 239 r.vars.insert( s.vars.begin(), s.vars.end() ); 240 r.allowWidening &= s.allowWidening; 241 env.erase( from ); 242 243 return true; 244 } 245 246 bool TypeEnvironment::combine( const TypeEnvironment& o, OpenVarSet& openVars, const SymTab::Indexer& indexer ) { 247 // short-circuit easy cases 248 if ( o.isEmpty() ) return true; 249 if ( isEmpty() ) { 250 simpleCombine( o ); 251 return true; 252 } 253 254 // merge classes 255 for ( auto ct = o.env.begin(); ct != o.env.end(); ++ct ) { 256 const EqvClass& c = *ct; 257 258 // typeclass in local environment bound to c 259 auto rt = env.end(); 260 261 // look for first existing bound variable 262 auto vt = c.vars.begin(); 263 for ( ; vt != c.vars.end(); ++vt ) { 264 rt = internal_lookup( *vt ); 265 if ( rt != env.end() ) break; 266 } 267 268 if ( rt != env.end() ) { // c needs to be merged into *rt 269 EqvClass& r = *rt; 270 // merge bindings 271 if ( ! mergeBound( r, c, openVars, indexer ) ) return false; 272 // merge previous unbound variables into this class, checking occurs if needed 273 if ( r.type ) for ( auto ut = c.vars.begin(); ut != vt; ++ut ) { 274 if ( occurs( r.type, *ut, *this ) ) return false; 275 r.vars.insert( *ut ); 276 } else { r.vars.insert( c.vars.begin(), vt ); } 277 // merge subsequent variables into this class (skipping *vt, already there) 278 while ( ++vt != c.vars.end() ) { 279 auto st = internal_lookup( *vt ); 280 if ( st == env.end() ) { 281 // unbound, safe to add if passes occurs 282 if ( r.type && occurs( r.type, *vt, *this ) ) return false; 283 r.vars.insert( *vt ); 284 } else if ( st != rt ) { 285 // bound, but not to the same class 286 if ( ! mergeClasses( rt, st, openVars, indexer ) ) return false; 287 } // ignore bound into the same class 288 } 289 } else { // no variables in c bound; just copy up 290 env.push_back( c ); 291 } 292 } 293 294 // merged all classes 295 return true; 296 } 297 201 298 void TypeEnvironment::extractOpenVars( OpenVarSet &openVars ) const { 202 for ( std::list< EqvClass >::const_iterator eqvClass = env.begin(); eqvClass != env.end(); ++eqvClass ) {299 for ( ClassList::const_iterator eqvClass = env.begin(); eqvClass != env.end(); ++eqvClass ) { 203 300 for ( std::set< std::string >::const_iterator var = eqvClass->vars.begin(); var != eqvClass->vars.end(); ++var ) { 204 301 openVars[ *var ] = eqvClass->data; -
src/ResolvExpr/TypeEnvironment.h
r5e49e47 rd0c91a6 39 39 // declarations. 40 40 // 41 // I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this comparator. 41 // I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this 42 // comparator. 42 43 // 43 44 // Note: since this compares pointers for position, minor changes in the source file that affect 44 45 // memory layout can alter compilation time in unpredictable ways. For example, the placement 45 46 // of a line directive can reorder type pointers with respect to each other so that assertions 46 // are seen in different orders, causing a potentially different number of unification calls when 47 // resolving assertions. I've seen a TU go from 36 seconds to 27 seconds by reordering line directives 48 // alone, so it would be nice to fix this comparison so that assertions compare more consistently. 49 // I've tried to modify this to compare on mangle name instead of type as the second comparator, but 50 // this causes some assertions to never be recorded. More investigation is needed. 47 // are seen in different orders, causing a potentially different number of unification calls 48 // when resolving assertions. I've seen a TU go from 36 seconds to 27 seconds by reordering 49 // line directives alone, so it would be nice to fix this comparison so that assertions compare 50 // more consistently. I've tried to modify this to compare on mangle name instead of type as 51 // the second comparator, but this causes some assertions to never be recorded. More 52 // investigation is needed. 51 53 struct AssertCompare { 52 54 bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const { … … 57 59 }; 58 60 struct AssertionSetValue { 59 bool isUsed; 60 // chain of Unique IDs of the assertion declarations. The first ID in the chain is the ID of an assertion on the current type, 61 // with each successive ID being the ID of an assertion pulled in by the previous ID. The last ID in the chain is 62 // the ID of the assertion that pulled in the current assertion. 63 std::list< UniqueId > idChain; 61 bool isUsed; ///< True if assertion needs to be resolved 62 UniqueId resnSlot; ///< ID of slot assertion belongs to 63 64 AssertionSetValue() : isUsed(false), resnSlot(0) {} 64 65 }; 65 66 typedef std::map< DeclarationWithType*, AssertionSetValue, AssertCompare > AssertionSet; 66 67 typedef std::map< std::string, TypeDecl::Data > OpenVarSet; 68 69 /// merges one set of open vars into another 70 static inline void mergeOpenVars( OpenVarSet& dst, const OpenVarSet& src ) { 71 for ( const auto& entry : src ) { dst[ entry.first ] = entry.second; } 72 } 67 73 68 74 void printAssertionSet( const AssertionSet &, std::ostream &, int indent = 0 ); … … 91 97 92 98 class TypeEnvironment { 99 using ClassList = std::list< EqvClass >; 93 100 public: 94 101 const EqvClass* lookup( const std::string &var ) const; … … 103 110 bool isEmpty() const { return env.empty(); } 104 111 void print( std::ostream &os, Indenter indent = {} ) const; 105 // void combine( const TypeEnvironment &second, Type *(*combineFunc)( Type*, Type* ) ); 112 113 /// Simply concatenate the second environment onto this one; no safety checks performed 106 114 void simpleCombine( const TypeEnvironment &second ); 115 116 private: 117 /// Unifies the type bound of to with the type bound of from, returning false if fails 118 bool mergeBound( EqvClass& to, const EqvClass& from, OpenVarSet& openVars, const SymTab::Indexer& indexer ); 119 120 /// Merges two type classes from local environment, returning false if fails 121 bool mergeClasses( ClassList::iterator to, ClassList::iterator from, OpenVarSet& openVars, const SymTab::Indexer& indexer ); 122 123 public: 124 /// Merges the second environment with this one, checking compatibility. 125 /// Returns false if fails, but does NOT roll back partial changes. 126 bool combine( const TypeEnvironment& second, OpenVarSet& openVars, const SymTab::Indexer& indexer ); 127 107 128 void extractOpenVars( OpenVarSet &openVars ) const; 108 129 TypeEnvironment *clone() const { return new TypeEnvironment( *this ); } … … 123 144 void forbidWidening(); 124 145 125 using iterator = std::list< EqvClass >::const_iterator;146 using iterator = ClassList::const_iterator; 126 147 iterator begin() const { return env.begin(); } 127 148 iterator end() const { return env.end(); } 128 149 129 150 private: 130 std::list< EqvClass >env;151 ClassList env; 131 152 132 std::list< EqvClass >::iterator internal_lookup( const std::string &var );153 ClassList::iterator internal_lookup( const std::string &var ); 133 154 }; 134 155 -
src/ResolvExpr/module.mk
r5e49e47 rd0c91a6 33 33 ResolvExpr/TypeEnvironment.cc \ 34 34 ResolvExpr/CurrentObject.cc \ 35 ResolvExpr/ExplodedActual.cc 35 ResolvExpr/ExplodedActual.cc \ 36 ResolvExpr/SpecCost.cc \ 37 ResolvExpr/ResolveAssertions.cc -
src/ResolvExpr/typeops.h
r5e49e47 rd0c91a6 72 72 Cost conversionCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ); 73 73 74 // in AlternativeFinder.cc 75 Cost computeConversionCost( Type *actualType, Type *formalType, 76 const SymTab::Indexer &indexer, const TypeEnvironment &env ); 77 74 78 // in PtrsAssignable.cc 75 79 int ptrsAssignable( Type *src, Type *dest, const TypeEnvironment &env ); … … 102 106 int polyCost( Type *type, const TypeEnvironment &env, const SymTab::Indexer &indexer ); 103 107 108 // in SpecCost.cc 109 int specCost( Type *type ); 110 104 111 // in Occurs.cc 105 112 bool occurs( Type *type, std::string varName, const TypeEnvironment &env ); 113 114 template<typename Iter> 115 bool occursIn( Type* ty, Iter begin, Iter end, const TypeEnvironment &env ) { 116 while ( begin != end ) { 117 if ( occurs( ty, *begin, env ) ) return true; 118 ++begin; 119 } 120 return false; 121 } 106 122 107 123 // in AlternativeFinder.cc -
src/SynTree/ApplicationExpr.cc
r5e49e47 rd0c91a6 29 29 30 30 ParamEntry::ParamEntry( const ParamEntry &other ) : 31 decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ) , inferParams( new InferredParams( *other.inferParams ) ){31 decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) )/*, inferParams( new InferredParams( *other.inferParams ) )*/ { 32 32 } 33 33 … … 39 39 formalType = maybeClone( other.formalType ); 40 40 expr = maybeClone( other.expr ); 41 *inferParams = *other.inferParams;41 // *inferParams = *other.inferParams; 42 42 return *this; 43 43 } … … 50 50 51 51 ParamEntry::ParamEntry( ParamEntry && other ) : 52 decl( other.decl ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr ) , inferParams( std::move( other.inferParams ) ){52 decl( other.decl ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr )/*, inferParams( std::move( other.inferParams ) )*/ { 53 53 other.actualType = nullptr; 54 54 other.formalType = nullptr; … … 68 68 other.formalType = nullptr; 69 69 other.expr = nullptr; 70 inferParams = std::move( other.inferParams );70 // inferParams = std::move( other.inferParams ); 71 71 return *this; 72 72 } -
src/SynTree/Expression.cc
r5e49e47 rd0c91a6 40 40 Declaration::declFromId( i->second.decl )->printShort( os, indent+1 ); 41 41 os << std::endl; 42 printInferParams( *i->second.inferParams, os, indent+1, level+1 );42 printInferParams( i->second.expr->inferParams, os, indent+1, level+1 ); 43 43 } // for 44 44 } // if … … 47 47 Expression::Expression() : result( 0 ), env( 0 ) {} 48 48 49 Expression::Expression( const Expression &other ) : BaseSyntaxNode( other ), result( maybeClone( other.result ) ), env( maybeClone( other.env ) ), extension( other.extension ), inferParams( other.inferParams ) { 50 } 49 Expression::Expression( const Expression &other ) : BaseSyntaxNode( other ), result( maybeClone( other.result ) ), env( maybeClone( other.env ) ), extension( other.extension ), inferParams( other.inferParams ), resnSlots( other.resnSlots ) {} 51 50 52 51 void Expression::spliceInferParams( Expression * other ) { … … 55 54 inferParams[p.first] = std::move( p.second ); 56 55 } 56 resnSlots.insert( resnSlots.end(), other->resnSlots.begin(), other->resnSlots.end() ); 57 57 } 58 58 … … 376 376 os << "Untyped Member Expression, with field: " << std::endl << indent+1; 377 377 member->print(os, indent+1 ); 378 os << indent << "... from aggregate: 378 os << indent << "... from aggregate:" << std::endl << indent+1; 379 379 aggregate->print(os, indent+1); 380 380 Expression::print( os, indent ); … … 405 405 406 406 void MemberExpr::print( std::ostream &os, Indenter indent ) const { 407 os << "Member Expression, with field: 407 os << "Member Expression, with field:" << std::endl; 408 408 os << indent+1; 409 409 member->print( os, indent+1 ); 410 os << std::endl << indent << "... from aggregate: 410 os << std::endl << indent << "... from aggregate:" << std::endl << indent+1; 411 411 aggregate->print(os, indent + 1); 412 412 Expression::print( os, indent ); … … 456 456 457 457 void UntypedExpr::print( std::ostream &os, Indenter indent ) const { 458 os << "Applying untyped: 458 os << "Applying untyped:" << std::endl; 459 459 os << indent+1; 460 460 function->print(os, indent+1); 461 os << std::endl << indent << "...to: 461 os << std::endl << indent << "...to:" << std::endl; 462 462 printAll(args, os, indent+1); 463 463 Expression::print( os, indent ); -
src/SynTree/Expression.h
r5e49e47 rd0c91a6 21 21 #include <memory> // for allocator, unique_ptr 22 22 #include <string> // for string 23 #include <vector> // for vector 23 24 24 25 #include "BaseSyntaxNode.h" // for BaseSyntaxNode … … 38 39 /// but subject to decay-to-pointer and type parameter renaming 39 40 struct ParamEntry { 40 ParamEntry(): decl( 0 ), actualType( 0 ), formalType( 0 ), expr( 0 ) , inferParams( new InferredParams ){}41 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ) , inferParams( new InferredParams ){}41 ParamEntry(): decl( 0 ), actualType( 0 ), formalType( 0 ), expr( 0 )/*, inferParams( new InferredParams )*/ {} 42 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr )/*, inferParams( new InferredParams )*/ {} 42 43 ParamEntry( const ParamEntry & other ); 43 44 ParamEntry( ParamEntry && other ); … … 50 51 Type * formalType; 51 52 Expression * expr; 52 std::unique_ptr< InferredParams > inferParams;53 // std::unique_ptr< InferredParams > inferParams; 53 54 }; 54 55 … … 59 60 TypeSubstitution * env; 60 61 bool extension = false; 61 InferredParams inferParams; 62 InferredParams inferParams; ///< Post-resolution inferred parameter slots 63 std::vector<UniqueId> resnSlots; ///< Pre-resolution inferred parameter slots 64 65 // xxx - should turn inferParams+resnSlots into a union to save some memory 62 66 63 67 Expression(); … … 73 77 bool get_extension() const { return extension; } 74 78 Expression * set_extension( bool exten ) { extension = exten; return this; } 75 76 InferredParams & get_inferParams() { return inferParams; }77 79 78 80 // move other's inferParams to this -
src/SynTree/FunctionDecl.cc
r5e49e47 rd0c91a6 87 87 88 88 if ( statements ) { 89 os << indent << "... with body 89 os << indent << "... with body" << endl << indent+1; 90 90 statements->print( os, indent+1 ); 91 91 } // if -
src/SynTree/FunctionType.cc
r5e49e47 rd0c91a6 66 66 os << indent+1 << "accepting unspecified arguments" << endl; 67 67 } // if 68 os << indent << "... returning 68 os << indent << "... returning"; 69 69 if ( returnVals.empty() ) { 70 os << " nothing" << endl;70 os << " nothing" << endl; 71 71 } else { 72 72 os << endl; -
src/SynTree/ObjectDecl.cc
r5e49e47 rd0c91a6 66 66 67 67 if ( ! attributes.empty() ) { 68 os << std::endl << indent << "... with attributes: 68 os << std::endl << indent << "... with attributes:" << std::endl; 69 69 printAll( attributes, os, indent+1 ); 70 70 } -
src/SynTree/ReferenceToType.cc
r5e49e47 rd0c91a6 93 93 else { 94 94 Type::print( os, indent ); 95 os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body() << " ";95 os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body(); 96 96 if ( ! parameters.empty() ) { 97 97 os << endl << indent << "... with parameters" << endl; … … 136 136 else { 137 137 Type::print( os, indent ); 138 os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body() << " ";138 os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body(); 139 139 if ( ! parameters.empty() ) { 140 140 os << endl << indent << "... with parameters" << endl; … … 160 160 else { 161 161 Type::print( os, indent ); 162 os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body() << " ";162 os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body(); 163 163 } // if 164 164 } … … 205 205 206 206 Type::print( os, indent ); 207 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) 207 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)"; 208 208 if ( ! parameters.empty() ) { 209 209 os << endl << indent << "... with parameters" << endl; -
src/SynTree/Type.cc
r5e49e47 rd0c91a6 118 118 119 119 void QualifiedType::print( std::ostream & os, Indenter indent ) const { 120 os << "Qualified Type: 120 os << "Qualified Type:" << endl; 121 121 os << indent+1; 122 122 parent->print( os, indent+1 ); -
src/Tuples/Explode.h
r5e49e47 rd0c91a6 44 44 template<typename OutputIterator> 45 45 void append( OutputIterator out, Expression* expr, const ResolvExpr::TypeEnvironment& env, 46 const ResolvExpr::OpenVarSet& openVars, const ResolvExpr::AssertionList& need, 46 47 const ResolvExpr::Cost& cost, const ResolvExpr::Cost& cvtCost ) { 47 *out++ = ResolvExpr::Alternative{ expr, env, cost, cvtCost };48 *out++ = ResolvExpr::Alternative{ expr, env, openVars, need, cost, cvtCost }; 48 49 } 49 50 50 51 /// Append alternative to an ExplodedActual 51 52 static inline void append( ResolvExpr::ExplodedActual& ea, Expression* expr, 52 const ResolvExpr::TypeEnvironment&, const ResolvExpr::Cost&, const ResolvExpr::Cost& ) { 53 const ResolvExpr::TypeEnvironment&, const ResolvExpr::OpenVarSet&, 54 const ResolvExpr::AssertionList&, const ResolvExpr::Cost&, const ResolvExpr::Cost& ) { 53 55 ea.exprs.emplace_back( expr ); 54 /// xxx -- merge environment, cost?56 /// xxx -- merge environment, openVars, need, cost? 55 57 } 56 58 … … 68 70 // distribute reference cast over all components 69 71 append( std::forward<Output>(out), distributeReference( alt.release_expr() ), 70 alt.env, alt. cost, alt.cvtCost );72 alt.env, alt.openVars, alt.need, alt.cost, alt.cvtCost ); 71 73 } 72 74 // in tuple assignment, still need to handle the other cases, but only if not already handled here (don't want to output too many alternatives) … … 102 104 } else { 103 105 // atomic (non-tuple) type - output a clone of the expression in a new alternative 104 append( std::forward<Output>(out), expr->clone(), alt.env, alt.cost, alt.cvtCost ); 106 append( std::forward<Output>(out), expr->clone(), alt.env, alt.openVars, alt.need, 107 alt.cost, alt.cvtCost ); 105 108 } 106 109 } -
src/Tuples/TupleAssignment.cc
r5e49e47 rd0c91a6 62 62 struct Matcher { 63 63 public: 64 Matcher( TupleAssignSpotter &spotter, const ResolvExpr::AltList& lhs, const65 ResolvExpr::AltList& rhs );64 Matcher( TupleAssignSpotter &spotter, const ResolvExpr::AltList& lhs, 65 const ResolvExpr::AltList& rhs ); 66 66 virtual ~Matcher() {} 67 67 68 virtual void match( std::list< Expression * > &out ) = 0; 68 69 ObjectDecl * newObject( UniqueName & namer, Expression * expr ); 70 71 void combineState( const ResolvExpr::Alternative& alt ) { 72 compositeEnv.simpleCombine( alt.env ); 73 ResolvExpr::mergeOpenVars( openVars, alt.openVars ); 74 cloneAll( alt.need, need ); 75 } 76 77 void combineState( const ResolvExpr::AltList& alts ) { 78 for ( const ResolvExpr::Alternative& alt : alts ) { combineState( alt ); } 79 } 80 69 81 ResolvExpr::AltList lhs, rhs; 70 82 TupleAssignSpotter &spotter; … … 72 84 std::list< ObjectDecl * > tmpDecls; 73 85 ResolvExpr::TypeEnvironment compositeEnv; 86 ResolvExpr::OpenVarSet openVars; 87 ResolvExpr::AssertionSet need; 74 88 }; 75 89 … … 245 259 } 246 260 247 // extract expressions from the assignment alternatives to produce a list of assignments that248 // t ogether form a single alternative261 // extract expressions from the assignment alternatives to produce a list of assignments 262 // that together form a single alternative 249 263 std::list< Expression *> solved_assigns; 250 264 for ( ResolvExpr::Alternative & alt : current ) { 251 265 solved_assigns.push_back( alt.expr->clone() ); 252 }253 // combine assignment environments into combined expression environment254 simpleCombineEnvironments( current.begin(), current.end(), matcher->compositeEnv );266 matcher->combineState( alt ); 267 } 268 255 269 // xxx -- was push_front 256 currentFinder.get_alternatives().push_back( ResolvExpr::Alternative( 257 new TupleAssignExpr(solved_assigns, matcher->tmpDecls), matcher->compositeEnv, 258 ResolvExpr::sumCost( current ) + matcher->baseCost ) ); 270 currentFinder.get_alternatives().push_back( ResolvExpr::Alternative{ 271 new TupleAssignExpr{ solved_assigns, matcher->tmpDecls }, matcher->compositeEnv, 272 matcher->openVars, 273 ResolvExpr::AssertionList( matcher->need.begin(), matcher->need.end() ), 274 ResolvExpr::sumCost( current ) + matcher->baseCost } ); 259 275 } 260 276 … … 263 279 : lhs(lhs), rhs(rhs), spotter(spotter), 264 280 baseCost( ResolvExpr::sumCost( lhs ) + ResolvExpr::sumCost( rhs ) ) { 265 simpleCombineEnvironments( lhs.begin(), lhs.end(), compositeEnv );266 simpleCombineEnvironments( rhs.begin(), rhs.end(), compositeEnv);281 combineState( lhs ); 282 combineState( rhs ); 267 283 } 268 284 -
src/cfa.make
r5e49e47 rd0c91a6 21 21 $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 22 22 $(am__mv) $$depbase.Tpo $$depbase.Plo 23 24 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@) 25 am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@) 26 am__v_JAVAC_0 = @echo " JAVAC " $@; 27 am__v_JAVAC_1 = 28 29 AM_V_GOC = $(am__v_GOC_@AM_V@) 30 am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@) 31 am__v_GOC_0 = @echo " GOC " $@; 32 am__v_GOC_1 = 33 34 UPPCC = u++ 35 UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS) 36 37 AM_V_UPP = $(am__v_UPP_@AM_V@) 38 am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@) 39 am__v_UPP_0 = @echo " UPP " $@; 40 am__v_UPP_1 = -
src/config.h.in
r5e49e47 rd0c91a6 7 7 #undef CFA_64_CPU 8 8 9 /* Location of include files. */9 /* Backend compiler to use. */ 10 10 #undef CFA_BACKEND_CC 11 11 … … 67 67 #undef HAVE_ALLOCA_H 68 68 69 /* Define to 1 if you have the <dlfcn.h> header file. */ 70 #undef HAVE_DLFCN_H 71 69 72 /* Define to 1 if you have the <fenv.h> header file. */ 70 73 #undef HAVE_FENV_H … … 129 132 /* Define to 1 if the system has the type `_Bool'. */ 130 133 #undef HAVE__BOOL 134 135 /* Define to the sub-directory where libtool stores uninstalled libraries. */ 136 #undef LT_OBJDIR 131 137 132 138 /* Name of package */ -
src/main.cc
r5e49e47 rd0c91a6 487 487 resolvep = true; 488 488 break; 489 489 case 'R': // dump resolv-proto instance 490 490 resolvprotop = true; 491 491 break; -
tests/.expect/alloc-ERROR.txt
r5e49e47 rd0c91a6 1 alloc.cfa:265:1 error: No reasonable alternatives for expression Applying untyped: 1 alloc.cfa:265:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: ?=? 3 ...to: 3 ...to: 4 4 Name: p 5 Applying untyped: 5 Applying untyped: 6 6 Name: realloc 7 ...to: 7 ...to: 8 8 Name: stp 9 Applying untyped: 9 Applying untyped: 10 10 Name: ?*? 11 ...to: 11 ...to: 12 12 Name: dim 13 Sizeof Expression on: Applying untyped: 13 Sizeof Expression on: Applying untyped: 14 14 Name: *? 15 ...to: 15 ...to: 16 16 Name: stp 17 17 … … 19 19 20 20 21 alloc.cfa:266:1 error: No reasonable alternatives for expression Applying untyped: 21 alloc.cfa:266:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: ?=? 23 ...to: 23 ...to: 24 24 Name: p 25 Applying untyped: 25 Applying untyped: 26 26 Name: alloc 27 ...to: 27 ...to: 28 28 Name: stp 29 Applying untyped: 29 Applying untyped: 30 30 Name: ?*? 31 ...to: 31 ...to: 32 32 Name: dim 33 Sizeof Expression on: Applying untyped: 33 Sizeof Expression on: Applying untyped: 34 34 Name: *? 35 ...to: 35 ...to: 36 36 Name: stp 37 37 … … 39 39 40 40 41 alloc.cfa:267:1 error: No reasonable alternatives for expression Applying untyped: 41 alloc.cfa:267:1 error: No reasonable alternatives for expression Applying untyped: 42 42 Name: ?=? 43 ...to: 43 ...to: 44 44 Name: p 45 Applying untyped: 45 Applying untyped: 46 46 Name: memset 47 ...to: 47 ...to: 48 48 Name: stp 49 49 constant expression (10 10: signed int) 50 50 51 51 52 alloc.cfa:268:1 error: No reasonable alternatives for expression Applying untyped: 52 alloc.cfa:268:1 error: No reasonable alternatives for expression Applying untyped: 53 53 Name: ?=? 54 ...to: 54 ...to: 55 55 Name: p 56 Applying untyped: 56 Applying untyped: 57 57 Name: memcpy 58 ...to: 58 ...to: 59 59 Address of: 60 60 Name: st1 -
tests/.expect/castError.txt
r5e49e47 rd0c91a6 4 4 ... to: 5 5 char Alternatives are: 6 Cost ( 1, 0, 0, 0 ): Cast of:6 Cost ( 1, 0, 0, 0, 0, 0 ): Cast of: 7 7 Variable Expression: f: function 8 8 accepting unspecified arguments 9 ... returning nothing 9 ... returning nothing 10 10 11 11 ... to: … … 14 14 char 15 15 ) 16 Environment: 16 Environment: 17 17 18 Cost ( 1, 0, 0, 0 ): Cast of:18 Cost ( 1, 0, 0, 0, 0, 0 ): Cast of: 19 19 Variable Expression: f: double 20 20 ... to: … … 23 23 char 24 24 ) 25 Environment: 25 Environment: 26 26 27 Cost ( 1, 0, 0, 0 ): Cast of:27 Cost ( 1, 0, 0, 0, 0, 0 ): Cast of: 28 28 Variable Expression: f: signed int 29 29 ... to: … … 32 32 char 33 33 ) 34 Environment: 34 Environment: 35 35 36 36 -
tests/.expect/completeTypeError.txt
r5e49e47 rd0c91a6 1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: *? 3 ...to: 3 ...to: 4 4 Name: v 5 5 6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 7 7 Name: *? 8 ...to: 8 ...to: 9 9 Name: y 10 10 11 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: 11 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: 12 12 Name: foo 13 ...to: 13 ...to: 14 14 Name: v 15 15 16 completeTypeError.cfa:36:1 error: No reasonable alternatives for expression Applying untyped: 16 completeTypeError.cfa:36:1 error: No reasonable alternatives for expression Applying untyped: 17 17 Name: baz 18 ...to: 18 ...to: 19 19 Name: v 20 20 21 completeTypeError.cfa:37:1 error: No reasonable alternatives for expression Applying untyped: 21 completeTypeError.cfa:37:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: quux 23 ...to: 23 ...to: 24 24 Name: v 25 25 26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped: 26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped: 27 27 Name: baz 28 ...to: 28 ...to: 29 29 Name: y 30 30 31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 32 32 Name: quux 33 ...to: 33 ...to: 34 34 Name: y 35 35 36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 37 37 Name: *? 38 ...to: 38 ...to: 39 39 Name: y 40 40 41 completeTypeError.cfa:72:1 error: No re asonable alternatives for expression Applying untyped:41 completeTypeError.cfa:72:1 error: No resolvable alternatives for expression Applying untyped: 42 42 Name: baz 43 ...to: 43 ...to: 44 44 Name: z 45 45 46 Alternatives with failing assertions are: 47 Cost ( 0, 1, 0, 1, -5, 0 ): Application of 48 Variable Expression: baz: forall 49 T: sized object type 50 ... with assertions 51 ?=?: pointer to function 52 ... with parameters 53 reference to instance of type T (not function type) 54 instance of type T (not function type) 55 ... returning 56 _retval__operator_assign: instance of type T (not function type) 57 ... with attributes: 58 Attribute with name: unused 59 60 61 ?{}: pointer to function 62 ... with parameters 63 reference to instance of type T (not function type) 64 ... returning nothing 65 66 ?{}: pointer to function 67 ... with parameters 68 reference to instance of type T (not function type) 69 instance of type T (not function type) 70 ... returning nothing 71 72 ^?{}: pointer to function 73 ... with parameters 74 reference to instance of type T (not function type) 75 ... returning nothing 76 77 78 function 79 ... with parameters 80 pointer to instance of type T (not function type) 81 ... returning nothing 82 83 ... to arguments 84 Variable Expression: z: pointer to instance of type T (not function type) 85 86 (types: 87 void 88 ) 89 Environment:( _73_0_T ) -> instance of type T (not function type) (no widening) 90 91 92 -
tests/.expect/declarationErrors.txt
r5e49e47 rd0c91a6 6 6 7 7 declarationErrors.cfa:19:1 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous0 8 with members 8 with members 9 9 i: int 10 with body 10 with body 11 11 12 12 13 13 declarationErrors.cfa:20:1 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous1 14 with members 14 with members 15 15 i: int 16 with body 16 with body 17 17 18 18 … … 20 20 21 21 declarationErrors.cfa:24:1 error: duplicate const in declaration of f01: static inline function 22 with no parameters 22 with no parameters 23 23 returning const volatile int 24 24 25 25 26 26 declarationErrors.cfa:25:1 error: duplicate volatile in declaration of f02: static inline function 27 with no parameters 27 with no parameters 28 28 returning const volatile int 29 29 30 30 31 31 declarationErrors.cfa:26:1 error: duplicate const in declaration of f03: static inline function 32 with no parameters 32 with no parameters 33 33 returning const volatile int 34 34 35 35 36 36 declarationErrors.cfa:27:1 error: duplicate volatile in declaration of f04: static inline function 37 with no parameters 37 with no parameters 38 38 returning const volatile int 39 39 40 40 41 41 declarationErrors.cfa:28:1 error: duplicate const in declaration of f05: static inline function 42 with no parameters 42 with no parameters 43 43 returning const volatile int 44 44 45 45 46 46 declarationErrors.cfa:29:1 error: duplicate volatile in declaration of f06: static inline function 47 with no parameters 47 with no parameters 48 48 returning const volatile int 49 49 50 50 51 51 declarationErrors.cfa:30:1 error: duplicate const in declaration of f07: static inline function 52 with no parameters 52 with no parameters 53 53 returning const volatile int 54 54 55 55 56 56 declarationErrors.cfa:31:1 error: duplicate const, duplicate volatile in declaration of f08: static inline function 57 with no parameters 57 with no parameters 58 58 returning const volatile int 59 59 60 60 61 61 declarationErrors.cfa:33:1 error: duplicate const, duplicate volatile in declaration of f09: static inline function 62 with no parameters 62 with no parameters 63 63 returning const volatile int 64 64 65 65 66 66 declarationErrors.cfa:34:1 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function 67 with no parameters 67 with no parameters 68 68 returning const restrict volatile _Atomic int 69 69 -
tests/.expect/nested-types-ERR2.txt
r5e49e47 rd0c91a6 1 1 nested-types.cfa:73:1 error: Use of undefined global type Z 2 2 nested-types.cfa:74:1 error: Qualified type requires an aggregate on the left, but has: signed int 3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type: 4 instance of struct S with body 1 5 instance of type Z (not function type) 3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type: 4 instance of struct S with body 1 5 instance of type Z (not function type) 6 6 -
tests/.expect/scopeErrors.txt
r5e49e47 rd0c91a6 3 3 ... with parameters 4 4 double 5 ... returning 5 ... returning 6 6 _retval_butThisIsAnError: double 7 ... with attributes: 7 ... with attributes: 8 8 Attribute with name: unused 9 9 10 ... with body 10 ... with body 11 11 CompoundStmt 12 12 -
tests/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 20 include $(top_srcdir)/src/cfa.make … … 44 45 .PHONY: list .validate 45 46 .INTERMEDIATE: .validate .validate.cfa 46 EXTRA_PROGRAMS = avl_test # build but do not install47 EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install 47 48 48 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 49 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa 50 # automake doesn't know we still need C rules so pretend like we have a C program 51 _dummy_hack_SOURCES = .dummy_hack.c 49 52 50 53 #---------------------------------------------------------------------------------------------------------------- … … 67 70 @echo "int main() { return 0; }" > ${@} 68 71 69 dummy_hack.c: 72 # automake doesn't know we still need C rules so pretend like we have a C program 73 .dummy_hack.c: 70 74 @echo "int main() { return 0; }" > ${@} 71 75 … … 76 80 77 81 # implicit rule so not all test require a rule 78 % : %.c $(CFACC)79 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})80 81 82 % : %.cfa $(CFACC) 82 83 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) … … 107 108 108 109 #builtins 109 builtins/sync: builtins/sync.c $(CFACC)110 builtins/sync: builtins/sync.cfa $(CFACC) 110 111 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 111 112 … … 132 133 133 134 # Constructor/destructor tests 134 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC)135 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 135 136 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 136 137 137 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC)138 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 138 139 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 139 140 140 raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC)141 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 141 142 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 142 143 143 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC)144 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 144 145 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 145 146 146 147 # Warnings 147 warnings/self-assignment: warnings/self-assignment.c $(CFACC)148 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 148 149 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only -
tests/Makefile.in
r5e49e47 rd0c91a6 91 91 build_triplet = @build@ 92 92 host_triplet = @host@ 93 EXTRA_PROGRAMS = avl_test$(EXEEXT) 93 EXTRA_PROGRAMS = avl_test$(EXEEXT) .dummy_hack$(EXEEXT) 94 94 subdir = tests 95 95 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 96 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 97 $(top_srcdir)/configure.ac 96 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 97 $(top_srcdir)/automake/ltoptions.m4 \ 98 $(top_srcdir)/automake/ltsugar.m4 \ 99 $(top_srcdir)/automake/ltversion.m4 \ 100 $(top_srcdir)/automake/lt~obsolete.m4 \ 101 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 98 102 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 99 103 $(ACLOCAL_M4) … … 103 107 CONFIG_CLEAN_FILES = config.py 104 108 CONFIG_CLEAN_VPATH_FILES = test.py 109 am__dummy_hack_OBJECTS = .dummy_hack.$(OBJEXT) 110 _dummy_hack_OBJECTS = $(am__dummy_hack_OBJECTS) 111 _dummy_hack_LDADD = $(LDADD) 112 AM_V_lt = $(am__v_lt_@AM_V@) 113 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 114 am__v_lt_0 = --silent 115 am__v_lt_1 = 105 116 am__dirstamp = $(am__leading_dot)dirstamp 106 117 am_avl_test_OBJECTS = avltree/avl_test.$(OBJEXT) \ … … 128 139 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 129 140 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 141 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 142 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 143 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 144 $(AM_CFLAGS) $(CFLAGS) 130 145 AM_V_CC = $(am__v_CC_@AM_V@) 131 146 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) … … 133 148 am__v_CC_1 = 134 149 CCLD = $(CC) 135 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 150 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 151 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 152 $(AM_LDFLAGS) $(LDFLAGS) -o $@ 136 153 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 137 154 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 138 155 am__v_CCLD_0 = @echo " CCLD " $@; 139 156 am__v_CCLD_1 = 140 SOURCES = $( avl_test_SOURCES)141 DIST_SOURCES = $( avl_test_SOURCES)157 SOURCES = $(_dummy_hack_SOURCES) $(avl_test_SOURCES) 158 DIST_SOURCES = $(_dummy_hack_SOURCES) $(avl_test_SOURCES) 142 159 am__can_run_installinfo = \ 143 160 case $$AM_UPDATE_INFO_DIR in \ … … 172 189 AMTAR = @AMTAR@ 173 190 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 191 AR = @AR@ 174 192 AUTOCONF = @AUTOCONF@ 175 193 AUTOHEADER = @AUTOHEADER@ 176 194 AUTOMAKE = @AUTOMAKE@ 177 195 AWK = @AWK@ 178 BACKEND_CC = @BACKEND_CC@179 196 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 180 197 CC = @CFACC@ … … 196 213 CPPFLAGS = @CPPFLAGS@ 197 214 CXX = @CXX@ 215 CXXCPP = @CXXCPP@ 198 216 CXXDEPMODE = @CXXDEPMODE@ 199 217 CXXFLAGS = @CXXFLAGS@ … … 201 219 DEFS = @DEFS@ 202 220 DEPDIR = @DEPDIR@ 221 DLLTOOL = @DLLTOOL@ 203 222 DRIVER_DIR = @DRIVER_DIR@ 223 DSYMUTIL = @DSYMUTIL@ 224 DUMPBIN = @DUMPBIN@ 204 225 ECHO_C = @ECHO_C@ 205 226 ECHO_N = @ECHO_N@ … … 207 228 EGREP = @EGREP@ 208 229 EXEEXT = @EXEEXT@ 230 FGREP = @FGREP@ 209 231 GREP = @GREP@ 210 232 HOST_FLAGS = @HOST_FLAGS@ … … 214 236 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 215 237 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 238 LD = @LD@ 216 239 LDFLAGS = @LDFLAGS@ 217 240 LEX = @LEX@ … … 222 245 LIBOBJS = @LIBOBJS@ 223 246 LIBS = @LIBS@ 247 LIBTOOL = @LIBTOOL@ 248 LIPO = @LIPO@ 249 LN_S = @LN_S@ 224 250 LTLIBOBJS = @LTLIBOBJS@ 251 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 225 252 MAKEINFO = @MAKEINFO@ 253 MANIFEST_TOOL = @MANIFEST_TOOL@ 226 254 MKDIR_P = @MKDIR_P@ 255 NM = @NM@ 256 NMEDIT = @NMEDIT@ 257 OBJDUMP = @OBJDUMP@ 227 258 OBJEXT = @OBJEXT@ 259 OTOOL = @OTOOL@ 260 OTOOL64 = @OTOOL64@ 228 261 PACKAGE = @PACKAGE@ 229 262 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 235 268 PATH_SEPARATOR = @PATH_SEPARATOR@ 236 269 RANLIB = @RANLIB@ 270 SED = @SED@ 237 271 SET_MAKE = @SET_MAKE@ 238 272 SHELL = @SHELL@ … … 246 280 abs_top_builddir = @abs_top_builddir@ 247 281 abs_top_srcdir = @abs_top_srcdir@ 282 ac_ct_AR = @ac_ct_AR@ 248 283 ac_ct_CC = @ac_ct_CC@ 249 284 ac_ct_CXX = @ac_ct_CXX@ 285 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 250 286 am__include = @am__include@ 251 287 am__leading_dot = @am__leading_dot@ … … 295 331 top_srcdir = @top_srcdir@ 296 332 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 333 ACLOCAL_AMFLAGS = -I automake 297 334 CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS) 335 LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 336 $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \ 337 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \ 338 $(AM_CFLAGS) $(CFLAGS) 339 298 340 AM_V_CFA = $(am__v_CFA_@AM_V@) 299 341 am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@) 300 342 am__v_CFA_0 = @echo " CFA " $@; 301 343 am__v_CFA_1 = 344 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@) 345 am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@) 346 am__v_JAVAC_0 = @echo " JAVAC " $@; 347 am__v_JAVAC_1 = 348 AM_V_GOC = $(am__v_GOC_@AM_V@) 349 am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@) 350 am__v_GOC_0 = @echo " GOC " $@; 351 am__v_GOC_1 = 352 UPPCC = u++ 353 UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS) 354 AM_V_UPP = $(am__v_UPP_@AM_V@) 355 am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@) 356 am__v_UPP_0 = @echo " UPP " $@; 357 am__v_UPP_1 = 302 358 debug = yes 303 359 installed = no … … 312 368 ${INSTALL_FLAGS} ${ARCH_FLAGS} 313 369 PRETTY_PATH = cd ${srcdir} && 314 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 370 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa 371 # automake doesn't know we still need C rules so pretend like we have a C program 372 _dummy_hack_SOURCES = .dummy_hack.c 315 373 all: all-am 316 374 317 375 .SUFFIXES: 318 .SUFFIXES: .c .cfa . o .obj .validate376 .SUFFIXES: .c .cfa .dummy_hack .lo .o .obj .validate 319 377 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/src/cfa.make $(am__configure_deps) 320 378 @for dep in $?; do \ … … 349 407 config.py: $(top_builddir)/config.status $(srcdir)/config.py.in 350 408 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 409 410 .dummy_hack$(EXEEXT): $(_dummy_hack_OBJECTS) $(_dummy_hack_DEPENDENCIES) $(EXTRA__dummy_hack_DEPENDENCIES) 411 @rm -f .dummy_hack$(EXEEXT) 412 $(AM_V_CCLD)$(LINK) $(_dummy_hack_OBJECTS) $(_dummy_hack_LDADD) $(LIBS) 351 413 avltree/$(am__dirstamp): 352 414 @$(MKDIR_P) avltree … … 381 443 -rm -f *.tab.c 382 444 383 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl-private.Po@am__quote@ 384 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl0.Po@am__quote@ 385 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl1.Po@am__quote@ 386 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl2.Po@am__quote@ 387 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl3.Po@am__quote@ 388 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl4.Po@am__quote@ 389 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl_test.Po@am__quote@ 445 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/.dummy_hack.Po@am__quote@ 390 446 391 447 .c.o: … … 404 460 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 405 461 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 462 463 .c.lo: 464 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 465 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 466 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 467 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 468 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 469 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< 470 471 mostlyclean-libtool: 472 -rm -f *.lo 473 474 clean-libtool: 475 -rm -rf .libs _libs 406 476 407 477 ID: $(am__tagged_files) … … 525 595 clean: clean-am 526 596 527 clean-am: clean-generic clean-l ocal mostlyclean-am597 clean-am: clean-generic clean-libtool clean-local mostlyclean-am 528 598 529 599 distclean: distclean-am 530 -rm -rf avltree/$(DEPDIR)600 -rm -rf ./$(DEPDIR) 531 601 -rm -f Makefile 532 602 distclean-am: clean-am distclean-compile distclean-generic \ … … 574 644 575 645 maintainer-clean: maintainer-clean-am 576 -rm -rf avltree/$(DEPDIR)646 -rm -rf ./$(DEPDIR) 577 647 -rm -f Makefile 578 648 maintainer-clean-am: distclean-am maintainer-clean-generic … … 580 650 mostlyclean: mostlyclean-am 581 651 582 mostlyclean-am: mostlyclean-compile mostlyclean-generic 652 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 653 mostlyclean-libtool 583 654 584 655 pdf: pdf-am … … 595 666 596 667 .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ 597 clean-generic clean-local cscopelist-am ctags ctags-am \ 598 distclean distclean-compile distclean-generic distclean-tags \ 599 distdir dvi dvi-am html html-am info info-am install \ 600 install-am install-data install-data-am install-dvi \ 601 install-dvi-am install-exec install-exec-am install-html \ 602 install-html-am install-info install-info-am install-man \ 603 install-pdf install-pdf-am install-ps install-ps-am \ 604 install-strip installcheck installcheck-am installdirs \ 605 maintainer-clean maintainer-clean-generic mostlyclean \ 606 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 668 clean-generic clean-libtool clean-local cscopelist-am ctags \ 669 ctags-am distclean distclean-compile distclean-generic \ 670 distclean-libtool distclean-tags distdir dvi dvi-am html \ 671 html-am info info-am install install-am install-data \ 672 install-data-am install-dvi install-dvi-am install-exec \ 673 install-exec-am install-html install-html-am install-info \ 674 install-info-am install-man install-pdf install-pdf-am \ 675 install-ps install-ps-am install-strip installcheck \ 676 installcheck-am installdirs maintainer-clean \ 677 maintainer-clean-generic mostlyclean mostlyclean-compile \ 678 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 607 679 tags tags-am uninstall uninstall-am 608 680 … … 615 687 $(am__mv) $$depbase.Tpo $$depbase.Po 616 688 689 .cfa.lo: 690 $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 691 $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 692 $(am__mv) $$depbase.Tpo $$depbase.Plo 693 617 694 .PHONY: list .validate 618 695 .INTERMEDIATE: .validate .validate.cfa … … 637 714 @echo "int main() { return 0; }" > ${@} 638 715 639 dummy_hack.c: 716 # automake doesn't know we still need C rules so pretend like we have a C program 717 .dummy_hack.c: 640 718 @echo "int main() { return 0; }" > ${@} 641 719 … … 646 724 647 725 # implicit rule so not all test require a rule 648 % : %.c $(CFACC)649 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})650 651 726 % : %.cfa $(CFACC) 652 727 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) … … 677 752 678 753 #builtins 679 builtins/sync: builtins/sync.c $(CFACC)754 builtins/sync: builtins/sync.cfa $(CFACC) 680 755 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 681 756 … … 702 777 703 778 # Constructor/destructor tests 704 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC)779 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 705 780 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 706 781 707 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC)782 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 708 783 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 709 784 710 raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC)785 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 711 786 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 712 787 713 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC)788 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 714 789 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 715 790 716 791 # Warnings 717 warnings/self-assignment: warnings/self-assignment.c $(CFACC)792 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 718 793 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 719 794 -
tests/abs.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Jan 28 18:26:16 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:50:44201813 // Update Count : 5 412 // Last Modified On : Tue Dec 4 21:33:15 2018 13 // Update Count : 55 14 14 // 15 15 … … 19 19 int main( void ) { 20 20 signed char ch = -65; 21 sout | "char\t\t\t" | ch | "\tabs " | abs( ch ) | endl;22 sout | "signed int\t\t" | -65 | "\tabs" | abs( -65 ) | endl;23 sout | "signed long int\t\t" | -65l | "\tabs" | abs( -65l ) | endl;24 sout | "signed long long int\t" | -65ll | "\tabs" | abs( -65ll ) | endl;25 sout | "float\t\t\t" | -65.0f | "\tabs" | abs( -65.0f ) | endl;26 sout | "double\t\t\t" | -65.0 | "\tabs" | abs( -65.0 ) | endl;27 sout | "long double\t\t" | -65.0l | "\tabs" | abs( -65.0l ) | endl;28 sout | "float _Complex\t\t" | -65.0F-2.0iF | "\tabs" | abs( -65.0F-2.0iF ) | endl;29 sout | "double _Complex\t\t" | -65.0D-2.0iD | "\tabs" | abs( -65.0D-2.0iD ) | endl;30 sout | "long double _Complex\t" | -65.0L-2.0iL | "\tabs" | abs( -65.0L-2.0iL ) | endl;21 sout | "char\t\t\t" | ch | "\tabs " | abs( ch ); 22 sout | "signed int\t\t" | -65 | "\tabs" | abs( -65 ); 23 sout | "signed long int\t\t" | -65l | "\tabs" | abs( -65l ); 24 sout | "signed long long int\t" | -65ll | "\tabs" | abs( -65ll ); 25 sout | "float\t\t\t" | -65.0f | "\tabs" | abs( -65.0f ); 26 sout | "double\t\t\t" | -65.0 | "\tabs" | abs( -65.0 ); 27 sout | "long double\t\t" | -65.0l | "\tabs" | abs( -65.0l ); 28 sout | "float _Complex\t\t" | -65.0F-2.0iF | "\tabs" | abs( -65.0F-2.0iF ); 29 sout | "double _Complex\t\t" | -65.0D-2.0iD | "\tabs" | abs( -65.0D-2.0iD ); 30 sout | "long double _Complex\t" | -65.0L-2.0iL | "\tabs" | abs( -65.0L-2.0iL ); 31 31 } // main 32 32 -
tests/ato.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Feb 4 08:10:57 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:51:03 201813 // Update Count : 9 112 // Last Modified On : Tue Dec 4 21:33:53 2018 13 // Update Count : 92 14 14 // 15 15 … … 20 20 const char * sptr = "-123"; 21 21 int i = ato( sptr ); 22 sout | i | sptr | endl;22 sout | i | sptr; 23 23 sptr = "123"; 24 24 unsigned int ui = ato( sptr ); 25 sout | ui | sptr | endl;25 sout | ui | sptr; 26 26 27 27 sptr = "-123"; 28 28 long int li = ato( sptr ); 29 sout | li | sptr | endl;29 sout | li | sptr; 30 30 sptr = "123"; 31 31 unsigned long int uli = ato( sptr ); 32 sout | uli | sptr | endl;32 sout | uli | sptr; 33 33 34 34 sptr = "-123"; 35 35 long long int lli = ato( sptr ); 36 sout | lli | sptr | endl;36 sout | lli | sptr; 37 37 sptr = "123"; 38 38 unsigned long long int ulli = ato( sptr ); 39 sout | ulli | sptr | endl;39 sout | ulli | sptr; 40 40 41 41 sptr = "-123.456"; 42 42 float f = ato( sptr ); 43 sout | f | sptr | endl;43 sout | f | sptr; 44 44 sptr = "-123.4567890123456"; 45 45 double d = ato( sptr ); 46 sout | d | sptr | endl;46 sout | d | sptr; 47 47 sptr = "-123.45678901234567890123456789"; 48 48 long double ld = ato( sptr ); 49 sout | ld | sptr | endl;49 sout | ld | sptr; 50 50 51 51 sptr = "-123.456-123.456i"; 52 52 float _Complex fc = ato( sptr ); 53 sout | fc | sptr | endl;53 sout | fc | sptr; 54 54 sptr = "-123.4567890123456+123.4567890123456i"; 55 55 double _Complex dc = ato( sptr ); 56 sout | dc | sptr | endl;56 sout | dc | sptr; 57 57 sptr = "123.45678901234567890123456789-123.45678901234567890123456789i"; 58 58 long double _Complex ldc = ato( sptr ); 59 sout | ldc | sptr | endl;59 sout | ldc | sptr; 60 60 sptr = "123.45678901234-123.4567890i"; 61 61 long double _Complex ldc2 = ato( sptr ); 62 sout | ldc2 | sptr | endl;62 sout | ldc2 | sptr; 63 63 64 64 65 65 sptr = "-123"; 66 66 i = strto( sptr, 0, 10 ); 67 sout | i | sptr | endl;67 sout | i | sptr; 68 68 sptr = "123"; 69 69 ui = strto( sptr, 0, 10 ); 70 sout | ui | sptr | endl;70 sout | ui | sptr; 71 71 72 72 sptr = "-123"; 73 73 li = strto( sptr, 0, 10 ); 74 sout | li | sptr | endl;74 sout | li | sptr; 75 75 sptr = "123"; 76 76 uli = strto( sptr, 0, 10 ); 77 sout | uli | sptr | endl;77 sout | uli | sptr; 78 78 79 79 sptr = "-123"; 80 80 lli = strto( sptr, 0, 10 ); 81 sout | lli | sptr | endl;81 sout | lli | sptr; 82 82 sptr = "123"; 83 83 ulli = strto( sptr, 0, 10 ); 84 sout | ulli | sptr | endl;84 sout | ulli | sptr; 85 85 86 86 sptr = "-123.456"; 87 87 f = strto( sptr, 0 ); 88 sout | f | sptr | endl;88 sout | f | sptr; 89 89 sptr = "-123.4567890123456"; 90 90 d = strto( sptr, 0 ); 91 sout | d | sptr | endl;91 sout | d | sptr; 92 92 sptr = "-123.45678901234567890123456789"; 93 93 ld = strto( sptr, 0 ); 94 sout | ld | sptr | endl;94 sout | ld | sptr; 95 95 96 96 sptr = "-123.456-123.456i"; 97 97 fc = strto( sptr, 0 ); 98 sout | fc | sptr | endl;98 sout | fc | sptr; 99 99 100 100 char * eptr = 0; 101 101 // sptr = "2fred"; 102 102 // fc = strto( sptr, &eptr ); 103 // sout | fc | sptr | eptr | endl;103 // sout | fc | sptr | eptr; 104 104 105 105 sptr = "2 3"; 106 106 fc = strto( sptr, &eptr ); 107 sout | fc | sptr | eptr | endl;107 sout | fc | sptr | eptr; 108 108 109 109 sptr = "-123.4567890123456+123.4567890123456i"; 110 110 dc = strto( sptr, 0 ); 111 sout | dc | sptr | endl;111 sout | dc | sptr; 112 112 sptr = "123.45678901234567890123456789-123.45678901234567890123456789i"; 113 113 ldc = strto( sptr, 0 ); 114 sout | ldc | sptr | endl;114 sout | ldc | sptr; 115 115 sptr = "123.45678901234-123.4567890i"; 116 116 ldc2 = strto( sptr, 0 ); 117 sout | ldc2 | sptr | endl;117 sout | ldc2 | sptr; 118 118 } // main 119 119 -
tests/complex.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 24 22:07:31 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:51:22201813 // Update Count : 312 // Last Modified On : Tue Dec 4 21:34:21 2018 13 // Update Count : 4 14 14 // 15 15 … … 25 25 printf( "x:%g+%gi y:%g+%gi z:%g+%gi\n", creal(x), cimag(x), creal(y), cimag(y), creal(z), cimag(z) ); 26 26 #ifdef __CFA__ 27 sout | "x:" | x | "y:" | y | "z:" | z | endl;27 sout | "x:" | x | "y:" | y | "z:" | z; 28 28 #endif // __CFA 29 29 x = 2.1 + 1.3i; … … 32 32 printf( "x:%g+%gi y:%g+%gi z:%g+%gi\n", creal(x), cimag(x), creal(y), cimag(y), creal(z), cimag(z) ); 33 33 #ifdef __CFA__ 34 sout | "x:" | x | "y:" | y | "z:" | z | endl;34 sout | "x:" | x | "y:" | y | "z:" | z; 35 35 #endif // __CFA 36 36 } -
tests/concurrent/coroutineYield.cfa
r5e49e47 rd0c91a6 27 27 while(true) { 28 28 #if !defined(TEST_FOREVER) 29 sout | "Coroutine 1" | endl;29 sout | "Coroutine 1"; 30 30 #endif 31 31 yield(); 32 32 #if !defined(TEST_FOREVER) 33 sout | "Coroutine 2" | endl;33 sout | "Coroutine 2"; 34 34 #endif 35 35 suspend(); … … 42 42 for(int i = 0; TEST(i < N); i++) { 43 43 #if !defined(TEST_FOREVER) 44 sout | "Thread 1" | endl;44 sout | "Thread 1"; 45 45 #endif 46 46 resume(c); 47 47 #if !defined(TEST_FOREVER) 48 sout | "Thread 2" | endl;48 sout | "Thread 2"; 49 49 #endif 50 50 yield(); -
tests/concurrent/examples/boundedBufferEXT.cfa
r5e49e47 rd0c91a6 8 8 // Created On : Wed Apr 18 22:52:12 2018 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : T hu Aug 16 08:17:03201811 // Update Count : 810 // Last Modified On : Tue Dec 11 21:55:02 2018 11 // Update Count : 9 12 12 // 13 13 … … 115 115 sum += sums[i]; 116 116 } // for 117 sout | "total:" | sum | endl;117 sout | "total:" | sum; 118 118 } 119 119 -
tests/concurrent/examples/boundedBufferINT.cfa
r5e49e47 rd0c91a6 8 8 // Created On : Mon Oct 30 12:45:13 2017 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : T hu Aug 16 08:17:58201811 // Update Count : 8 310 // Last Modified On : Tue Dec 11 21:55:45 2018 11 // Update Count : 84 12 12 // 13 13 … … 116 116 sum += sums[i]; 117 117 } // for 118 sout | "total:" | sum | endl;118 sout | "total:" | sum; 119 119 } 120 120 -
tests/concurrent/examples/datingService.cfa
r5e49e47 rd0c91a6 8 8 // Created On : Mon Oct 30 12:56:20 2017 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Sun May 27 09:05:18201811 // Update Count : 2 610 // Last Modified On : Tue Dec 11 21:55:34 2018 11 // Update Count : 28 12 12 // 13 13 … … 33 33 signal_block( Boys[ccode] ); // restart boy to set phone number 34 34 } // if 35 sout | "Girl:" | PhoneNo | "is dating Boy at" | BoyPhoneNo | "with ccode" | ccode; 35 36 return BoyPhoneNo; 36 37 } // DatingService girl … … 44 45 signal_block( Girls[ccode] ); // restart girl to set phone number 45 46 } // if 47 sout | " Boy:" | PhoneNo | "is dating Girl" | GirlPhoneNo | "with ccode" | ccode; 46 48 return GirlPhoneNo; 47 49 } // DatingService boy … … 58 60 yield( random( 100 ) ); // don't all start at the same time 59 61 unsigned int partner = girl( TheExchange, id, ccode ); 60 sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode | endl;61 62 girlck[id] = partner; 62 63 } // Girl main … … 69 70 70 71 thread Boy { 71 DatingService & TheExchange;72 DatingService & TheExchange; 72 73 unsigned int id, ccode; 73 74 }; // Boy … … 76 77 yield( random( 100 ) ); // don't all start at the same time 77 78 unsigned int partner = boy( TheExchange, id, ccode ); 78 sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode | endl;79 79 boyck[id] = partner; 80 80 } // Boy main -
tests/concurrent/examples/matrixSum.cfa
r5e49e47 rd0c91a6 11 11 // Created On : Mon Oct 9 08:29:28 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Nov 6 17:51:32201814 // Update Count : 1 413 // Last Modified On : Tue Dec 11 21:54:55 2018 14 // Update Count : 15 15 15 // 16 16 … … 54 54 total += subtotals[r]; // total subtotals 55 55 } // for 56 sout | total | endl;56 sout | total; 57 57 } 58 58 -
tests/concurrent/examples/quickSort.cfa
r5e49e47 rd0c91a6 9 9 // Created On : Wed Dec 6 12:15:52 2017 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : Thu Aug 16 08:17:41201812 // Update Count : 16 311 // Last Modified On : Sat Dec 22 08:44:27 2018 12 // Update Count : 168 13 13 // 14 14 … … 88 88 89 89 void usage( char * argv[] ) { 90 sout | "Usage:" | argv[0] | "( -s unsorted-file [ sorted-file ] | -t size (>= 0) [ depth (>= 0) ] )" | endl;90 sout | "Usage:" | argv[0] | "( -s unsorted-file [ sorted-file ] | -t size (>= 0) [ depth (>= 0) ] )"; 91 91 exit( EXIT_FAILURE ); // TERMINATE! 92 92 } // usage … … 114 114 &sortedfile = new( (const char *)argv[2] ); // open the output file 115 115 if ( fail( sortedfile ) ) { 116 serr | "Error! Could not open sorted output file \"" | argv[2] | "\"" | endl;116 serr | "Error! Could not open sorted output file \"" | argv[2] | "\""; 117 117 usage( argv ); 118 118 } // if … … 121 121 &unsortedfile = new( (const char *)argv[1] ); // open the input file 122 122 if ( fail( unsortedfile ) ) { 123 serr | "Error! Could not open unsorted input file \"" | argv[1] | "\"" | endl;123 serr | "Error! Could not open unsorted input file \"" | argv[1] | "\""; 124 124 usage( argv ); 125 125 } // if … … 127 127 } // if 128 128 } // if 129 sortedfile | nlOff; // turn off auto newline 129 130 130 131 enum { ValuesPerLine = 22 }; // number of values printed per line … … 137 138 for ( int counter = 0; counter < size; counter += 1 ) { // read unsorted numbers 138 139 unsortedfile | values[counter]; 139 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | endl | " ";140 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | " "; 140 141 sortedfile | values[counter]; 141 142 if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' '; 142 143 } // for 143 sortedfile | endl;144 sortedfile | nl; 144 145 if ( size > 0 ) { // values to sort ? 145 146 Quicksort QS = { values, size - 1, 0 }; // sort values 146 147 } // wait until sort tasks terminate 147 148 for ( int counter = 0; counter < size; counter += 1 ) { // print sorted list 148 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | endl | " ";149 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | " "; 149 150 sortedfile | values[counter]; 150 151 if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' '; 151 152 } // for 152 sortedfile | endl | endl;153 sortedfile | nl | nl; 153 154 154 155 delete( values ); -
tests/concurrent/monitor.cfa
r5e49e47 rd0c91a6 40 40 MyThread f[4]; 41 41 } 42 sout | global.value | endl;42 sout | global.value; 43 43 } -
tests/concurrent/multi-monitor.cfa
r5e49e47 rd0c91a6 52 52 } 53 53 } 54 sout | global12 | global23 | global13 | endl;54 sout | global12 | global23 | global13; 55 55 } -
tests/concurrent/signal/block.cfa
r5e49e47 rd0c91a6 57 57 58 58 if(a.last_thread != a.last_signaller || b.last_thread != b.last_signaller ) { 59 sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread | endl;59 sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread; 60 60 abort(); 61 61 } … … 85 85 86 86 if( ! signal_block( cond ) ) { 87 sout | "ERROR expected to be able to signal" | endl;87 sout | "ERROR expected to be able to signal"; 88 88 abort(); 89 89 } … … 92 92 93 93 if(a.last_thread != next || b.last_thread != next) { 94 sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread | endl;94 sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread; 95 95 abort(); 96 96 } … … 130 130 Signaller s[4]; 131 131 Barger b[13]; 132 sout | "Starting waiters" | endl;132 sout | "Starting waiters"; 133 133 { 134 134 Waiter w[3]; 135 135 } 136 sout | "Waiters done" | endl;136 sout | "Waiters done"; 137 137 done = true; 138 138 } -
tests/concurrent/signal/disjoint.cfa
r5e49e47 rd0c91a6 66 66 wait( cond ); 67 67 if( d.state != SIGNAL ) { 68 sout | "ERROR barging!" | endl;68 sout | "ERROR barging!"; 69 69 } 70 70 71 71 #if !defined(TEST_FOREVER) 72 72 d.counter++; 73 if( (d.counter % 1000) == 0 ) sout | d.counter | endl;73 if( (d.counter % 1000) == 0 ) sout | d.counter; 74 74 #endif 75 75 … … 99 99 bool running = TEST(data.counter < N) && data.counter > 0; 100 100 if( data.state != SIGNAL && running ) { 101 sout | "ERROR Eager signal" | data.state | endl;101 sout | "ERROR Eager signal" | data.state; 102 102 } 103 103 } … … 124 124 Waiter w[4]; 125 125 } 126 sout | "All waiter done" | endl;126 sout | "All waiter done"; 127 127 all_done = true; 128 128 } -
tests/concurrent/signal/wait.cfa
r5e49e47 rd0c91a6 83 83 break; 84 84 default: 85 sout | "Something went wrong" | endl;85 sout | "Something went wrong"; 86 86 abort(); 87 87 } … … 140 140 waiter_left = 4; 141 141 processor p[2]; 142 sout | "Starting" | endl;142 sout | "Starting"; 143 143 { 144 144 Signaler e; … … 150 150 } 151 151 } 152 sout | "Done" | endl;152 sout | "Done"; 153 153 } -
tests/concurrent/thread.cfa
r5e49e47 rd0c91a6 12 12 void main(First& this) { 13 13 for(int i = 0; i < 10; i++) { 14 sout | "First : Suspend No." | i + 1 | endl;14 sout | "First : Suspend No." | i + 1; 15 15 yield(); 16 16 } … … 21 21 P(*this.lock); 22 22 for(int i = 0; i < 10; i++) { 23 sout | "Second : Suspend No." | i + 1 | endl;23 sout | "Second : Suspend No." | i + 1; 24 24 yield(); 25 25 } … … 29 29 int main(int argc, char* argv[]) { 30 30 semaphore lock = { 0 }; 31 sout | "User main begin" | endl;31 sout | "User main begin"; 32 32 { 33 33 processor p; … … 37 37 } 38 38 } 39 sout | "User main end" | endl;39 sout | "User main end"; 40 40 } -
tests/concurrent/waitfor/barge.cfa
r5e49e47 rd0c91a6 48 48 yield(random( 10 )); 49 49 if( this.state != WAITFOR && !this.done && this.started ) { 50 serr | "Barging before caller detected" | endl;50 serr | "Barging before caller detected"; 51 51 } 52 52 … … 66 66 this.state = WAITFOR; 67 67 waitfor(do_call, this) { 68 sout | i | endl;68 sout | i; 69 69 } 70 70 71 71 if( this.state != CALL ) { 72 serr | "Barging after caller detected" | endl;72 serr | "Barging after caller detected"; 73 73 } 74 74 } … … 83 83 84 84 int main() { 85 sout | "Starting" | endl;85 sout | "Starting"; 86 86 { 87 87 barger_t bargers[17]; … … 89 89 waiter_t waiters; 90 90 } 91 sout | "Stopping" | endl;91 sout | "Stopping"; 92 92 } -
tests/concurrent/waitfor/dtor.cfa
r5e49e47 rd0c91a6 29 29 switch(state) { 30 30 case CTOR : break; 31 case MAIN : if( this.state != CTOR ) { serr | "ERROR Expected state to be CTOR" | endl; abort(); } this.state = state; break;32 case AFTER : if( this.state != MAIN ) { serr | "ERROR Expected state to be MAIN" | endl; abort(); } this.state = state; break;33 case END : if( this.state != AFTER ) { serr | "ERROR Expected state to be AFTER" | endl; abort(); } this.state = state; break;34 case DTOR : if( this.state != END ) { serr | "ERROR Expected state to be END" | endl; abort(); } this.state = state; break;31 case MAIN : if( this.state != CTOR ) { serr | "ERROR Expected state to be CTOR" ; abort(); } this.state = state; break; 32 case AFTER : if( this.state != MAIN ) { serr | "ERROR Expected state to be MAIN" ; abort(); } this.state = state; break; 33 case END : if( this.state != AFTER ) { serr | "ERROR Expected state to be AFTER"; abort(); } this.state = state; break; 34 case DTOR : if( this.state != END ) { serr | "ERROR Expected state to be END" ; abort(); } this.state = state; break; 35 35 } 36 36 } … … 54 54 55 55 int main() { 56 sout | "Starting" | endl;56 sout | "Starting"; 57 57 processor p; 58 58 for( int i = 0; i < N; i++ ){ … … 60 60 yield( random( 100 ) ); 61 61 } 62 sout | "Stopping" | endl;62 sout | "Stopping"; 63 63 } -
tests/concurrent/waitfor/else.cfa
r5e49e47 rd0c91a6 12 12 void test( M & mutex m ) { 13 13 int i = 0; 14 sout | "Starting" | endl;14 sout | "Starting"; 15 15 16 16 when( false ) waitfor( notcalled, m ); 17 17 18 sout | "Step" | i++ | endl;18 sout | "Step" | i++; 19 19 20 20 waitfor( notcalled, m ); or else { 21 sout | "else called" | endl;21 sout | "else called"; 22 22 } 23 23 24 sout | "Step" | i++ | endl;24 sout | "Step" | i++; 25 25 26 26 when( true ) waitfor( notcalled, m ); or when( true ) else { 27 sout | "else called" | endl;27 sout | "else called"; 28 28 } 29 29 30 sout | "Step" | i++ | endl;30 sout | "Step" | i++; 31 31 32 32 when( false ) waitfor( notcalled, m ); or when( true ) else { 33 sout | "else called" | endl;33 sout | "else called"; 34 34 } 35 35 36 sout | "Step" | i++ | endl;36 sout | "Step" | i++; 37 37 38 38 when( false ) waitfor( notcalled, m ); or when( false ) else { 39 sout | "else called" | endl;39 sout | "else called"; 40 40 } 41 41 42 sout | "Done" | endl;42 sout | "Done"; 43 43 } 44 44 -
tests/concurrent/waitfor/recurse.cfa
r5e49e47 rd0c91a6 95 95 rand_yield(); 96 96 97 sout | "1st" | endl;97 sout | "1st" | nl; 98 98 99 99 return this.counter < N ? (state_t)this.actions[idx] : (state_t)STOP; … … 123 123 case THIRD : while( !global.ready ) { yield(); } this.state = call3( global, this.idx ); break; 124 124 case LAST : while( !global.ready ) { yield(); } this.state = call4( global, this.idx ); break; 125 case STOP : serr | "This should not happen" | endl;125 case STOP : serr | "This should not happen" | nl; 126 126 } 127 127 } … … 132 132 int main() { 133 133 srandom( time(NULL) ); 134 sout | "Starting" | endl; 134 sout | nlOff; // turn off auto newline 135 sout | "Starting" | nl; 135 136 { 136 137 waiter_t waiters[4] = { … … 142 143 the_threads = waiters; 143 144 } 144 sout | "Stopping" | endl;145 sout | "Stopping" | nl; 145 146 } -
tests/concurrent/waitfor/simple.cfa
r5e49e47 rd0c91a6 31 31 32 32 void do_wait( global_t * mutex a ) { 33 sout | "Waiting to accept" | endl;33 sout | "Waiting to accept"; 34 34 yield( random( 10 ) ); 35 35 36 sout | "Accepting" | endl;36 sout | "Accepting"; 37 37 38 38 __acceptable_t acceptable; … … 43 43 __waitfor_internal( 1, &acceptable ); 44 44 45 sout | "Accepted" | endl;45 sout | "Accepted"; 46 46 yield( random( 10 ) ); 47 47 } … … 50 50 for( int i = 0; i < N; i++ ) { 51 51 do_wait( &globalA ); 52 sout | i | endl;52 sout | i; 53 53 } 54 54 … … 76 76 srandom( time( NULL ) ); 77 77 printf("%p\n", &globalA); 78 sout | "Starting" | endl;78 sout | "Starting"; 79 79 { 80 80 Acceptor r; … … 82 82 83 83 } 84 sout | "Done" | endl;84 sout | "Done"; 85 85 } -
tests/concurrent/waitfor/statment.cfa
r5e49e47 rd0c91a6 84 84 case 7: return call7( m ); 85 85 default : 86 serr | "Incorrect index" | index | endl;86 serr | "Incorrect index" | index; 87 87 abort(); 88 88 } … … 102 102 while( !done ) { 103 103 waitfor( get_index, this ); 104 or waitfor( call1, this ) { sout | "Statement" | endl; if( this.last_val != 1 ) { serr | "Incorrect index: expected" | 1 | "got" | this.last_val | endl; } }105 or waitfor( call2, this ) { sout | "Statement" | endl; if( this.last_val != 2 ) { serr | "Incorrect index: expected" | 2 | "got" | this.last_val | endl; } }106 or waitfor( call3, this ) { sout | "Statement" | endl; if( this.last_val != 3 ) { serr | "Incorrect index: expected" | 3 | "got" | this.last_val | endl; } }107 or waitfor( call4, this ) { sout | "Statement" | endl; if( this.last_val != 4 ) { serr | "Incorrect index: expected" | 4 | "got" | this.last_val | endl; } }108 or waitfor( call5, this ) { sout | "Statement" | endl; if( this.last_val != 5 ) { serr | "Incorrect index: expected" | 5 | "got" | this.last_val | endl; } }109 or waitfor( call6, this ) { sout | "Statement" | endl; if( this.last_val != 6 ) { serr | "Incorrect index: expected" | 6 | "got" | this.last_val | endl; } }110 or waitfor( call7, this ) { sout | "Statement" | endl; if( this.last_val != 7 ) { serr | "Incorrect index: expected" | 7 | "got" | this.last_val | endl; } }104 or waitfor( call1, this ) { sout | "Statement"; if( this.last_val != 1 ) { serr | "Incorrect index: expected" | 1 | "got" | this.last_val; } } 105 or waitfor( call2, this ) { sout | "Statement"; if( this.last_val != 2 ) { serr | "Incorrect index: expected" | 2 | "got" | this.last_val; } } 106 or waitfor( call3, this ) { sout | "Statement"; if( this.last_val != 3 ) { serr | "Incorrect index: expected" | 3 | "got" | this.last_val; } } 107 or waitfor( call4, this ) { sout | "Statement"; if( this.last_val != 4 ) { serr | "Incorrect index: expected" | 4 | "got" | this.last_val; } } 108 or waitfor( call5, this ) { sout | "Statement"; if( this.last_val != 5 ) { serr | "Incorrect index: expected" | 5 | "got" | this.last_val; } } 109 or waitfor( call6, this ) { sout | "Statement"; if( this.last_val != 6 ) { serr | "Incorrect index: expected" | 6 | "got" | this.last_val; } } 110 or waitfor( call7, this ) { sout | "Statement"; if( this.last_val != 7 ) { serr | "Incorrect index: expected" | 7 | "got" | this.last_val; } } 111 111 112 112 done = true; … … 128 128 int main() { 129 129 processor p[2]; 130 sout | "Starting" | endl;130 sout | "Starting"; 131 131 { 132 132 caller c[7]; 133 133 waiter w; 134 134 } 135 sout | "Stopping" | endl;135 sout | "Stopping"; 136 136 } -
tests/concurrent/waitfor/when.cfa
r5e49e47 rd0c91a6 58 58 void arbiter( global_t & mutex this ) { 59 59 for( int i = 0; i < N; i++ ) { 60 when( this.last_call == 6 ) waitfor( call1, this ) { if( this.last_call != 1) { serr | "Expected last_call to be 1 got" | this.last_call | endl; } }61 or when( this.last_call == 1 ) waitfor( call2, this ) { if( this.last_call != 2) { serr | "Expected last_call to be 2 got" | this.last_call | endl; } }62 or when( this.last_call == 2 ) waitfor( call3, this ) { if( this.last_call != 3) { serr | "Expected last_call to be 3 got" | this.last_call | endl; } }63 or when( this.last_call == 3 ) waitfor( call4, this ) { if( this.last_call != 4) { serr | "Expected last_call to be 4 got" | this.last_call | endl; } }64 or when( this.last_call == 4 ) waitfor( call5, this ) { if( this.last_call != 5) { serr | "Expected last_call to be 5 got" | this.last_call | endl; } }65 or when( this.last_call == 5 ) waitfor( call6, this ) { if( this.last_call != 6) { serr | "Expected last_call to be 6 got" | this.last_call | endl; } }60 when( this.last_call == 6 ) waitfor( call1, this ) { if( this.last_call != 1) { serr | "Expected last_call to be 1 got" | this.last_call; } } 61 or when( this.last_call == 1 ) waitfor( call2, this ) { if( this.last_call != 2) { serr | "Expected last_call to be 2 got" | this.last_call; } } 62 or when( this.last_call == 2 ) waitfor( call3, this ) { if( this.last_call != 3) { serr | "Expected last_call to be 3 got" | this.last_call; } } 63 or when( this.last_call == 3 ) waitfor( call4, this ) { if( this.last_call != 4) { serr | "Expected last_call to be 4 got" | this.last_call; } } 64 or when( this.last_call == 4 ) waitfor( call5, this ) { if( this.last_call != 5) { serr | "Expected last_call to be 5 got" | this.last_call; } } 65 or when( this.last_call == 5 ) waitfor( call6, this ) { if( this.last_call != 6) { serr | "Expected last_call to be 6 got" | this.last_call; } } 66 66 67 sout | this.last_call | endl;67 sout | this.last_call; 68 68 } 69 69 … … 78 78 int main() { 79 79 srandom( time(NULL) ); 80 sout | "Starting" | endl;80 sout | "Starting"; 81 81 { 82 82 arbiter_t arbiter; … … 84 84 85 85 } 86 sout | "Stopping" | endl;86 sout | "Stopping"; 87 87 } -
tests/coroutine/.expect/fmtLines.txt
r5e49e47 rd0c91a6 16 16 difi ed B y : Pete r A. 17 17 Buh r// Last Mod ifie 18 d On : M on S ep 1 8 1119 :3 5: 57 2 017/ / Up date20 Cou nt : 3 1/ /#in18 d On : T ue D ec 1 1 23 19 :31: 12 2 018/ / Up date 20 Cou nt : 32/ /#in 21 21 clud e <f stre am.h fa># 22 22 incl ude <cor outi ne.h … … 34 34 t ) { if ( fm t.g 35 35 != 0 || fmt. b != 0 ) 36 sou t | endl ;}vo id m 37 ain( For mat & fm t ) 38 { fo r ( ;; ) { 39 // f or a s ma ny c 40 hara cter s f or ( fmt 41 .g = 0; fmt. g < 5; f 42 mt.g += 1 ) { / / gr 43 oups of 5 bl ocks f 44 or ( fmt .b = 0; fmt. 45 b < 4; f mt.b += 1 ) 46 { // blo cks of 4 cha 47 ract ers f or ( ;; 48 ) { // for new 49 line cha ract ers 50 susp end( ); i f ( 51 fmt. ch ! = '\ n' ) bre 52 ak; // igno re n ewli 53 ne } // f or so 54 ut | fmt .ch; / 55 / pr int char acte r 56 } // for s out | " 57 "; / / pr int 58 bloc k se para tor } / 59 / fo r s out | en dl; 60 // p rint gro 61 up s epar ator } / / fo 62 r} / / ma invo id p rt( 63 Form at & fmt , ch ar c 64 h ) { fmt .ch = ch 65 ; res ume( fmt );} 66 // prti nt m ain( ) { 67 Form at f mt; char ch; 68 for ( ; ; ) { s in | 69 ch; // rea 70 d on e ch arac ter if 71 ( e of( sin ) ) brea 72 k; // eof ? p 73 rt( fmt, ch ); } // 74 for} // main // L ocal 75 Var iabl es: //// tab 76 -wid th: 4 // // c ompi 77 le-c omma nd: "cfa fmt 78 Line s.c" /// / En d: / 79 / 36 sou t | nl;} void mai 37 n( F orma t & fmt ) { 38 for ( ;; ) { 39 // for as many cha 40 ract ers for ( f mt.g 41 = 0 ; fm t.g < 5; fmt 42 .g + = 1 ) { // grou 43 ps o f 5 bloc ks for 44 ( f mt.b = 0 ; fm t.b 45 < 4; fmt .b + = 1 ) { 46 // b lock s of 4 c hara 47 cter s for ( ; ; ) 48 { // f or n ewli 49 ne c hara cter s su 50 spen d(); if ( fm 51 t.ch != '\n' ) b reak 52 ; / / ig nore new line 53 } // for sout 54 | f mt.c h; // 55 prin t ch arac ter } 56 // f or sou t | " " 57 ; // prin t bl 58 ock sepa rato r } // 59 for sou t | nl; 60 // p rint gro up s 61 epar ator } / / fo r} / 62 / ma invo id p rt( Form 63 at & fmt , ch ar c h ) 64 { fmt .ch = ch ; 65 res ume( fmt );} // 66 prti nt m ain( ) { Form 67 at f mt; char ch; for 68 ( ; ; ) { s in | ch; 69 // rea d on 70 e ch arac ter if ( e 71 of( sin ) ) brea k; 72 // eof ? p rt( 73 fmt, ch ); } // for} 74 // main // L ocal Var 75 iabl es: //// tab -wid 76 th: 4 // // c ompi le-c 77 omma nd: "cfa fmt Line 78 s.c" /// / En d: / / -
tests/coroutine/.in/fmtLines.txt
r5e49e47 rd0c91a6 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 18 11:35:57 201713 // Update Count : 3 112 // Last Modified On : Tue Dec 11 23:31:12 2018 13 // Update Count : 32 14 14 // 15 15 … … 27 27 28 28 void ^?{}( Format & fmt ) { 29 if ( fmt.g != 0 || fmt.b != 0 ) sout | endl;29 if ( fmt.g != 0 || fmt.b != 0 ) sout | nl; 30 30 } 31 31 … … 42 42 sout | " "; // print block separator 43 43 } // for 44 sout | endl; // print group separator44 sout | nl; // print group separator 45 45 } // for 46 46 } // main -
tests/coroutine/fibonacci.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Jun 8 07:29:37 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 18 11:21:58201813 // Update Count : 2 412 // Last Modified On : Tue Dec 11 21:57:33 2018 13 // Update Count : 25 14 14 // 15 15 … … 39 39 Fibonacci f1, f2; 40 40 for ( 10 ) { // print N Fibonacci values 41 sout | next( f1 ) | next( f2 ) | endl;41 sout | next( f1 ) | next( f2 ); 42 42 } // for 43 43 } -
tests/coroutine/fibonacci_1.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Apr 26 23:20:08 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 18 11:21:02201813 // Update Count : 1 312 // Last Modified On : Tue Dec 11 21:57:54 2018 13 // Update Count : 14 14 14 // 15 15 … … 36 36 Fibonacci f1, f2; 37 37 for ( 10 ) { // print N Fibonacci values 38 sout | next( f1 ) | next( f2 ) | endl;38 sout | next( f1 ) | next( f2 ); 39 39 } // for 40 40 } -
tests/coroutine/fmtLines.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 16 08:20:54201813 // Update Count : 4512 // Last Modified On : Sat Dec 22 18:27:00 2018 13 // Update Count : 57 14 14 // 15 15 … … 24 24 void main( Format & fmt ) with( fmt ) { 25 25 for () { // for as many characters 26 for ( g ; 5 ) {// groups of 5 blocks27 for ( b ; 4 ) {// blocks of 4 characters26 for ( g = 0; g < 5; g += 1 ) { // groups of 5 blocks 27 for ( b = 0; b < 4; b += 1 ) { // blocks of 4 characters 28 28 for () { // for newline characters 29 29 suspend(); 30 if ( ch != '\n' ) break;// ignore newline30 if ( ch != '\n' ) break; // ignore newline 31 31 } // for 32 32 sout | ch; // print character … … 34 34 sout | " "; // print block separator 35 35 } // for 36 sout | endl;// print group separator36 sout | nl; // print group separator 37 37 } // for 38 38 } // main … … 43 43 44 44 void ^?{}( Format & fmt ) with( fmt ) { 45 if ( g != 0 || b != 0 ) sout | endl;45 if ( g != 0 || b != 0 ) sout | nl; 46 46 } 47 47 48 48 void format( Format & fmt ) { 49 49 resume( fmt ); 50 } // prt50 } // format 51 51 52 52 int main() { 53 53 Format fmt; 54 sout | nlOff; // turn off auto newline 54 55 55 56 eof: for () { // read until end of file -
tests/coroutine/pingpong.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Sep 20 11:55:23 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 18 11:31:11201813 // Update Count : 2 812 // Last Modified On : Tue Dec 11 21:58:06 2018 13 // Update Count : 29 14 14 // 15 15 … … 24 24 25 25 void ?{}( PingPong & this, const char * name, unsigned int N, PingPong & part ) { 26 (this.__cor){name}; 26 27 this.name = name; 27 28 this.N = N; … … 40 41 void main( PingPong & pingpong ) { // ping's starter ::main, pong's starter ping 41 42 for ( pingpong.N ) { // N ping-pongs 42 sout | pingpong.name | endl;43 sout | pingpong.name; 43 44 cycle( *pingpong.part ); 44 45 } // for -
tests/coroutine/prodcons.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Mon Sep 18 12:23:39 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 18 12:55:10201813 // Update Count : 5 112 // Last Modified On : Wed Dec 12 23:04:49 2018 13 // Update Count : 53 14 14 // 15 15 … … 24 24 25 25 coroutine Prod { 26 Cons *c;26 Cons & c; 27 27 int N, money, receipt; 28 28 }; … … 30 30 // 1st resume starts here 31 31 for ( i; N ) { // N pairs of values 32 int p1 = random( 100 ); 33 int p2 = random( 100 ); 34 sout | p1 | " " | p2 | endl; 35 int status = delivery( *c, p1, p2 ); 36 sout | " $" | money | endl; 37 sout | status | endl; 32 int p1 = random( 100 ), p2 = random( 100 ); 33 sout | p1 | " " | p2; 34 int status = delivery( c, p1, p2 ); 35 sout | " $" | money | nl | status; 38 36 receipt += 1; 39 37 } 40 stop( *c );41 sout | "prod stops" | endl;38 stop( c ); 39 sout | "prod stops"; 42 40 } 43 41 int payment( Prod & prod, int money ) { … … 47 45 } 48 46 void start( Prod & prod, int N, Cons &c ) { 49 prod.N = N; 50 prod.c = &c; 51 prod.receipt = 0; 47 &prod.c = &c; 48 prod.[N, receipt] = [N, 0]; 52 49 resume( prod ); // activate main 53 50 } 54 51 55 52 coroutine Cons { 56 Prod *p;53 Prod & p; 57 54 int p1, p2, status; 58 55 bool done; 59 56 }; 60 57 void ?{}( Cons & cons, Prod & p ) { 61 cons.p = &p; 62 cons.status = 0; 63 cons.done = false; 58 &cons.p = &p; 59 cons.[status, done ] = [0, false]; 64 60 } 65 61 void ^?{}( Cons & cons ) {} … … 68 64 int money = 1, receipt; 69 65 for ( ; ! done; ) { 70 sout | p1 | " " | p2 | endl; 71 sout | " $" | money | endl; 66 sout | p1 | " " | p2 | nl | " $" | money; 72 67 status += 1; 73 receipt = payment( *p, money );74 sout | " #" | receipt | endl;68 receipt = payment( p, money ); 69 sout | " #" | receipt; 75 70 money += 1; 76 71 } 77 sout | "cons stops" | endl;72 sout | "cons stops"; 78 73 } 79 74 int delivery( Cons & cons, int p1, int p2 ) { 80 cons.p1 = p1; 81 cons.p2 = p2; 75 cons.[p1, p2] = [p1, p2]; 82 76 resume( cons ); // main 1st time, then 83 77 return cons.status; // cons in payment … … 92 86 srandom( /* getpid() */ 103 ); // fixed seed for testing 93 87 start( prod, 5, cons ); 94 sout | "main stops" | endl;88 sout | "main stops"; 95 89 } 96 90 -
tests/coroutine/runningTotal.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Dec 6 08:05:27 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Aug 16 08:22:29201813 // Update Count : 312 // Last Modified On : Tue Dec 11 21:59:00 2018 13 // Update Count : 4 14 14 // 15 15 … … 42 42 RunTotal rntl; 43 43 for ( i; 10 ) { 44 sout | i | add( rntl, i ) | endl;44 sout | i | add( rntl, i ); 45 45 } // for 46 46 } -
tests/div.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Aug 8 16:28:43 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:53:10201813 // Update Count : 1912 // Last Modified On : Tue Dec 4 21:35:01 2018 13 // Update Count : 20 14 14 // 15 15 16 16 #include <fstream.hfa> 17 #include <stdlib.hfa> 17 #include <stdlib.hfa> // div 18 18 19 19 struct T { int i; }; … … 23 23 24 24 int main( void ) { 25 sout | "div" | div( 13, 5 ) | div( 13L, 5L ) | div( 13LL, 5LL ) | endl;25 sout | "div" | div( 13, 5 ) | div( 13L, 5L ) | div( 13LL, 5LL ); 26 26 short s1 = 13, s2 = 5; 27 sout | "div" | div( s1, s2 ) | endl;27 sout | "div" | div( s1, s2 ); 28 28 T t1 = { 13 }, t2 = { 5 }; 29 sout | "div" | div( t1, t2 ) | endl;// polymorphic div29 sout | "div" | div( t1, t2 ); // polymorphic div 30 30 } // main 31 31 -
tests/except-0.cfa
r5e49e47 rd0c91a6 25 25 void ^?{}(signal_exit * this) { 26 26 printf("Exiting: %s\n", this->area); 27 // sout | "Exiting:" | this->area | endl;27 // sout | "Exiting:" | this->area; 28 28 } 29 29 -
tests/fallthrough.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Mar 14 10:06:25 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Nov 8 09:09:09201813 // Update Count : 1612 // Last Modified On : Mon Dec 24 11:24:35 2018 13 // Update Count : 22 14 14 // 15 15 … … 18 18 void test(int choice) { 19 19 choose ( choice ) { 20 21 sout | "case 1" | endl;22 23 24 sout | "case 2" | endl;25 26 sout | "did not fallthru" | endl;27 28 29 30 sout | "case 3" | endl;31 32 33 34 sout | "common1" | endl;20 case 1: 21 sout | "case 1"; 22 fallthru; 23 case 2: 24 sout | "case 2"; 25 fallthru; 26 sout | "did not fallthru"; 27 if ( 7 ) fallthru common2; 28 fallthru common1; 29 case 3: 30 sout | "case 3"; 31 fallthru default; 32 fallthru common1; 33 common1: 34 sout | "common1"; 35 35 // break 36 37 sout | "case 4" | endl;38 39 40 sout | "case 5" | endl;41 42 43 44 sout | "case 6" | endl;45 46 47 sout | "common2" | endl;36 case 4: 37 sout | "case 4"; 38 fallthru common2; 39 case 5: 40 sout | "case 5"; 41 fallthru common2; 42 fallthru default; 43 case 6: 44 sout | "case 6"; 45 fallthru common2; 46 common2: 47 sout | "common2"; 48 48 // break 49 50 sout | "default" | endl;51 52 } 49 default: 50 sout | "default"; 51 fallthru; 52 } // choose 53 53 54 sout | endl;54 sout | nl; 55 55 56 56 switch ( choice ) { 57 57 case 1: 58 sout | "case 1" | endl;58 sout | "case 1"; 59 59 switch ( choice ) { 60 60 case 1: 61 sout | "case 1" | endl;61 sout | "case 1"; 62 62 for ( int i = 0; i < 4; i += 1 ) { 63 printf("%d\n", i);63 sout | i; 64 64 if ( i == 2 ) fallthru common; 65 65 } // for … … 67 67 break; 68 68 case 5: 69 sout | "case 5" | endl;69 sout | "case 5"; 70 70 if ( choice == 5 ) { 71 71 if ( choice != 5 ) { 72 sout | "error" | endl;72 sout | "error"; 73 73 } else { 74 sout | "check" | endl;74 sout | "check"; 75 75 fallthru common; 76 76 } // if 77 77 } // if 78 78 common: 79 printf( "common\n" );79 sout | "common"; 80 80 fallthru; 81 81 break; 82 82 default: 83 printf( "default\n" );83 sout | "default"; 84 84 fallthru; 85 85 } // switch … … 93 93 fallthru default; 94 94 choose ( 3 ) { 95 case 2: 96 for () { 97 choose ( 2 ) { 98 case 1: 99 // ERROR: default is later, but in a different switch 100 fallthru default; 101 // ERROR: common3 is later, but not at the same level as a case clause 102 fallthru common3; 103 } 104 common3: ; 95 case 2: 96 for () { 97 choose ( 2 ) { 98 case 1: 99 // ERROR: default is later, but in a different switch 100 fallthru default; 101 // ERROR: common3 is later, but not at the same level as a case clause 102 fallthru common3; 105 103 } 106 default: 107 case 1: 108 common4: 109 // ERROR: attempt to jump up with fallthrough 110 if ( 7 ) fallthru common4; 111 // ERROR: attempt to jump up with fallthrough 112 fallthru default; 113 } 104 common3: ; 105 } // for 106 default: 107 case 1: 108 common4: 109 // ERROR: attempt to jump up with fallthrough 110 if ( 7 ) fallthru common4; 111 // ERROR: attempt to jump up with fallthrough 112 fallthru default; 113 } // choose 114 114 #endif 115 115 } … … 117 117 int main() { 118 118 test( 1 ); 119 sout | endl;119 sout | nl; 120 120 test( 5 ); 121 121 } -
tests/fstream_test.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:53:56201813 // Update Count : 6 612 // Last Modified On : Sat Dec 22 09:47:44 2018 13 // Update Count : 68 14 14 // 15 15 … … 18 18 int main( void ) { 19 19 int nombre; 20 sout | "Entrez un nombre, s'il vous plaît:" | endl;20 sout | "Entrez un nombre, s'il vous plaît:"; 21 21 sin | nombre; 22 sout | "Vous avez entré" | nombre | endl;22 sout | "Vous avez entré" | nombre; 23 23 sout | "le nombre" | nombre | "est" 24 | (nombre > 0 ? "positif" : nombre == 0 ? "zéro" : "négatif") | endl;24 | (nombre > 0 ? "positif" : nombre == 0 ? "zéro" : "négatif"); 25 25 26 sout | "Entrez trois nombres, s'il vous plaît: " | endl;26 sout | "Entrez trois nombres, s'il vous plaît:"; 27 27 int i, j, k; 28 28 sin | i | j | k; 29 sout | "Vous avez entré" | "i:" | "" | i | "j:" | "" | j | "k:" | "" | k | endl;29 sout | "Vous avez entré" | "i:" | "" | i | "j:" | "" | j | "k:" | "" | k; 30 30 } 31 31 -
tests/function-operator.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Fri Aug 25 15:21:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Aug 2 09:27:53201813 // Update Count : 812 // Last Modified On : Tue Dec 4 21:37:09 2018 13 // Update Count : 9 14 14 // 15 15 … … 83 83 // TODO: abstract over (os, T) 84 84 os_wrapper ?=?(os_wrapper & wrapper, int x) { 85 *wrapper.out | x | endl;85 *wrapper.out | x; 86 86 return wrapper; 87 87 } -
tests/genericUnion.cfa
r5e49e47 rd0c91a6 1 // 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 // 4 // The contents of this file are covered under the licence agreement in the 5 // file "LICENCE" distributed with Cforall. 6 // 7 // genericUnion.cfa -- 8 // 9 // Author : Peter A. Buhr 10 // Created On : Tue Dec 25 14:42:46 2018 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 25 14:46:33 2018 13 // Update Count : 2 14 // 15 1 16 #include <limits.hfa> 2 17 … … 4 19 union ByteView { 5 20 T val; 6 char bytes[(sizeof(int))]; 21 char bytes[(sizeof(int))]; // want to change to sizeof(T) 7 22 }; 8 23 9 24 forall(otype T) 10 25 void print(ByteView(T) x) { 11 for (int i = 0; i < sizeof(int); i++) { 26 for (int i = 0; i < sizeof(int); i++) { // want to change to sizeof(T) 12 27 printf("%02x", x.bytes[i] & 0xff); 13 28 } … … 29 44 f(i, -1); 30 45 } 46 47 // Local Variables: // 48 // tab-width: 4 // 49 // compile-command: "cfa genericUnion.cfa" // 50 // End: // -
tests/gmp.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Nov 6 17:54:34201813 // Update Count : 55 712 // Last Modified On : Thu Dec 20 22:41:47 2018 13 // Update Count : 559 14 14 // 15 15 … … 19 19 20 20 int main( void ) { 21 sout | "constructors" | endl;21 sout | "constructors"; 22 22 short int si = 3; 23 23 Int x = { "50000000000000000000" }, y = { si }, z = x + y; 24 sout | x | y | z | endl;25 sout | "x:" | x | "y:" | y | "z:" | z | endl;24 sout | x | y | z; 25 sout | "x:" | x | "y:" | y | "z:" | z; 26 26 27 sout | "conversions" | endl;27 sout | "conversions"; 28 28 y = 'a'; 29 sout | "y:" | y | endl;29 sout | "y:" | y; 30 30 y = "12345678901234567890123456789"; 31 sout | "y:" | y | endl;31 sout | "y:" | y; 32 32 y = 100`mp + 100`mp; 33 sout | "y:" | y | endl;33 sout | "y:" | y; 34 34 y = -200u`mp + -200u`mp; 35 sout | "y:" | y | endl;35 sout | "y:" | y; 36 36 y = "12345678901234567890123456789"`mp + "12345678901234567890123456789"`mp; 37 sout | "y:" | y | endl;37 sout | "y:" | y; 38 38 y = si; 39 sout | "y:" | y | endl;39 sout | "y:" | y; 40 40 y = -3; 41 sout | "y:" | y | endl;41 sout | "y:" | y; 42 42 y += 7; 43 sout | "y:" | y | endl;43 sout | "y:" | y; 44 44 y -= 1; 45 sout | "y:" | y | endl;45 sout | "y:" | y; 46 46 int b; 47 47 b = y; 48 48 si = y; 49 sout | "y:" | y | "b:" | b | "si:" | si | endl;49 sout | "y:" | y | "b:" | b | "si:" | si; 50 50 51 sout | "comparison" | endl;52 sout | x == x | endl;53 sout | x != x | endl;54 sout | x < x | endl;55 sout | x <= x | endl;56 sout | x > x | endl;57 sout | x >= x | endl;51 sout | "comparison"; 52 sout | x == x; 53 sout | x != x; 54 sout | x < x; 55 sout | x <= x; 56 sout | x > x; 57 sout | x >= x; 58 58 59 sout | "arithmetic" | endl;59 sout | "arithmetic"; 60 60 z = x + y + z; 61 sout | "z:" | z | endl;61 sout | "z:" | z; 62 62 z = z = x; 63 sout | "z:" | z | endl;63 sout | "z:" | z; 64 64 z = x - y - z; 65 sout | "z:" | z | endl;65 sout | "z:" | z; 66 66 z = x * y * z; 67 sout | "z:" | z | endl;67 sout | "z:" | z; 68 68 z = x * 3; 69 sout | "z:" | z | endl;69 sout | "z:" | z; 70 70 z = 3 * x; 71 sout | "z:" | z | endl;71 sout | "z:" | z; 72 72 z = x / 3; 73 sout | "z:" | z | endl;74 sout | div( x, 3 ) | x / 3 | "," | x % 3 | endl;73 sout | "z:" | z; 74 sout | div( x, 3 ) | x / 3 | "," | x % 3; 75 75 [ x, y ] = div( x, 3 ); 76 sout | "x:" | x | "y:" | y | endl;76 sout | "x:" | x | "y:" | y; 77 77 78 sout | endl;78 sout | nl; 79 79 80 80 sin | x | y | z; 81 sout | x | y | z | endl;81 sout | x | y | z; 82 82 83 sout | endl;83 sout | nl; 84 84 85 sout | "Fibonacci Numbers" | endl;85 sout | "Fibonacci Numbers"; 86 86 Int fn, fn1, fn2; 87 87 fn = (Int){0}; fn1 = fn; // 1st case 88 sout | (int)0 | fn | endl;88 sout | (int)0 | fn; 89 89 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 90 sout | 1 | fn | endl;90 sout | 1 | fn; 91 91 for ( i; 2u ~= 200 ) { 92 92 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 93 sout | i | fn | endl;93 sout | i | fn; 94 94 } // for 95 95 96 sout | endl;96 sout | nl; 97 97 98 sout | "Factorial Numbers" | endl;98 sout | "Factorial Numbers"; 99 99 Int fact = 1; // 1st case 100 sout | (int)0 | fact | endl;100 sout | (int)0 | fact; 101 101 for ( i; 1u ~= 40u ) { 102 102 fact *= i; // general case 103 sout | i | fact | endl;103 sout | i | fact; 104 104 } // for 105 105 } // main -
tests/heap.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Nov 6 17:54:56 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Nov 8 09:03:54201813 // Update Count : 1 712 // Last Modified On : Tue Dec 11 21:52:40 2018 13 // Update Count : 18 14 14 // 15 15 … … 45 45 for ( i; NoOfAllocs ) { 46 46 locns[i] = alloc( i ); 47 //sout | (void *)locns[i] | endl;47 //sout | (void *)locns[i]; 48 48 for ( k; i ) locns[i][k] = '\345'; 49 49 } // for 50 //sout | (char *)sbrk(0) - start | " bytes" | endl;50 //sout | (char *)sbrk(0) - start | " bytes"; 51 51 52 52 for ( i; NoOfAllocs ) { 53 //sout | (void *)locns[i] | endl;53 //sout | (void *)locns[i]; 54 54 for ( k; i ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage1" ); 55 55 free( locns[i] ); 56 56 } // for 57 //sout | (char *)sbrk(0) - start | " bytes" | endl;57 //sout | (char *)sbrk(0) - start | " bytes"; 58 58 59 59 for ( i; NoOfAllocs ) { 60 60 locns[i] = alloc( i ); 61 //sout | (void *)locns[i] | endl;61 //sout | (void *)locns[i]; 62 62 for ( k; i ) locns[i][k] = '\345'; 63 63 } // for 64 64 for ( i; NoOfAllocs - 1 -~= 0 ) { 65 //sout | (void *)locns[i] | endl;65 //sout | (void *)locns[i]; 66 66 for ( k; i ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage2" ); 67 67 free( locns[i] ); … … 186 186 187 187 for ( a; libAlign() ~= limit ~ a ) { // generate powers of 2 188 //sout | alignments[a] | endl;188 //sout | alignments[a]; 189 189 for ( s; 1 ~ NoOfAllocs ) { // allocation of size 0 can return null 190 190 char * area = (char *)memalign( a, s ); 191 191 if ( area == 0 ) abort( "memalign/free out of memory" ); 192 //sout | i | " " | area | endl;192 //sout | i | " " | area; 193 193 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 194 194 abort( "memalign/free bad alignment : memalign(%d,%d) = %p", (int)a, s, area ); … … 203 203 204 204 for ( a; libAlign() ~= limit ~ a ) { // generate powers of 2 205 //sout | alignments[a] | endl;205 //sout | alignments[a]; 206 206 for ( i; 1 ~ NoOfMmaps ) { 207 207 size_t s = i + default_mmap_start(); // cross over point 208 208 char * area = (char *)memalign( a, s ); 209 209 if ( area == 0 ) abort( "memalign/free out of memory" ); 210 //sout | i | " " | area | endl;210 //sout | i | " " | area; 211 211 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 212 212 abort( "memalign/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)s, area ); … … 268 268 char * area = (char *)memalign( a, amount ); // aligned N-byte allocation 269 269 if ( area == 0 ) abort( "memalign/realloc/free out of memory" ); // no storage ? 270 //sout | alignments[a] | " " | area | endl;270 //sout | alignments[a] | " " | area; 271 271 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 272 272 abort( "memalign/realloc/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)amount, area ); … … 279 279 area = (char *)realloc( area, s ); // attempt to reuse storage 280 280 if ( area == 0 ) abort( "memalign/realloc/free out of memory" ); // no storage ? 281 //sout | i | " " | area | endl;281 //sout | i | " " | area; 282 282 if ( (size_t)area % a != 0 ) { // check for initial alignment 283 283 abort( "memalign/realloc/free bad alignment %p", area ); … … 291 291 292 292 for ( a; libAlign() ~= limit ~ a ) { // generate powers of 2 293 //sout | alignments[a] | endl;293 //sout | alignments[a]; 294 294 for ( s; 1 ~ limit ) { // allocation of size 0 can return null 295 295 char * area = (char *)cmemalign( a, 1, s ); 296 296 if ( area == 0 ) abort( "cmemalign/free out of memory" ); 297 //sout | i | " " | area | endl;297 //sout | i | " " | area; 298 298 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 299 299 abort( "cmemalign/free bad alignment : cmemalign(%d,%d) = %p", (int)a, s, area ); … … 314 314 char * area = (char *)cmemalign( a, 1, amount ); // aligned N-byte allocation 315 315 if ( area == 0 ) abort( "cmemalign/realloc/free out of memory" ); // no storage ? 316 //sout | alignments[a] | " " | area | endl;316 //sout | alignments[a] | " " | area; 317 317 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 318 318 abort( "cmemalign/realloc/free bad alignment : cmemalign(%d,%d) = %p", (int)a, (int)amount, area ); … … 328 328 area = (char *)realloc( area, s ); // attempt to reuse storage 329 329 if ( area == 0 ) abort( "cmemalign/realloc/free out of memory" ); // no storage ? 330 //sout | i | " " | area | endl;330 //sout | i | " " | area; 331 331 if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment 332 332 abort( "cmemalign/realloc/free bad alignment %p", area ); … … 339 339 free( area ); 340 340 } // for 341 //sout | "worker" | thisTask() | "successful completion" | endl;341 //sout | "worker" | thisTask() | "successful completion"; 342 342 } // Worker main 343 343 -
tests/hello.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:56:22201813 // Update Count : 1 612 // Last Modified On : Tue Dec 4 21:38:39 2018 13 // Update Count : 17 14 14 // 15 15 … … 17 17 18 18 int main() { 19 sout | "Hello world!" | endl;20 sout | "Bonjour le monde!" | endl;21 sout | "Hola Mundo!" | endl;22 sout | "Hallo Welt!" | endl;23 sout | "Kaixo Mundua!" | endl;24 sout | "Chào thế giới!" | endl;25 sout | "Привет мир!" | endl;26 sout | "שלום עולם!" | endl;27 sout | "你好,世界!" | endl;28 sout | "こんにちは世界!" | endl;29 sout | "안녕하세요 세계!" | endl;30 sout | "नमस्ते दुनिया!" | endl;19 sout | "Hello world!"; 20 sout | "Bonjour le monde!"; 21 sout | "Hola Mundo!"; 22 sout | "Hallo Welt!"; 23 sout | "Kaixo Mundua!"; 24 sout | "Chào thế giới!"; 25 sout | "Привет мир!"; 26 sout | "שלום עולם!"; 27 sout | "你好,世界!"; 28 sout | "こんにちは世界!"; 29 sout | "안녕하세요 세계!"; 30 sout | "नमस्ते दुनिया!"; 31 31 } 32 32 -
tests/identity.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:56:54201813 // Update Count : 1912 // Last Modified On : Tue Dec 4 21:38:59 2018 13 // Update Count : 20 14 14 // 15 15 … … 22 22 23 23 int main() { 24 sout | "char\t\t\t" | identity( 'z' ) | endl;25 sout | "signed int\t\t" | identity( 4 ) | endl;26 sout | "unsigned int\t\t" | identity( 4u ) | endl;27 sout | "signed long int\t\t" | identity( 4l ) | endl;28 sout | "unsigned long int\t" | identity( 4ul ) | endl;29 sout | "signed long long int\t" | identity( 4ll ) | endl;30 sout | "unsigned long long int\t" | identity( 4ull ) | endl;31 sout | "float\t\t\t" | identity( 4.1f ) | endl;32 sout | "double\t\t\t" | identity( 4.1 ) | endl;33 sout | "long double\t\t" | identity( 4.1l ) | endl;34 sout | "float _Complex\t\t" | identity( -4.1F-2.0iF ) | endl;35 sout | "double _Complex\t\t" | identity( -4.1D-2.0iD ) | endl;36 sout | "long double _Complex\t" | identity( -4.1L-2.0iL ) | endl;24 sout | "char\t\t\t" | identity( 'z' ); 25 sout | "signed int\t\t" | identity( 4 ); 26 sout | "unsigned int\t\t" | identity( 4u ); 27 sout | "signed long int\t\t" | identity( 4l ); 28 sout | "unsigned long int\t" | identity( 4ul ); 29 sout | "signed long long int\t" | identity( 4ll ); 30 sout | "unsigned long long int\t" | identity( 4ull ); 31 sout | "float\t\t\t" | identity( 4.1f ); 32 sout | "double\t\t\t" | identity( 4.1 ); 33 sout | "long double\t\t" | identity( 4.1l ); 34 sout | "float _Complex\t\t" | identity( -4.1F-2.0iF ); 35 sout | "double _Complex\t\t" | identity( -4.1D-2.0iD ); 36 sout | "long double _Complex\t" | identity( -4.1L-2.0iL ); 37 37 } 38 38 -
tests/ifwhileCtl.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Sat Aug 26 10:13:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:07201813 // Update Count : 2 212 // Last Modified On : Tue Dec 4 21:39:18 2018 13 // Update Count : 23 14 14 // 15 15 … … 22 22 23 23 if ( int x = 1 ) { 24 sout | "x != 0 correct" | endl;24 sout | "x != 0 correct"; 25 25 } else { 26 sout | "x == 0 incorrect" | endl;26 sout | "x == 0 incorrect"; 27 27 } // if 28 28 29 29 if ( int x = 4, y = 0 ) { 30 sout | "x != 0 && y != 0 incorrect" | endl;30 sout | "x != 0 && y != 0 incorrect"; 31 31 } else if ( int x = 4, y = 1 ) { 32 sout | "x != 0 && y != 0 correct" | endl;32 sout | "x != 0 && y != 0 correct"; 33 33 } else { 34 sout | "x == 0 || y == 0 incorrect" | endl;34 sout | "x == 0 || y == 0 incorrect"; 35 35 } // if 36 36 37 37 if ( int x = 5, y = f( x ); x == y ) { 38 sout | "x == y correct" | endl;38 sout | "x == y correct"; 39 39 } else { 40 sout | "x != y incorrect" | endl;40 sout | "x != y incorrect"; 41 41 } // if 42 42 43 43 if ( struct S { int i; } s = { 3 }; s.i < 4 ) { 44 44 S s1; 45 sout | "s.i < 4 correct" | endl;45 sout | "s.i < 4 correct"; 46 46 } else { 47 47 S s1; 48 sout | "s.i >= 4 incorrect" | endl;48 sout | "s.i >= 4 incorrect"; 49 49 } // if 50 50 51 51 while ( int x = 1 ) { 52 sout | "x != 0 correct" | endl;52 sout | "x != 0 correct"; 53 53 break; 54 54 } // while 55 55 56 56 while ( int x = 4, y = 0 ) { 57 sout | "x != 0 && y != 0 incorrect" | endl;57 sout | "x != 0 && y != 0 incorrect"; 58 58 } // while 59 59 60 60 while ( int x = 5, y = f( x ); x == y ) { 61 sout | "x == y correct" | endl;61 sout | "x == y correct"; 62 62 break; 63 63 } // while … … 65 65 while ( struct S { int i; } s = { 3 }; s.i < 4 ) { 66 66 S s1; 67 sout | "s.i < 4 correct" | endl;67 sout | "s.i < 4 correct"; 68 68 break; 69 69 } // while -
tests/io1.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:17201813 // Update Count : 1 0512 // Last Modified On : Fri Dec 21 16:02:55 2018 13 // Update Count : 114 14 14 // 15 15 … … 18 18 int main() { 19 19 int x = 3, y = 5, z = 7; 20 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;21 sout | 1 | 2 | 3 | endl;22 sout | '1' | '2' | '3' | endl;23 sout | 1 | "" | 2 | "" | 3 | endl;24 sout | endl;20 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2); 21 sout | 1 | 2 | 3; 22 sout | '1' | '2' | '3'; 23 sout | 1 | "" | 2 | "" | 3; 24 sout | nl; 25 25 26 sout | "opening delimiters" | endl;27 sout 28 | "x (" | 129 | "x [" | 230 | "x {" | 331 | "x =" | 432 | "x $" | 533 | "x £" | 634 | "x ¥" | 735 | "x ¡" | 836 | "x ¿" | 937 | "x «" | 1038 | endl | endl;26 sout | nlOff; 27 sout | "opening delimiters" | nl; 28 sout | "x (" | 1; 29 sout | "x [" | 2; 30 sout | "x {" | 3; 31 sout | "x =" | 4; 32 sout | "x $" | 5; 33 sout | "x £" | 6; 34 sout | "x ¥" | 7; 35 sout | "x ¡" | 8; 36 sout | "x ¿" | 9; 37 sout | "x «" | 10; 38 sout | nl | nl; 39 39 40 sout | "closing delimiters" | endl; 41 sout 42 | 1 | ", x" 43 | 2 | ". x" 44 | 3 | "; x" 45 | 4 | "! x" 46 | 5 | "? x" 47 | 6 | "% x" 48 | 7 | "¢ x" 49 | 8 | "» x" 50 | 9 | ") x" 51 | 10 | "] x" 52 | 11 | "} x" 53 | endl | endl; 40 sout | "closing delimiters" | nl; 41 sout | 1 | ", x"; 42 sout | 2 | ". x"; 43 sout | 3 | "; x"; 44 sout | 4 | "! x"; 45 sout | 5 | "? x"; 46 sout | 6 | "% x"; 47 sout | 7 | "¢ x"; 48 sout | 8 | "» x"; 49 sout | 9 | ") x"; 50 sout | 10 | "] x"; 51 sout | 11 | "} x"; 52 sout | nl | nl; 54 53 55 sout | "opening/closing delimiters" | endl; 56 sout 57 | "x`" | 1 | "`x'" | 2 58 | "'x\"" | 3 | "\"x:" | 4 59 | ":x " | 5 | " x\t" | 6 60 | "\tx\f" | 7 | "\fx\v" | 8 61 | "\vx\n" | 9 | "\nx\r" | 10 62 | "\rx" 63 | endl | endl; 54 sout | "opening/closing delimiters" | nl; 55 sout | "x`" | 1 | "`x'" | 2; 56 sout | "'x\"" | 3 | "\"x:" | 4; 57 sout | ":x " | 5 | " x\t" | 6; 58 sout | "\tx\f" | 7 | "\fx\v" | 8; 59 sout | "\vx\n" | 9 | "\nx\r" | 10; 60 sout | "\rx"; 61 sout | nl | nl; 64 62 65 sout | "override opening/closing delimiters" | endl; 66 sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl; 67 sout | endl; 63 sout | nlOn; 64 sout | "override opening/closing delimiters"; 65 sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4; 66 sout | nl; 68 67 } 69 68 -
tests/io2.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:28201813 // Update Count : 1 0412 // Last Modified On : Fri Dec 21 08:20:14 2018 13 // Update Count : 112 14 14 // 15 15 16 16 #include <fstream.hfa> 17 17 18 18 #define xstr(s) str(s) 19 19 #define str(s) #s 20 20 … … 41 41 char s1[size], s2[size]; 42 42 43 ifstream in = { xstr(IN_DIR) "io.data" }; 43 ifstream in = { xstr(IN_DIR) "io.data" }; // create / open file 44 44 45 sout | "input bacis types" | endl;46 in | b // boolean47 | c | sc | usc// character48 | si | usi | i | ui | li | uli | lli | ulli// integral49 | f | d | ld// floating point50 | fc | dc | ldc// floating-point complex51 | cstr( s1 ) | cstr( s2, size ); // C string, length unchecked and checked52 sout | endl;45 sout | "input bacis types"; 46 in | b; // boolean 47 in | c | sc | usc; // character 48 in | si | usi | i | ui | li | uli | lli | ulli; // integral 49 in | f | d | ld; // floating point 50 in | fc | dc | ldc; // floating-point complex 51 in | cstr( s1 ) | cstr( s2, size ); // C string, length unchecked and checked 52 sout | nl; 53 53 54 sout | "output basic types" | endl;55 sout | b | endl// boolean56 | c | ' ' | sc | ' ' | usc | endl// character57 | si | usi | i | ui | li | uli | lli | ulli | endl// integral58 | f | d | ld | endl// floating point59 | fc | dc | ldc | endl;// complex60 sout | endl;54 sout | "output basic types"; 55 sout | b; // boolean 56 sout | c | ' ' | sc | ' ' | usc; // character 57 sout | si | usi | i | ui | li | uli | lli | ulli; // integral 58 sout | f | d | ld; // floating point 59 sout | fc | dc | ldc; // complex 60 sout | nl; 61 61 62 sout | "tuples" | endl;62 sout | "tuples"; 63 63 [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ]; 64 sout | t1 | t2 | endl;// print tuple65 sout | endl;64 sout | t1 | t2; // print tuple 65 sout | nl; 66 66 67 sout | "toggle separator" | endl;68 sout | f | "" | d | "" | ld | endl// floating point without separator69 | sepDisable | fc | dc | ldc | endl// complex without separator70 | fc | sepOn | dc | ldc | endl// local separator add71 | sepEnable | fc | dc | ldc | endl// complex with separator72 | fc | sepOff | dc | ldc | endl// local separator removal73 | s1 | sepOff | s2 | endl// local separator removal74 | s1 | "" | s2 | endl;// local separator removal75 sout | endl;67 sout | "toggle separator"; 68 sout | f | "" | d | "" | ld; // floating point without separator 69 sout | sepDisable | fc | dc | ldc; // complex without separator 70 sout | fc | sepOn | dc | ldc; // local separator add 71 sout | sepEnable | fc | dc | ldc; // complex with separator 72 sout | fc | sepOff | dc | ldc; // local separator removal 73 sout | s1 | sepOff | s2; // local separator removal 74 sout | s1 | "" | s2; // local separator removal 75 sout | nl; 76 76 77 sout | "change separator" | endl;78 sout | "from \"" | sep | "\"" ;77 sout | "change separator"; 78 sout | "from \"" | sep | "\"" | nonl; 79 79 sepSet( sout, ", $" ); // change separator, maximum of 15 characters 80 sout | " to \"" | sep | "\"" | endl;81 sout | f | d | ld | endl82 | fc | dc | ldc | endl83 | s1 | s2 | endl84 | t1 | t2 | endl;// print tuple85 sout | endl;86 sout | "from \"" | sep | "\" " ;80 sout | " to \"" | sep | "\""; 81 sout | f | d | ld; 82 sout | fc | dc | ldc; 83 sout | s1 | s2; 84 sout | t1 | t2; // print tuple 85 sout | nl; 86 sout | "from \"" | sep | "\" " | nonl; 87 87 sepSet( sout, " " ); // restore separator 88 sout | "to \"" | sep | "\"" | endl;89 sout | f | d | ld | endl90 | fc | dc | ldc | endl91 | s1 | s2 | endl92 | t1 | t2 | endl;// print tuple93 sout | endl;88 sout | "to \"" | sep | "\""; 89 sout | f | d | ld; 90 sout | fc | dc | ldc; 91 sout | s1 | s2; 92 sout | t1 | t2; // print tuple 93 sout | nl; 94 94 95 sout | "check sepOn/sepOff" | endl;96 sout | sepOn | 1 | 2 | 3 | sepOn | endl;// no separator at start/end of line97 sout | 1 | sepOff | 2 | 3 | endl;// locally turn off implicit separator98 sout | sepOn | sepOn | 1 | 2 | 3 | sepOn | sepOff | sepOn | '\n' ; // no separator at start/end of line99 sout | 1 | 2 | 3 | "\n\n" | sepOn ; // no separator at start of next line100 sout | 1 | 2 | 3 | endl;101 sout | endl;95 sout | "check sepOn/sepOff"; 96 sout | sepOn | 1 | 2 | 3 | sepOn; // no separator at start/end of line 97 sout | 1 | sepOff | 2 | 3; // locally turn off implicit separator 98 sout | sepOn | sepOn | 1 | 2 | 3 | sepOn | sepOff | sepOn | '\n' | nonl; // no separator at start/end of line 99 sout | 1 | 2 | 3 | "\n\n" | sepOn | nonl; // no separator at start of next line 100 sout | 1 | 2 | 3; 101 sout | nl; 102 102 103 sout | "check enable/disable" | endl;104 sout | sepDisable | 1 | 2 | 3 | endl;// globally turn off implicit separation105 sout | 1 | sepOn | 2 | 3 | endl;// locally turn on implicit separator106 sout | sepEnable | 1 | 2 | 3 | endl | sepDisable;// globally turn on/off implicit separation107 sout | 1 | 2 | 3 | endl | sepEnable;// globally turn on implicit separation108 sout | 1 | 2 | 3 | sepOn | sepDisable | endl;// ignore seperate at end of line109 sout | 1 | 2 | 3 | sepOn | sepEnable | endl;// separator at end of line110 sout | 1 | 2 | 3 | endl;111 sout | endl;103 sout | "check enable/disable"; 104 sout | sepDisable | 1 | 2 | 3; // globally turn off implicit separation 105 sout | 1 | sepOn | 2 | 3; // locally turn on implicit separator 106 sout | sepEnable | 1 | 2 | 3 | sepDisable; // globally turn on/off implicit separation 107 sout | 1 | 2 | 3 | sepEnable; // globally turn on implicit separation 108 sout | 1 | 2 | 3 | sepOn | sepDisable; // ignore seperate at end of line 109 sout | 1 | 2 | 3 | sepOn | sepEnable; // separator at end of line 110 sout | 1 | 2 | 3; 111 sout | nl; 112 112 113 // sout | fmt( d, "%8.3f" ) || endl; 114 // sout | endl; 113 // sout | fmt( d, "%8.3f" ); 115 114 116 115 sepSetTuple( sout, " " ); // set tuple separator from ", " to " " 117 sout | t1 | t2 | " \"" | sep | "\"" | endl;116 sout | t1 | t2 | " \"" | sep | "\""; 118 117 sepSetTuple( sout, ", " ); // reset tuple separator to ", " 119 sout | t1 | t2 | " \"" | sep | "\"" | endl;120 sout | t1 | t2 | endl;// print tuple121 sout | endl;118 sout | t1 | t2 | " \"" | sep | "\""; 119 sout | t1 | t2; // print tuple 120 sout | nl; 122 121 123 122 [int, int, const char *, double] t3 = { 3, 4, "a", 7.2 }; 124 sout | [ 3, 4, "a", 7.2 ] | endl;125 sout | t3 | endl;123 sout | [ 3, 4, "a", 7.2 ]; 124 sout | t3; 126 125 sepSetTuple( sout, " " ); 127 sout | t3 | endl;128 sout | sepOn | t3 | sepDisable | t3 | sepEnable | t3 | endl;126 sout | t3; 127 sout | sepOn | t3 | sepDisable | t3 | sepEnable | t3; 129 128 sepSet( sout, "^" ); 130 129 sepSetTuple( sout, "-" ); 131 sout | t3 | 3 | 4 | t3 | endl;130 sout | t3 | 3 | 4 | t3; 132 131 } 133 132 134 133 // Local Variables: // 135 134 // tab-width: 4 // 136 // compile-command: "cfa io2.cfa" //135 // compile-command: "cfa -DIN_DIR=".in/" io2.cfa" // 137 136 // End: // -
tests/literals.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Sat Sep 9 16:34:38 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:58:07201813 // Update Count : 13 812 // Last Modified On : Tue Dec 4 21:44:01 2018 13 // Update Count : 139 14 14 // 15 15 … … 18 18 #include <fstream.hfa> 19 19 20 void f( char v ) { sout | "char " | v | endl; }21 void f( signed char v ) { sout | "signed char " | v | endl; }22 void f( unsigned char v ) { sout | "unsigned char " | v | endl; }23 void f( signed short v ) { sout | "signed short int" | v | endl; }24 void f( unsigned short v ) { sout | "unsigned short int" | v | endl; }25 void f( size_t v ) { sout | "size_t" | v | endl; }20 void f( char v ) { sout | "char " | v; } 21 void f( signed char v ) { sout | "signed char " | v; } 22 void f( unsigned char v ) { sout | "unsigned char " | v; } 23 void f( signed short v ) { sout | "signed short int" | v; } 24 void f( unsigned short v ) { sout | "unsigned short int" | v; } 25 void f( size_t v ) { sout | "size_t" | v; } 26 26 #endif // __CFA__ 27 27 -
tests/loopctrl.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Aug 8 18:32:59 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Nov 7 16:54:11201813 // Update Count : 6212 // Last Modified On : Sun Dec 23 23:00:29 2018 13 // Update Count : 79 14 14 // 15 15 … … 32 32 S ?-=?( S & t, one_t ) { t.i -= 1; t.j -= 1; return t; } 33 33 ofstream & ?|?( ofstream & os, S v ) { return os | '(' | v.i | v.j | ')'; } 34 void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); } 34 35 35 36 int main() { 36 while () { sout | "empty"; break; } sout | endl; 37 do { sout | "empty"; break; } while (); sout | endl; 38 for () { sout | "empty"; break; } sout | endl | endl; 37 sout | nlOff; // turn off auto newline 38 while () { sout | "empty"; break; } sout | nl; 39 do { sout | "empty"; break; } while (); sout | nl; 40 for () { sout | "empty"; break; } sout | nl | nl; 39 41 40 for ( 0 ) { sout | "A"; } sout | "zero" | endl;41 for ( 1 ) { sout | "A"; } sout | endl;42 for ( 10 ) { sout | "A"; } sout | endl;43 for ( 1 ~= 10 ~ 2 ) { sout | "B"; } sout | endl;44 for ( 10 -~= 1 ~ 2 ) { sout | "C"; } sout | endl;45 for ( 0.5 ~ 5.5 ) { sout | "D"; } sout | endl;46 for ( 5.5 -~ 0.5 ) { sout | "E"; } sout | endl | endl;42 for ( 0 ) { sout | "A"; } sout | "zero" | nl; 43 for ( 1 ) { sout | "A"; } sout | nl; 44 for ( 10 ) { sout | "A"; } sout | nl; 45 for ( 1 ~= 10 ~ 2 ) { sout | "B"; } sout | nl; 46 for ( 10 -~= 1 ~ 2 ) { sout | "C"; } sout | nl; 47 for ( 0.5 ~ 5.5 ) { sout | "D"; } sout | nl; 48 for ( 5.5 -~ 0.5 ) { sout | "E"; } sout | nl | nl; 47 49 48 for ( i; 10 ) { sout | i; } sout | endl;49 for ( i; 1 ~= 10 ~ 2 ) { sout | i; } sout | endl;50 for ( i; 10 -~= 1 ~ 2 ) { sout | i; } sout | endl;51 for ( i; 0.5 ~ 5.5 ) { sout | i; } sout | endl;52 for ( i; 5.5 -~ 0.5 ) { sout | i; } sout | endl;53 for ( ui; 2u ~= 10u ~ 2u ) { sout | ui; } sout | endl;54 for ( ui; 10u -~= 2u ~ 2u ) { sout | ui; } sout | endl | endl | endl;50 for ( i; 10 ) { sout | i; } sout | nl; 51 for ( i; 1 ~= 10 ~ 2 ) { sout | i; } sout | nl; 52 for ( i; 10 -~= 1 ~ 2 ) { sout | i; } sout | nl; 53 for ( i; 0.5 ~ 5.5 ) { sout | i; } sout | nl; 54 for ( i; 5.5 -~ 0.5 ) { sout | i; } sout | nl; 55 for ( ui; 2u ~= 10u ~ 2u ) { sout | ui; } sout | nl; 56 for ( ui; 10u -~= 2u ~ 2u ) { sout | ui; } sout | nl | nl | nl; 55 57 56 58 enum { N = 10 }; 57 for ( N ) { sout | "N"; } sout | endl;58 for ( i; N ) { sout | i; } sout | endl;59 for ( i; N -~ 0 ) { sout | i; } sout | endl | endl | endl;59 for ( N ) { sout | "N"; } sout | nl; 60 for ( i; N ) { sout | i; } sout | nl; 61 for ( i; N -~ 0 ) { sout | i; } sout | nl | nl | nl; 60 62 61 63 const int start = 3, comp = 10, inc = 2; 62 for ( i; start ~ comp ~ inc + 1 ) { sout | i; } sout | endl | endl;64 for ( i; start ~ comp ~ inc + 1 ) { sout | i; } sout | nl | nl; 63 65 64 sout | endl;65 for ( S s = (S){0}; s < (S){10,10}; s += (S){1} ) { sout | s; } sout | endl;66 for ( s; (S){10,10} ) { sout | s; } sout | endl;67 sout | endl;68 for ( s; (S){0} ~ (S){10,10} ) { sout | s; } sout | endl;69 for ( s; (S){0} ~ (S){10,10} ~ (S){1} ) { sout | s; } sout | endl;70 for ( s; (S){0} ~= (S){10,10} ) { sout | s; } sout | endl;71 for ( s; (S){0} ~= (S){10,10} ~ (S){1} ) { sout | s; } sout | endl;72 sout | endl;73 for ( s; (S){10,10} -~ (S){0} ) { sout | s; } sout | endl;74 for ( s; (S){10,10} -~ (S){0} ~ (S){1} ) { sout | s; } sout | endl;75 for ( s; (S){10,10} -~= (S){0} ) { sout | s; } sout | endl;76 for ( s; (S){10,10} -~= (S){0} ~ (S){1} ) { sout | s; } sout | endl;66 sout | nl; 67 for ( S s = (S){0}; s < (S){10,10}; s += (S){1} ) { sout | s; } sout | nl; 68 for ( s; (S){10,10} ) { sout | s; } sout | nl; 69 sout | nl; 70 for ( s; (S){0} ~ (S){10,10} ) { sout | s; } sout | nl; 71 for ( s; (S){0} ~ (S){10,10} ~ (S){1} ) { sout | s; } sout | nl; 72 for ( s; (S){0} ~= (S){10,10} ) { sout | s; } sout | nl; 73 for ( s; (S){0} ~= (S){10,10} ~ (S){1} ) { sout | s; } sout | nl; 74 sout | nl; 75 for ( s; (S){10,10} -~ (S){0} ) { sout | s; } sout | nl; 76 for ( s; (S){10,10} -~ (S){0} ~ (S){1} ) { sout | s; } sout | nl; 77 for ( s; (S){10,10} -~= (S){0} ) { sout | s; } sout | nl; 78 for ( s; (S){10,10} -~= (S){0} ~ (S){1} ) { sout | s; } sout | nl; 77 79 } 78 80 -
tests/math1.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:58:37201813 // Update Count : 8 612 // Last Modified On : Wed Dec 12 16:28:49 2018 13 // Update Count : 89 14 14 // 15 15 … … 22 22 long double l; 23 23 24 sout | "fmod:" | 5.0F % -2.0F | fmod( 5.0F, -2.0F ) | 5.0D % -2.0D | fmod( 5.0D, -2.0D ) | 5.0L % -2.0L | fmod( 5.0L, -2.0L ) | endl; 25 sout | "remainder:" | remainder( 2.0F, 3.0F ) | remainder( 2.0D, 3.0D ) | remainder( 2.0L, 3.0L ) | endl; 24 sout | "fmod:" | 5.0F % -2.0F | fmod( 5.0F, -2.0F ) | 5.0D % -2.0D | nonl; 25 sout | fmod( 5.0D, -2.0D ) | 5.0L % -2.0L | fmod( 5.0L, -2.0L ); 26 sout | "remainder:" | remainder( 2.0F, 3.0F ) | remainder( 2.0D, 3.0D ) | remainder( 2.0L, 3.0L ); 26 27 int quot; 27 28 f = remquo( 3.6F, 0.5F, " ); 28 sout | "remquo:" | quot | f ;29 sout | "remquo:" | quot | f | nonl; 29 30 d = remquo( 3.6D, 0.5F, " ); 30 sout | quot | d ;31 sout | quot | d | nonl; 31 32 l = remquo( 3.6L, 0.5L, " ); 32 sout | quot | l | endl;33 sout | "div:" | div( 3.6F, 0.5F ) | div( 3.6D, 0.5D ) | div( 3.6L, 0.5L ) | endl;34 sout | "fma:" | fma( 3.0F, -1.0F, 1.0F ) | fma( 3.0D, -1.0D, 1.0D ) | fma( 3.0L, -1.0L, , 1.0L ) | endl;35 sout | "fdim:" | fdim( 1.0F, -1.0F ) | fdim( 1.0D, -1.0D ) | fdim( 1.0L, -1.0L ) | endl;36 sout | "nan:" | (float)nan( "" ) | (double)nan( "" ) | (long double)nan( "" ) | endl;33 sout | quot | l; 34 sout | "div:" | div( 3.6F, 0.5F ) | div( 3.6D, 0.5D ) | div( 3.6L, 0.5L ); 35 sout | "fma:" | fma( 3.0F, -1.0F, 1.0F ) | fma( 3.0D, -1.0D, 1.0D ) | fma( 3.0L, -1.0L, , 1.0L ); 36 sout | "fdim:" | fdim( 1.0F, -1.0F ) | fdim( 1.0D, -1.0D ) | fdim( 1.0L, -1.0L ); 37 sout | "nan:" | (float)nan( "" ) | (double)nan( "" ) | (long double)nan( "" ); 37 38 38 39 //---------------------- Exponential ---------------------- 39 40 40 sout | "exp:" | exp( 1.0F ) | exp( 1.0D ) | exp( 1.0L ) | exp( 1.0F+1.0FI ) | exp( 1.0D+1.0DI ) | exp( 1.0DL+1.0LI ) | endl; 41 sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl; 42 sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl; 43 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.5DL+1.5LI, 1.5DL+1.5LI ) | endl; 41 sout | "exp:" | exp( 1.0F ) | exp( 1.0D ) | exp( 1.0L ) | nonl; 42 sout | exp( 1.0F+1.0FI ) | exp( 1.0D+1.0DI ) | exp( 1.0DL+1.0LI ); 43 sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ); 44 sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ); 45 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | nonl; 46 sout | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.5DL+1.5LI, 1.5DL+1.5LI ); 44 47 45 48 int b = 4; 46 49 unsigned int e = 2; 47 50 b \= e; 48 sout | "\\" | b | b \ e | endl; 49 sout | "\\" | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi) | endl; 51 sout | "\\" | b | b \ e; 52 sout | "\\" | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | nonl; 53 sout | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi); 50 54 } // main 51 55 -
tests/math2.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:58:55 201813 // Update Count : 8 312 // Last Modified On : Wed Dec 12 16:11:35 2018 13 // Update Count : 87 14 14 // 15 15 … … 24 24 //---------------------- Logarithm ---------------------- 25 25 26 sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl; 27 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl; 28 sout | "log10:" | log10( 100.0F ) | log10( 100.0D ) | log10( 100.0L ) | endl; 29 sout | "log1p:" | log1p( 1.0F ) | log1p( 1.0D ) | log1p( 1.0L ) | endl; 30 sout | "ilogb:" | ilogb( 1.0F ) | ilogb( 1.0D ) | ilogb( 1.0L ) | endl; 31 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl; 26 sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | nonl; 27 sout | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ); 28 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ); 29 sout | "log10:" | log10( 100.0F ) | log10( 100.0D ) | log10( 100.0L ); 30 sout | "log1p:" | log1p( 1.0F ) | log1p( 1.0D ) | log1p( 1.0L ); 31 sout | "ilogb:" | ilogb( 1.0F ) | ilogb( 1.0D ) | ilogb( 1.0L ); 32 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ); 32 33 33 sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl; 34 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl; 35 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl; 34 sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | nonl; 35 sout | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ); 36 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ); 37 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ); 36 38 37 39 //---------------------- Trigonometric ---------------------- 38 40 39 sout | "sin:" | sin( 1.0F ) | sin( 1.0D ) | sin( 1.0L ) | sin( 1.0F+1.0FI ) | sin( 1.0D+1.0DI ) | sin( 1.0DL+1.0LI ) | endl; 40 sout | "cos:" | cos( 1.0F ) | cos( 1.0D ) | cos( 1.0L ) | cos( 1.0F+1.0FI ) | cos( 1.0D+1.0DI ) | cos( 1.0DL+1.0LI ) | endl; 41 sout | "tan:" | tan( 1.0F ) | tan( 1.0D ) | tan( 1.0L ) | tan( 1.0F+1.0FI ) | tan( 1.0D+1.0DI ) | tan( 1.0DL+1.0LI ) | endl; 42 sout | "asin:" | asin( 1.0F ) | asin( 1.0D ) | asin( 1.0L ) | asin( 1.0F+1.0FI ) | asin( 1.0D+1.0DI ) | asin( 1.0DL+1.0LI ) | endl; 43 sout | "acos:" | acos( 1.0F ) | acos( 1.0D ) | acos( 1.0L ) | acos( 1.0F+1.0FI ) | acos( 1.0D+1.0DI ) | acos( 1.0DL+1.0LI ) | endl; 44 sout | "atan:" | atan( 1.0F ) | atan( 1.0D ) | atan( 1.0L ) | atan( 1.0F+1.0FI ) | atan( 1.0D+1.0DI ) | atan( 1.0DL+1.0LI ) | endl; 45 sout | "atan2:" | atan2( 1.0F, 1.0F ) | atan2( 1.0D, 1.0D ) | atan2( 1.0L, 1.0L ); 46 sout | "atan:" | atan( 1.0F, 1.0F ) | atan( 1.0D, 1.0D ) | atan( 1.0L, 1.0L ) | endl; 41 sout | "sin:" | sin( 1.0F ) | sin( 1.0D ) | sin( 1.0L ) | nonl; 42 sout | sin( 1.0F+1.0FI ) | sin( 1.0D+1.0DI ) | sin( 1.0DL+1.0LI ); 43 sout | "cos:" | cos( 1.0F ) | cos( 1.0D ) | cos( 1.0L ) | nonl; 44 sout | cos( 1.0F+1.0FI ) | cos( 1.0D+1.0DI ) | cos( 1.0DL+1.0LI ); 45 sout | "tan:" | tan( 1.0F ) | tan( 1.0D ) | tan( 1.0L ) | nonl; 46 sout | tan( 1.0F+1.0FI ) | tan( 1.0D+1.0DI ) | tan( 1.0DL+1.0LI ); 47 sout | "asin:" | asin( 1.0F ) | asin( 1.0D ) | asin( 1.0L ) | nonl; 48 sout | asin( 1.0F+1.0FI ) | asin( 1.0D+1.0DI ) | asin( 1.0DL+1.0LI ); 49 sout | "acos:" | acos( 1.0F ) | acos( 1.0D ) | acos( 1.0L ) | nonl; 50 sout | acos( 1.0F+1.0FI ) | acos( 1.0D+1.0DI ) | acos( 1.0DL+1.0LI ); 51 sout | "atan:" | atan( 1.0F ) | atan( 1.0D ) | atan( 1.0L ) | nonl; 52 sout | atan( 1.0F+1.0FI ) | atan( 1.0D+1.0DI ) | atan( 1.0DL+1.0LI ); 53 sout | "atan2:" | atan2( 1.0F, 1.0F ) | atan2( 1.0D, 1.0D ) | atan2( 1.0L, 1.0L ) | nonl; 54 sout | "atan:" | atan( 1.0F, 1.0F ) | atan( 1.0D, 1.0D ) | atan( 1.0L, 1.0L ); 47 55 } // main 48 56 -
tests/math3.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:59:05201813 // Update Count : 8 312 // Last Modified On : Wed Dec 12 16:30:41 2018 13 // Update Count : 86 14 14 // 15 15 … … 24 24 //---------------------- Hyperbolic ---------------------- 25 25 26 sout | "sinh:" | sinh( 1.0F ) | sinh( 1.0D ) | sinh( 1.0L ) | sinh( 1.0F+1.0FI ) | sinh( 1.0D+1.0DI ) | sinh( 1.0DL+1.0LI ) | endl; 27 sout | "cosh:" | cosh( 1.0F ) | cosh( 1.0D ) | cosh( 1.0L ) | cosh( 1.0F+1.0FI ) | cosh( 1.0D+1.0DI ) | cosh( 1.0DL+1.0LI ) | endl; 28 sout | "tanh:" | tanh( 1.0F ) | tanh( 1.0D ) | tanh( 1.0L ) | tanh( 1.0F+1.0FI ) | tanh( 1.0D+1.0DI ) | tanh( 1.0DL+1.0LI ) | endl; 29 sout | "acosh:" | acosh( 1.0F ) | acosh( 1.0D ) | acosh( 1.0L ) | acosh( 1.0F+1.0FI ) | acosh( 1.0D+1.0DI ) | acosh( 1.0DL+1.0LI ) | endl; 30 sout | "asinh:" | asinh( 1.0F ) | asinh( 1.0D ) | asinh( 1.0L ) | asinh( 1.0F+1.0FI ) | asinh( 1.0D+1.0DI ) | asinh( 1.0DL+1.0LI ) | endl; 31 sout | "atanh:" | atanh( 1.0F ) | atanh( 1.0D ) | atanh( 1.0L ) | atanh( 1.0F+1.0FI ) | atanh( 1.0D+1.0DI ) | atanh( 1.0DL+1.0LI ) | endl; 26 sout | "sinh:" | sinh( 1.0F ) | sinh( 1.0D ) | sinh( 1.0L ) | nonl; 27 sout | sinh( 1.0F+1.0FI ) | sinh( 1.0D+1.0DI ) | sinh( 1.0DL+1.0LI ); 28 sout | "cosh:" | cosh( 1.0F ) | cosh( 1.0D ) | cosh( 1.0L ) | nonl; 29 sout | cosh( 1.0F+1.0FI ) | cosh( 1.0D+1.0DI ) | cosh( 1.0DL+1.0LI ); 30 sout | "tanh:" | tanh( 1.0F ) | tanh( 1.0D ) | tanh( 1.0L ) | nonl; 31 sout | tanh( 1.0F+1.0FI ) | tanh( 1.0D+1.0DI ) | tanh( 1.0DL+1.0LI ); 32 sout | "acosh:" | acosh( 1.0F ) | acosh( 1.0D ) | acosh( 1.0L ) | nonl; 33 sout | acosh( 1.0F+1.0FI ) | acosh( 1.0D+1.0DI ) | acosh( 1.0DL+1.0LI ); 34 sout | "asinh:" | asinh( 1.0F ) | asinh( 1.0D ) | asinh( 1.0L ) | nonl; 35 sout | asinh( 1.0F+1.0FI ) | asinh( 1.0D+1.0DI ) | asinh( 1.0DL+1.0LI ); 36 sout | "atanh:" | atanh( 1.0F ) | atanh( 1.0D ) | atanh( 1.0L ) | nonl; 37 sout | atanh( 1.0F+1.0FI ) | atanh( 1.0D+1.0DI ) | atanh( 1.0DL+1.0LI ); 32 38 33 39 //---------------------- Error / Gamma ---------------------- 34 40 35 sout | "erf:" | erf( 1.0F ) | erf( 1.0D ) | erf( 1.0L ) | endl;36 sout | "erfc:" | erfc( 1.0F ) | erfc( 1.0D ) | erfc( 1.0L ) | endl;37 sout | "lgamma:" | lgamma( 4.0F ) | lgamma( 4.0D ) | lgamma( 4.0L ) | endl;41 sout | "erf:" | erf( 1.0F ) | erf( 1.0D ) | erf( 1.0L ); 42 sout | "erfc:" | erfc( 1.0F ) | erfc( 1.0D ) | erfc( 1.0L ); 43 sout | "lgamma:" | lgamma( 4.0F ) | lgamma( 4.0D ) | lgamma( 4.0L ); 38 44 int sign; 39 45 f = lgamma( 4.0F, &sign ); 40 sout | "lgamma:" | f | sign ;46 sout | "lgamma:" | f | sign | nonl; 41 47 d = lgamma( 4.0D, &sign ); 42 sout | d | sign ;48 sout | d | sign | nonl; 43 49 l = lgamma( 4.0L, &sign ); 44 sout | l | sign | endl;45 sout | "tgamma:" | tgamma( 4.0F ) | tgamma( 4.0D ) | tgamma( 4.0L ) | endl;50 sout | l | sign; 51 sout | "tgamma:" | tgamma( 4.0F ) | tgamma( 4.0D ) | tgamma( 4.0L ); 46 52 } // main 47 53 -
tests/math4.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu May 24 20:56:54 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:59:14201813 // Update Count : 312 // Last Modified On : Tue Dec 4 18:15:01 2018 13 // Update Count : 4 14 14 // 15 15 … … 24 24 //---------------------- Nearest Integer ---------------------- 25 25 26 sout | "floor:" | floor( 1.2F ) | floor( 1.2D ) | floor( 1.2L ) | endl;27 sout | "ceil:" | ceil( 1.6F ) | ceil( 1.6D ) | ceil( 1.6L ) | endl;28 sout | "trunc:" | trunc( 3.5F ) | trunc( 3.5D ) | trunc( 3.5L ) | endl;29 sout | "rint:" | (float)rint( 1.5F ) | (double)rint( 1.5D ) | (long double)rint( 1.5L ) | endl;30 sout | "rint:" | (long int)rint( 1.5F ) | (long int)rint( 1.5D ) | (long int)rint( 1.5L ) | endl;31 sout | "rint:" | (long long int)rint( 1.5F ) | (long long int)rint( 1.5D ) | (long long int)rint( 1.5L ) | endl;32 sout | "lrint:" | lrint( 1.5F ) | lrint( 1.5D ) | lrint( 1.5L ) | endl;33 sout | "llrint:" | llrint( 1.5F ) | llrint( 1.5D ) | llrint( 1.5L ) | endl;34 sout | "nearbyint:" | nearbyint( 3.5F ) | nearbyint( 3.5D ) | nearbyint( 3.5L ) | endl;35 sout | "round:" | (float)round( 1.5F ) | (double)round( 1.5D ) | (long double)round( 1.5L ) | endl;36 sout | "round:" | (long int)round( 1.5F ) | (long int)round( 1.5D ) | (long int)round( 1.5L ) | endl;37 sout | "round:" | (long long int)round( 1.5F ) | (long long int)round( 1.5D ) | (long long int)round( 1.5L ) | endl;38 sout | "lround:" | lround( 1.5F ) | lround( 1.5D ) | lround( 1.5L ) | endl;39 sout | "llround:" | llround( 1.5F ) | llround( 1.5D ) | llround( 1.5L ) | endl;26 sout | "floor:" | floor( 1.2F ) | floor( 1.2D ) | floor( 1.2L ); 27 sout | "ceil:" | ceil( 1.6F ) | ceil( 1.6D ) | ceil( 1.6L ); 28 sout | "trunc:" | trunc( 3.5F ) | trunc( 3.5D ) | trunc( 3.5L ); 29 sout | "rint:" | (float)rint( 1.5F ) | (double)rint( 1.5D ) | (long double)rint( 1.5L ); 30 sout | "rint:" | (long int)rint( 1.5F ) | (long int)rint( 1.5D ) | (long int)rint( 1.5L ); 31 sout | "rint:" | (long long int)rint( 1.5F ) | (long long int)rint( 1.5D ) | (long long int)rint( 1.5L ); 32 sout | "lrint:" | lrint( 1.5F ) | lrint( 1.5D ) | lrint( 1.5L ); 33 sout | "llrint:" | llrint( 1.5F ) | llrint( 1.5D ) | llrint( 1.5L ); 34 sout | "nearbyint:" | nearbyint( 3.5F ) | nearbyint( 3.5D ) | nearbyint( 3.5L ); 35 sout | "round:" | (float)round( 1.5F ) | (double)round( 1.5D ) | (long double)round( 1.5L ); 36 sout | "round:" | (long int)round( 1.5F ) | (long int)round( 1.5D ) | (long int)round( 1.5L ); 37 sout | "round:" | (long long int)round( 1.5F ) | (long long int)round( 1.5D ) | (long long int)round( 1.5L ); 38 sout | "lround:" | lround( 1.5F ) | lround( 1.5D ) | lround( 1.5L ); 39 sout | "llround:" | llround( 1.5F ) | llround( 1.5D ) | llround( 1.5L ); 40 40 41 41 //---------------------- Manipulation ---------------------- 42 42 43 sout | "copysign:" | copysign( 1.0F, -1.0F ) | copysign( 1.0D, -1.0D ) | copysign( 1.0L, -1.0L ) | endl;43 sout | "copysign:" | copysign( 1.0F, -1.0F ) | copysign( 1.0D, -1.0D ) | copysign( 1.0L, -1.0L ); 44 44 int exp; 45 45 f = frexp( 4.0F, &exp ); 46 sout | "frexp:" | f | exp ;46 sout | "frexp:" | f | exp | nonl; 47 47 d = frexp( 4.0D, &exp ); 48 sout | d | exp ;48 sout | d | exp | nonl; 49 49 l = frexp( 4.0L, &exp ); 50 sout | l | exp | endl;51 sout | "ldexp:" | ldexp( 2.0F, 2 ) | ldexp( 2.0D, 2 ) | ldexp( 2.0L, 2 ) | endl;50 sout | l | exp; 51 sout | "ldexp:" | ldexp( 2.0F, 2 ) | ldexp( 2.0D, 2 ) | ldexp( 2.0L, 2 ); 52 52 float fi; 53 53 double di; 54 54 long double ldi; 55 55 f = modf( 2.3F, &fi ); 56 sout | "modf:" | fi | f ;56 sout | "modf:" | fi | f | nonl; 57 57 d = modf( 2.3D, &di ); 58 sout | di | d ;58 sout | di | d | nonl; 59 59 l = modf( 2.3L, &ldi ); 60 sout | ldi | l | endl;61 sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ) | endl;62 sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ) | endl;63 sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ) | endl;60 sout | ldi | l; 61 sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ); 62 sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ); 63 sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ); 64 64 65 sout | "scalbn:" | scalbn( 2.0F, 3 ) | scalbn( 2.0D, 3 ) | scalbn( 2.0L, 3 ) | endl;66 sout | "scalbln:" | scalbln( 2.0F, 3L ) | scalbln( 2.0D, 3L ) | scalbln( 2.0L, 3L ) | endl;65 sout | "scalbn:" | scalbn( 2.0F, 3 ) | scalbn( 2.0D, 3 ) | scalbn( 2.0L, 3 ); 66 sout | "scalbln:" | scalbln( 2.0F, 3L ) | scalbln( 2.0D, 3L ) | scalbln( 2.0L, 3L ); 67 67 } // main 68 68 -
tests/minmax.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:59:26201813 // Update Count : 5 112 // Last Modified On : Tue Dec 4 21:45:31 2018 13 // Update Count : 52 14 14 // 15 15 … … 22 22 int ?>?( char op1, char op2 ) { return (int)op1 > (int)op2; } 23 23 24 sout | "char\t\t\t" | 'z' | ' ' | 'a' | "\tmin " | min( 'z', 'a' ) | endl;25 sout | "signed int\t\t" | 4 | 3 | "\tmin" | min( 4, 3 ) | endl;26 sout | "unsigned int\t\t" | 4u | 3u | "\tmin" | min( 4u, 3u ) | endl;27 sout | "signed long int\t\t" | 4l | 3l | "\tmin" | min( 4l, 3l ) | endl;28 sout | "unsigned long int\t" | 4ul | 3ul | "\tmin" | min( 4ul, 3ul ) | endl;29 sout | "signed long long int\t" | 4ll | 3ll | "\tmin" | min( 4ll, 3ll ) | endl;30 sout | "unsigned long long int\t" | 4ull | 3ull | "\tmin" | min( 4ull, 3ull ) | endl;31 sout | "float\t\t\t" | 4.0f | 3.1f | "\tmin" | min( 4.0f, 3.1f ) | endl;32 sout | "double\t\t\t" | 4.0 | 3.1 | "\tmin" | min( 4.0, 3.1 ) | endl;33 sout | "long double\t\t" | 4.0l | 3.1l | "\tmin" | min( 4.0l, 3.1l ) | endl;24 sout | "char\t\t\t" | 'z' | ' ' | 'a' | "\tmin " | min( 'z', 'a' ); 25 sout | "signed int\t\t" | 4 | 3 | "\tmin" | min( 4, 3 ); 26 sout | "unsigned int\t\t" | 4u | 3u | "\tmin" | min( 4u, 3u ); 27 sout | "signed long int\t\t" | 4l | 3l | "\tmin" | min( 4l, 3l ); 28 sout | "unsigned long int\t" | 4ul | 3ul | "\tmin" | min( 4ul, 3ul ); 29 sout | "signed long long int\t" | 4ll | 3ll | "\tmin" | min( 4ll, 3ll ); 30 sout | "unsigned long long int\t" | 4ull | 3ull | "\tmin" | min( 4ull, 3ull ); 31 sout | "float\t\t\t" | 4.0f | 3.1f | "\tmin" | min( 4.0f, 3.1f ); 32 sout | "double\t\t\t" | 4.0 | 3.1 | "\tmin" | min( 4.0, 3.1 ); 33 sout | "long double\t\t" | 4.0l | 3.1l | "\tmin" | min( 4.0l, 3.1l ); 34 34 35 sout | endl;35 sout | nl; 36 36 37 sout | "char\t\t\t" | 'z' | ' ' | 'a' | "\tmax " | max( 'z', 'a' ) | endl;38 sout | "signed int\t\t" | 4 | 3 | "\tmax" | max( 4, 3 ) | endl;39 sout | "unsigned int\t\t" | 4u | 3u | "\tmax" | max( 4u, 3u ) | endl;40 sout | "signed long int\t\t" | 4l | 3l | "\tmax" | max( 4l, 3l ) | endl;41 sout | "unsigned long int\t" | 4ul | 3ul | "\tmax" | max( 4ul, 3ul ) | endl;42 sout | "signed long long int\t" | 4ll | 3ll | "\tmax" | max( 4ll, 3ll ) | endl;43 sout | "unsigned long long int\t" | 4ull | 3ull | "\tmax" | max( 4ull, 3ull ) | endl;44 sout | "float\t\t\t" | 4.0f | 3.1f | "\tmax" | max( 4.0f, 3.1f ) | endl;45 sout | "double\t\t\t" | 4.0 | 3.1 | "\tmax" | max( 4.0, 3.1 ) | endl;46 sout | "long double\t\t" | 4.0l | 3.1l | "\tmax" | max( 4.0l, 3.1l ) | endl;37 sout | "char\t\t\t" | 'z' | ' ' | 'a' | "\tmax " | max( 'z', 'a' ); 38 sout | "signed int\t\t" | 4 | 3 | "\tmax" | max( 4, 3 ); 39 sout | "unsigned int\t\t" | 4u | 3u | "\tmax" | max( 4u, 3u ); 40 sout | "signed long int\t\t" | 4l | 3l | "\tmax" | max( 4l, 3l ); 41 sout | "unsigned long int\t" | 4ul | 3ul | "\tmax" | max( 4ul, 3ul ); 42 sout | "signed long long int\t" | 4ll | 3ll | "\tmax" | max( 4ll, 3ll ); 43 sout | "unsigned long long int\t" | 4ull | 3ull | "\tmax" | max( 4ull, 3ull ); 44 sout | "float\t\t\t" | 4.0f | 3.1f | "\tmax" | max( 4.0f, 3.1f ); 45 sout | "double\t\t\t" | 4.0 | 3.1 | "\tmax" | max( 4.0, 3.1 ); 46 sout | "long double\t\t" | 4.0l | 3.1l | "\tmax" | max( 4.0l, 3.1l ); 47 47 } // main 48 48 -
tests/polymorphism.cfa
r5e49e47 rd0c91a6 9 9 // Author : Rob Schluntz 10 10 // Created On : Tue Oct 17 12:19:48 2017 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Tue Oct 17 12:21:07 201713 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 25 14:40:24 2018 13 // Update Count : 3 14 14 // 15 15 16 16 #include <assert.h> 17 17 #include <inttypes.h> 18 #include <fstream.hfa> 18 19 19 20 forall(otype T) … … 61 62 int y = 456; 62 63 int z = f(x, y); 63 printf("%d %d %d\n", x, y, z);64 sout | x | y | z; 64 65 } 65 66 66 { 67 67 // explicitly specialize function 68 68 int (*f)(int) = ident; 69 69 ((int(*)(int))ident); 70 printf("%d %d\n", f(5), ((int(*)(int))ident)(5));70 sout | f(5) | ((int(*)(int))ident)(5); 71 71 } 72 73 72 { 74 73 // test aggregates with polymorphic members … … 100 99 101 100 void print(x_type x) { 102 printf("%"PRIu32"\n", x);101 sout | x; 103 102 } 104 103 105 104 void print(y_type y) { 106 printf("%"PRIu64"\n", y);105 sout | y; 107 106 } 108 107 -
tests/preempt_longrun/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 20 repeats=10 -
tests/preempt_longrun/Makefile.in
r5e49e47 rd0c91a6 93 93 subdir = tests/preempt_longrun 94 94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 95 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 96 $(top_srcdir)/configure.ac 95 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 96 $(top_srcdir)/automake/ltoptions.m4 \ 97 $(top_srcdir)/automake/ltsugar.m4 \ 98 $(top_srcdir)/automake/ltversion.m4 \ 99 $(top_srcdir)/automake/lt~obsolete.m4 \ 100 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 97 101 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 98 102 $(ACLOCAL_M4) … … 333 337 AMTAR = @AMTAR@ 334 338 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 339 AR = @AR@ 335 340 AUTOCONF = @AUTOCONF@ 336 341 AUTOHEADER = @AUTOHEADER@ 337 342 AUTOMAKE = @AUTOMAKE@ 338 343 AWK = @AWK@ 339 BACKEND_CC = @BACKEND_CC@340 344 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 341 345 CC = @CFACC@ … … 357 361 CPPFLAGS = @CPPFLAGS@ 358 362 CXX = @CXX@ 363 CXXCPP = @CXXCPP@ 359 364 CXXDEPMODE = @CXXDEPMODE@ 360 365 CXXFLAGS = @CXXFLAGS@ … … 362 367 DEFS = @DEFS@ 363 368 DEPDIR = @DEPDIR@ 369 DLLTOOL = @DLLTOOL@ 364 370 DRIVER_DIR = @DRIVER_DIR@ 371 DSYMUTIL = @DSYMUTIL@ 372 DUMPBIN = @DUMPBIN@ 365 373 ECHO_C = @ECHO_C@ 366 374 ECHO_N = @ECHO_N@ … … 368 376 EGREP = @EGREP@ 369 377 EXEEXT = @EXEEXT@ 378 FGREP = @FGREP@ 370 379 GREP = @GREP@ 371 380 HOST_FLAGS = @HOST_FLAGS@ … … 375 384 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 376 385 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 386 LD = @LD@ 377 387 LDFLAGS = @LDFLAGS@ 378 388 LEX = @LEX@ … … 383 393 LIBOBJS = @LIBOBJS@ 384 394 LIBS = @LIBS@ 395 LIBTOOL = @LIBTOOL@ 396 LIPO = @LIPO@ 397 LN_S = @LN_S@ 385 398 LTLIBOBJS = @LTLIBOBJS@ 399 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 386 400 MAKEINFO = @MAKEINFO@ 401 MANIFEST_TOOL = @MANIFEST_TOOL@ 387 402 MKDIR_P = @MKDIR_P@ 403 NM = @NM@ 404 NMEDIT = @NMEDIT@ 405 OBJDUMP = @OBJDUMP@ 388 406 OBJEXT = @OBJEXT@ 407 OTOOL = @OTOOL@ 408 OTOOL64 = @OTOOL64@ 389 409 PACKAGE = @PACKAGE@ 390 410 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 396 416 PATH_SEPARATOR = @PATH_SEPARATOR@ 397 417 RANLIB = @RANLIB@ 418 SED = @SED@ 398 419 SET_MAKE = @SET_MAKE@ 399 420 SHELL = @SHELL@ … … 407 428 abs_top_builddir = @abs_top_builddir@ 408 429 abs_top_srcdir = @abs_top_srcdir@ 430 ac_ct_AR = @ac_ct_AR@ 409 431 ac_ct_CC = @ac_ct_CC@ 410 432 ac_ct_CXX = @ac_ct_CXX@ 433 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 411 434 am__include = @am__include@ 412 435 am__leading_dot = @am__leading_dot@ … … 456 479 top_srcdir = @top_srcdir@ 457 480 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 481 ACLOCAL_AMFLAGS = -I automake 458 482 repeats = 10 459 483 max_time = 600 … … 503 527 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 504 528 $(am__aclocal_m4_deps): 529 530 mostlyclean-libtool: 531 -rm -f *.lo 532 533 clean-libtool: 534 -rm -rf .libs _libs 505 535 tags TAGS: 506 536 … … 806 836 clean: clean-am 807 837 808 clean-am: clean-generic clean-l ocal mostlyclean-am838 clean-am: clean-generic clean-libtool clean-local mostlyclean-am 809 839 810 840 distclean: distclean-am … … 858 888 mostlyclean: mostlyclean-am 859 889 860 mostlyclean-am: mostlyclean-generic 890 mostlyclean-am: mostlyclean-generic mostlyclean-libtool 861 891 862 892 pdf: pdf-am … … 873 903 874 904 .PHONY: all all-am all-local check check-TESTS check-am clean \ 875 clean-generic clean-local cscopelist-am ctags-am distclean \ 876 distclean-generic distdir dvi dvi-am html html-am info info-am \ 877 install install-am install-data install-data-am install-dvi \ 878 install-dvi-am install-exec install-exec-am install-html \ 879 install-html-am install-info install-info-am install-man \ 880 install-pdf install-pdf-am install-ps install-ps-am \ 881 install-strip installcheck installcheck-am installdirs \ 882 maintainer-clean maintainer-clean-generic mostlyclean \ 883 mostlyclean-generic pdf pdf-am ps ps-am recheck tags-am \ 905 clean-generic clean-libtool clean-local cscopelist-am ctags-am \ 906 distclean distclean-generic distclean-libtool distdir dvi \ 907 dvi-am html html-am info info-am install install-am \ 908 install-data install-data-am install-dvi install-dvi-am \ 909 install-exec install-exec-am install-html install-html-am \ 910 install-info install-info-am install-man install-pdf \ 911 install-pdf-am install-ps install-ps-am install-strip \ 912 installcheck installcheck-am installdirs maintainer-clean \ 913 maintainer-clean-generic mostlyclean mostlyclean-generic \ 914 mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ 884 915 uninstall uninstall-am 885 916 -
tests/pybin/tools.py
r5e49e47 rd0c91a6 79 79 def diff( lhs, rhs ): 80 80 # diff the output of the files 81 diff_cmd = ("diff --ignore-all-space --text " 82 "--ignore-blank-lines " 81 diff_cmd = ("diff --text " 82 # "--ignore-all-space " 83 # "--ignore-blank-lines " 83 84 "--old-group-format='\t\tmissing lines :\n" 84 85 "%%<' \\\n" … … 246 247 if column: 247 248 cmd = "%s 2> /dev/null" % column 248 print(cmd)249 249 proc = Popen(cmd, stdin=PIPE, stderr=None, shell=True) 250 proc.communicate(input=text )250 proc.communicate(input=text + "\n") 251 251 else: 252 252 print(text) -
tests/quotedKeyword.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:46:20201813 // Update Count : 2 212 // Last Modified On : Tue Dec 4 21:45:53 2018 13 // Update Count : 23 14 14 // 15 15 … … 41 41 st.`struct` = 3; 42 42 `throw` = 4; 43 sout | `catch` + st.`otype` + st.`struct` + `throw` | endl;43 sout | `catch` + st.`otype` + st.`struct` + `throw`; 44 44 } 45 45 -
tests/raii/.expect/ctor-autogen-ERR1.txt
r5e49e47 rd0c91a6 1 raii/ctor-autogen.c :102:1 error: Unique best alternative includes deleted identifier in Cast of:1 raii/ctor-autogen.cfa:102:1 error: Unique best alternative includes deleted identifier in Cast of: 2 2 Application of 3 3 Deleted Expression 4 4 Variable Expression: ?{}: static inline function 5 5 ... with parameters 6 _dst: reference to instance of struct Managed with body 1 6 _dst: reference to instance of struct Managed with body 1 7 7 x: signed int 8 ... returning nothing 8 ... returning nothing 9 9 10 10 ... deleted by: ?{}: function 11 11 ... with parameters 12 m: reference to instance of struct Managed with body 1 13 ... returning nothing 14 ... with body 12 m: reference to instance of struct Managed with body 1 13 ... returning nothing 14 ... with body 15 15 CompoundStmt 16 16 Expression Statement: … … 20 20 intrinsic reference to signed int 21 21 intrinsic signed int 22 ... returning 22 ... returning 23 23 _retval__operator_assign: signed int 24 ... with attributes: 24 ... with attributes: 25 25 Attribute with name: unused 26 26 … … 28 28 ... to arguments 29 29 Cast of: 30 Member Expression, with field: 30 Member Expression, with field: 31 31 x: signed int 32 ... from aggregate: 32 ... from aggregate: 33 33 Cast of: 34 Variable Expression: m: reference to instance of struct Managed with body 1 34 Variable Expression: m: reference to instance of struct Managed with body 1 35 35 ... to: 36 instance of struct Managed with body 1 36 instance of struct Managed with body 1 37 37 ... to: 38 38 reference to signed int … … 49 49 ... to arguments 50 50 Cast of: 51 Variable Expression: x: instance of struct Managed with body 1 51 Variable Expression: x: instance of struct Managed with body 1 52 52 ... to: 53 reference to instance of struct Managed with body 1 53 reference to instance of struct Managed with body 1 54 54 constant expression (123 123: signed int) 55 55 -
tests/raii/.expect/dtor-early-exit-ERR1.txt
r5e49e47 rd0c91a6 1 raii/dtor-early-exit.c :150:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)1 raii/dtor-early-exit.cfa:150:1 error: jump to label 'L1' crosses initialization of y Branch (Goto) 2 2 with target: L1 3 3 with original target: L1 -
tests/raii/.expect/dtor-early-exit-ERR2.txt
r5e49e47 rd0c91a6 1 raii/dtor-early-exit.c :214:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)1 raii/dtor-early-exit.cfa:214:1 error: jump to label 'L2' crosses initialization of y Branch (Goto) 2 2 with target: L2 3 3 with original target: L2 -
tests/raii/.expect/memberCtors-ERR1.txt
r5e49e47 rd0c91a6 1 raii/memberCtors.c :71:1 error: in void ?{}(B &b), field a2 used before being constructed1 raii/memberCtors.cfa:71:1 error: in void ?{}(B &b), field a2 used before being constructed -
tests/raii/dtor-early-exit.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Aug 17 08:26:25 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 11 07:58:39 201813 // Update Count : 812 // Last Modified On : Fri Dec 21 08:45:19 2018 13 // Update Count : 10 14 14 // 15 15 … … 25 25 // don't want these called 26 26 void ?{}(A & a) { assert( false ); } 27 void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); }27 void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name; a.x = (int*)malloc(); } 28 28 void ?{}(A & a, const char * name, int * ptr) { assert( false ); } 29 29 30 30 A ?=?(A & a, A b) { sout | "assign " | a.name | " " | b.name; return a; } 31 void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); }32 void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); }31 void ?{}(A & a, A b) { sout | "copy construct " | b.name; a.x = (int*)malloc(); } 32 void ^?{}(A & a) { sout | "destruct " | a.name; free(a.x); } 33 33 34 34 // test returns 35 35 void f(int i) { 36 sout | "f i=" | i | endl;36 sout | "f i=" | i; 37 37 A x = { "x" }; // construct x 38 38 { … … 55 55 void g() { 56 56 for (int i = 0; i < 10; i++) { 57 sout | "g for i=" | i | endl;57 sout | "g for i=" | i; 58 58 A x = { "x" }; 59 59 // construct x 60 60 // destruct x 61 61 } 62 sout | endl;62 sout | nl; 63 63 { 64 64 int i = 0; 65 65 while (i < 10) { 66 sout | "g while i=" | i | endl;66 sout | "g while i=" | i; 67 67 A x = { "x" }; 68 68 // construct x … … 71 71 } 72 72 } 73 sout | endl;73 sout | nl; 74 74 for (int i = 0; i < 10; i++) { 75 75 switch(10) { … … 78 78 case 10: { 79 79 A y = { "y" }; 80 sout | "g switch i=" | i | endl;80 sout | "g switch i=" | i; 81 81 // construct y 82 82 break; // destruct y 83 83 } 84 84 default: { 85 sout | "g switch i=" | i | endl;85 sout | "g switch i=" | i; 86 86 A x = { "x" }; 87 87 // construct x … … 90 90 } 91 91 } 92 sout | endl;92 sout | nl; 93 93 for (int k = 0; k < 2; k++) { 94 sout | "g for k=" | k | endl;94 sout | "g for k=" | k; 95 95 L1: for (int i = 0; i < 10; i++) { 96 sout | "g for i=" | i | endl;96 sout | "g for i=" | i; 97 97 98 98 A x = { "x" }; 99 99 if (i == 2) { 100 sout | "continue L1" | endl;100 sout | "continue L1"; 101 101 continue; // destruct x 102 102 } else if (i == 3) { 103 sout | "break L1" | endl;103 sout | "break L1"; 104 104 break; // destruct x 105 105 } 106 106 107 107 L2: for (int j = 0; j < 10; j++) { 108 sout | "g for j=" | j | endl;108 sout | "g for j=" | j; 109 109 A y = { "y" }; 110 110 if (j == 0) { 111 sout | "continue L2" | endl;111 sout | "continue L2"; 112 112 continue; // destruct y - missing because object that needs to be destructed is not a part of this block, it's a part of the for's block 113 113 } else if (j == 1) { 114 sout | "break L2" | endl;114 sout | "break L2"; 115 115 break; // destruct y 116 116 } else if (i == 1) { 117 sout | "continue L1" | endl;117 sout | "continue L1"; 118 118 continue L1; // destruct x,y - note: continue takes you to destructors for block, so only generate destructor for y 119 119 } else if (k == 1) { 120 sout | "break L1" | endl;120 sout | "break L1"; 121 121 break L1; // destruct x,y 122 122 } … … 125 125 } 126 126 127 sout | endl;127 sout | nl; 128 128 L3: if( 3 ) { 129 129 A w = { "w" }; 130 130 if( 4 ) { 131 131 A v = { "v" }; 132 sout | "break L3" | endl;132 sout | "break L3"; 133 133 break L3; 134 134 } … … 144 144 // * if S_L-S_G is non-empty, error 145 145 // * emit destructors for all variables in S_G-S_L 146 sout | "h" | endl;146 sout | "h"; 147 147 { 148 148 L0: ; … … 152 152 A y = { "y" }; 153 153 // S_L1 = { y } 154 L1: sout | "L1" | endl;154 L1: sout | "L1"; 155 155 A x = { "x" }; 156 156 // S_L2 = { y, x } 157 L2: sout | "L2" | endl;157 L2: sout | "L2"; 158 158 if (i == 0) { 159 159 ++i; 160 sout | "goto L1" | endl;160 sout | "goto L1"; 161 161 // S_G = { y, x } 162 162 goto L1; // jump back, destruct b/c before x definition … … 165 165 } else if (i == 1) { 166 166 ++i; 167 sout | "goto L2" | endl;167 sout | "goto L2"; 168 168 // S_G = { y, x } 169 169 goto L2; // jump back, do not destruct … … 172 172 } else if (i == 2) { 173 173 ++i; 174 sout | "goto L3" | endl;174 sout | "goto L3"; 175 175 // S_G = { y, x } 176 176 goto L3; // jump ahead, do not destruct … … 180 180 ++i; 181 181 A z = { "z" }; 182 sout | "goto L3-2" | endl;182 sout | "goto L3-2"; 183 183 // S_G = { z, y, x } 184 184 goto L3; … … 187 187 } else { 188 188 ++i; 189 sout | "goto L4" | endl;189 sout | "goto L4"; 190 190 // S_G = { y, x } 191 191 goto L4; // jump ahead, destruct b/c left block x was defined in … … 194 194 } 195 195 // S_L3 = { y, x } 196 L3: sout | "L3" | endl;197 sout | "goto L2-2" | endl;196 L3: sout | "L3"; 197 sout | "goto L2-2"; 198 198 // S_G = { y, x } 199 199 goto L2; // jump back, do not destruct … … 202 202 } 203 203 // S_L4 = {} 204 L4: sout | "L4" | endl;204 L4: sout | "L4"; 205 205 if (i == 4) { 206 sout | "goto L0" | endl;206 sout | "goto L0"; 207 207 // S_G = {} 208 208 goto L0; … … 240 240 f(i); 241 241 } 242 sout | endl;242 sout | nl; 243 243 g(); 244 sout | endl;244 sout | nl; 245 245 h(); 246 246 -
tests/raii/globals.cfa
r5e49e47 rd0c91a6 70 70 71 71 int main() { 72 sout | "static\t\tinline\t\tautogen\t\tvalue" | endl;72 sout | "static\t\tinline\t\tautogen\t\tvalue"; 73 73 74 sout | "no \t\tno \t\tno \t\t" | g.val.value | endl;75 sout | "no \t\tno \t\tyes\t\t" | ga.val.value | endl;76 sout | "no \t\tyes\t\tno \t\t" | gi.val.value | endl;77 sout | "no \t\tyes\t\tyes\t\t" | gia.val.value | endl;78 sout | "yes\t\tno \t\tno \t\t" | gs.val.value | endl;79 sout | "yes\t\tno \t\tyes\t\t" | gsa.val.value | endl;80 sout | "yes\t\tyes\t\tno \t\t" | gsi.val.value | endl;81 sout | "yes\t\tyes\t\tyes\t\t" | gsia.val.value | endl;74 sout | "no \t\tno \t\tno \t\t" | g.val.value; 75 sout | "no \t\tno \t\tyes\t\t" | ga.val.value; 76 sout | "no \t\tyes\t\tno \t\t" | gi.val.value; 77 sout | "no \t\tyes\t\tyes\t\t" | gia.val.value; 78 sout | "yes\t\tno \t\tno \t\t" | gs.val.value; 79 sout | "yes\t\tno \t\tyes\t\t" | gsa.val.value; 80 sout | "yes\t\tyes\t\tno \t\t" | gsi.val.value; 81 sout | "yes\t\tyes\t\tyes\t\t" | gsia.val.value; 82 82 83 83 } -
tests/random.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Jul 5 21:29:30 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:00:15 201813 // Update Count : 2 012 // Last Modified On : Tue Dec 4 21:46:25 2018 13 // Update Count : 22 14 14 // 15 15 16 16 #include <fstream.hfa> 17 #include <stdlib.hfa> 17 #include <stdlib.hfa> // random 18 18 #include <unistd.h> // getpid 19 19 … … 24 24 // test polymorphic calls to random and stream 25 25 char c = random(); 26 sout | c | endl;26 sout | c; 27 27 c = random( 'A' ); 28 sout | c | endl;28 sout | c; 29 29 c = random( 'A', 'Z' ); 30 sout | c | endl;30 sout | c; 31 31 32 32 int i = random(); 33 sout | i | endl;33 sout | i; 34 34 i = random( 10 ); 35 sout | i | endl;35 sout | i; 36 36 i = random( -10, 20 ); 37 sout | i | endl;37 sout | i; 38 38 39 39 unsigned int ui = random(); 40 sout | ui | endl;40 sout | ui; 41 41 ui = random( 10u ); 42 sout | ui | endl;42 sout | ui; 43 43 ui = random( 10u, 20u ); 44 sout | ui | endl;44 sout | ui; 45 45 46 46 long int li = random(); 47 sout | li | endl;47 sout | li; 48 48 li = random( 10l ); 49 sout | li | endl;49 sout | li; 50 50 li = random( -10l, 20l ); 51 sout | li | endl;51 sout | li; 52 52 53 53 unsigned long int uli = random(); 54 sout | uli | endl;54 sout | uli; 55 55 uli = random( 10ul ); 56 sout | uli | endl;56 sout | uli; 57 57 uli = random( 10ul, 20ul ); 58 sout | uli | endl;58 sout | uli; 59 59 60 60 float f = random(); 61 sout | f | endl;61 sout | f; 62 62 63 63 double d = random(); 64 sout | d | endl;64 sout | d; 65 65 66 66 float _Complex fc = random(); 67 sout | fc | endl;67 sout | fc; 68 68 69 69 double _Complex dc = random(); 70 sout | dc | endl;70 sout | dc; 71 71 72 72 long double _Complex ldc = random(); 73 sout | ldc | endl;73 sout | ldc; 74 74 } // main 75 75 -
tests/rational.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Mon Mar 28 08:43:12 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:00:27201813 // Update Count : 6 812 // Last Modified On : Tue Dec 4 21:46:42 2018 13 // Update Count : 69 14 14 // 15 15 … … 27 27 28 28 int main() { 29 sout | "constructor" | endl;29 sout | "constructor"; 30 30 Rational(int) a = { 3 }, b = { 4 }, c; 31 sout | a | b | c | endl;31 sout | a | b | c; 32 32 33 33 a = (Rational(int)){ 4, 8 }; 34 34 b = (Rational(int)){ 5, 7 }; 35 sout | a | b | endl;35 sout | a | b; 36 36 a = (Rational(int)){ -2, -3 }; 37 37 b = (Rational(int)){ 3, -2 }; 38 sout | a | b | endl;38 sout | a | b; 39 39 a = (Rational(int)){ -2, 3 }; 40 40 b = (Rational(int)){ 3, 2 }; 41 sout | a | b | endl;41 sout | a | b; 42 42 43 sout | "logical" | endl;43 sout | "logical"; 44 44 a = (Rational(int)){ -2 }; 45 45 b = (Rational(int)){ -3, 2 }; 46 sout | a | b | endl;47 // sout | a == 1 | endl; // FIX ME48 sout | a != b | endl;49 sout | a < b | endl;50 sout | a <= b | endl;51 sout | a > b | endl;52 sout | a >= b | endl;46 sout | a | b; 47 // sout | a == 1; // FIX ME 48 sout | a != b; 49 sout | a < b; 50 sout | a <= b; 51 sout | a > b; 52 sout | a >= b; 53 53 54 sout | "arithmetic" | endl;55 sout | a | b | endl;56 sout | a + b | endl;57 sout | a - b | endl;58 sout | a * b | endl;59 sout | a / b | endl;54 sout | "arithmetic"; 55 sout | a | b; 56 sout | a + b; 57 sout | a - b; 58 sout | a * b; 59 sout | a / b; 60 60 61 sout | "conversion" | endl;61 sout | "conversion"; 62 62 a = (Rational(int)){ 3, 4 }; 63 sout | widen( a ) | endl;63 sout | widen( a ); 64 64 a = (Rational(int)){ 1, 7 }; 65 sout | widen( a ) | endl;65 sout | widen( a ); 66 66 a = (Rational(int)){ 355, 113 }; 67 sout | widen( a ) | endl;68 sout | narrow( 0.75, 4 ) | endl;69 sout | narrow( 0.14285714285714, 16 ) | endl;70 sout | narrow( 3.14159265358979, 256 ) | endl;67 sout | widen( a ); 68 sout | narrow( 0.75, 4 ); 69 sout | narrow( 0.14285714285714, 16 ); 70 sout | narrow( 3.14159265358979, 256 ); 71 71 72 sout | "decompose" | endl;72 sout | "decompose"; 73 73 int n, d; 74 74 // [n, d] = a; 75 // sout | a | n | d | endl;75 // sout | a | n | d; 76 76 77 sout | "more tests" | endl;77 sout | "more tests"; 78 78 Rational(int) x = { 1, 2 }, y = { 2 }; 79 sout | x - y | endl;80 sout | x > y | endl;81 sout | x | numerator( x, 2 ) | x | endl;82 sout | y | denominator( y, -2 ) | y | endl;79 sout | x - y; 80 sout | x > y; 81 sout | x | numerator( x, 2 ) | x; 82 sout | y | denominator( y, -2 ) | y; 83 83 84 84 Rational(int) z = { 0, 5 }; 85 sout | z | endl;85 sout | z; 86 86 87 sout | x | numerator( x, 0 ) | x | endl;87 sout | x | numerator( x, 0 ) | x; 88 88 89 89 x = (Rational(int)){ 1, MAX } + (Rational(int)){ 1, MAX }; 90 sout | x | endl;90 sout | x; 91 91 x = (Rational(int)){ 3, MAX } + (Rational(int)){ 2, MAX }; 92 sout | x | endl;92 sout | x; 93 93 94 94 sin | a | b; 95 sout | a | b | endl;95 sout | a | b; 96 96 } // main 97 97 -
tests/references.cfa
r5e49e47 rd0c91a6 9 9 // Author : Rob Schluntz 10 10 // Created On : Wed Aug 23 16:11:50 2017 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 23 16:12:0313 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 25 14:31:48 2018 13 // Update Count : 11 14 14 // 15 15 16 #include <fstream.hfa> 17 16 18 struct Y { int i; }; 17 void ?{}( Y & y) { printf("Default constructing a Y\n"); }18 void ?{}( Y & y, Y other) { printf("Copy constructing a Y\n"); }19 void ^?{}( Y & y) { printf("Destructing a Y\n"); }20 Y ?=?( Y & y, Y other) { printf("Assigning a Y\n"); return y; }21 void ?{}( Y & y, int i) { printf("Value constructing a Y %d\n", i); y.i = i; }19 void ?{}( Y & y ) { sout | "Default constructing a Y"; } 20 void ?{}( Y & y, Y other ) { sout | "Copy constructing a Y"; } 21 void ^?{}( Y & y ) { sout | "Destructing a Y"; } 22 Y ?=?( Y & y, Y other ) { sout | "Assigning a Y"; return y; } 23 void ?{}( Y & y, int i ) { sout | "Value constructing a Y" | i; y.i = i; } 22 24 23 25 struct X { Y & r; Y y; }; 24 void ?{}( X & x) {26 void ?{}( X & x ) { 25 27 // ensure that r is not implicitly constructed 26 28 } 27 void ?{}( X & x, X other) {29 void ?{}( X & x, X other ) { 28 30 // ensure that r is not implicitly constructed 29 31 } 30 void ^?{}( X & x) {32 void ^?{}( X & x ) { 31 33 // ensure that r is not implicitly destructed 32 34 } 33 X ?=?( X & x, X other) { return x; }35 X ?=?( X & x, X other ) { return x; } 34 36 35 37 // ensure that generated functions do not implicitly operate on references … … 48 50 int x = 123456, x2 = 789, *p1 = &x, **p2 = &p1, ***p3 = &p2, 49 51 &r1 = x, &&r2 = r1, &&&r3 = r2; 50 ***p3 = 3; 51 **p3 = &x; 52 *p3 = &p1; 53 int y = 0, z = 11, & ar[3] = { x, y, z }; 54 // &ar[1] = &z; // change reference array element55 // typeof( ar[1] ) p = 3; // is int, i.e., the type of referenced object56 // typeof( &ar[1] ) q = &x; // is int *, i.e., the type of pointer52 ***p3 = 3; // change x 53 **p3 = &x; // change p1 54 *p3 = &p1; // change p2 55 int y = 0, z = 11, & ar[3] = { x, y, z }; // initialize array of references 56 // &ar[1] = &z; // change reference array element 57 // typeof( ar[1] ) p = 3; // is int, i.e., the type of referenced object 58 // typeof( &ar[1] ) q = &x; // is int *, i.e., the type of pointer 57 59 // _Static_assert( sizeof( ar[1] ) == sizeof( int ), "Array type should be int." ); // is true, i.e., the size of referenced object 58 60 // _Static_assert( sizeof( &ar[1] ) == sizeof( int *), "Address of array should be int *." ); // is true, i.e., the size of a reference 59 61 60 ((int*&)&r3) = &x; 62 ((int*&)&r3) = &x; // change r1, (&*)**r3 61 63 x = 3; 62 64 // test that basic reference properties are true - r1 should be an alias for x 63 printf("%d %d %d\n", x, r1, &x == &r1);65 sout | x | r1 | &x == &r1; 64 66 r1 = 12; 65 printf("%d %d %d\n", x, r1, &x == &r1);67 sout | x | r1 | &x == &r1; 66 68 67 69 // test that functions using basic references work 68 printf("%d %d %d %d\n", toref(&x), toref(p1), toptr(r1) == toptr(x), toptr(r1) == &x);70 sout | toref( &x ) | toref( p1 ) | toptr( r1 ) == toptr( x ) | toptr( r1 ) == &x; 69 71 70 72 changeRef( x ); 71 73 changeRef( y ); 72 74 changeRef( z ); 73 printf("%d %d %d\n", x, y, z);75 sout | x | y | z; 74 76 changeRef( r1 ); 75 printf("%d %d\n", r1, x);77 sout | r1 | x; 76 78 77 r3 = 6; 78 printf("x = %d ; x2 = %d\n", x, x2);// check that x was changed79 &r3 = &x2; 80 r3 = 999; 81 printf("x = %d ; x2 = %d\n", x, x2);// check that x2 was changed82 ((int**&)&&r3) = p2; 83 r3 = 12345; 84 printf("x = %d ; x2 = %d\n", x, x2);// check that x was changed85 &&&r3 = p3; 86 ((int&)r3) = 22222; 87 printf("x = %d ; x2 = %d\n", x, x2);// check that x was changed79 r3 = 6; // change x, ***r3 80 sout | "x = " | x | " ; x2 = " | x2; // check that x was changed 81 &r3 = &x2; // change r1 to refer to x2, (&*)**r3 82 r3 = 999; // modify x2 83 sout | "x = " | x | " ; x2 = " | x2; // check that x2 was changed 84 ((int**&)&&r3) = p2; // change r2, (&(&*)*)*r3, ensure explicit cast to reference works 85 r3 = 12345; // modify x 86 sout | "x = " | x | " ; x2 = " | x2; // check that x was changed 87 &&&r3 = p3; // change r3 to p3, (&(&(&*)*)*)r3 88 ((int&)r3) = 22222; // modify x, ensure explicit cast to reference works 89 sout | "x = " | x | " ; x2 = " | x2; // check that x was changed 88 90 89 91 // test that reference members are not implicitly constructed/destructed/assigned … … 102 104 struct S { double x, y; }; 103 105 void f( int & i, int & j, S & s, int v[] ) { 104 printf("%d %d { %g, %g }, [%d, %d, %d]\n", i, j, s.[x, y], v[0], v[1], v[2]);106 sout | i | j | "{ " | s.[x, y] | " }," | "[" | v[0] | "," | v[1] | "," | v[2] | "]"; 105 107 } 106 void g(int & i) { printf("%d\n", i); }107 void h(int &&& i) { printf("%d\n", i); }108 void g(int & i) { sout | i; } 109 void h(int &&& i) { sout | i; } 108 110 109 int &&& r = 3; 111 int &&& r = 3; // rvalue to reference 110 112 int i = r; 111 printf("%d %d\n", i, r);// both 3113 sout | i | r; // both 3 112 114 113 g( 3 ); 114 h( (int &&&)3 ); 115 g( 3 ); // rvalue to reference 116 h( (int &&&)3 ); // rvalue to reference 115 117 116 118 int a = 5, b = 4; -
tests/searchsort.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Thu Feb 4 18:17:50 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Nov 6 18:00:38201813 // Update Count : 10 212 // Last Modified On : Thu Dec 20 22:49:46 2018 13 // Update Count : 108 14 14 // 15 15 16 16 #include <fstream.hfa> 17 #include <stdlib.hfa> 17 #include <stdlib.hfa> // bsearch, qsort 18 18 #include <stdlib.h> // C version of bsearch 19 19 … … 21 21 22 22 int main( void ) { 23 const unsignedint size = 10;23 const int size = 10; 24 24 int iarr[size]; 25 25 26 for ( i; 0u ~ size ) { 26 sout | nlOff; // turn off auto newline 27 28 for ( i; 0 ~ size ) { 27 29 iarr[i] = size - i; 28 30 sout | iarr[i] | ", "; 29 31 } // for 30 sout | endl | endl;32 sout | nl | nl; 31 33 32 34 // ascending sort/search by changing < to > 33 35 qsort( iarr, size ); 34 for ( i; 0 u~ size ) {36 for ( i; 0 ~ size ) { 35 37 sout | iarr[i] | ", "; 36 38 } // for 37 sout | endl;38 for ( i; 0 u~ size ) { // C version39 sout | nl; 40 for ( i; 0 ~ size ) { // C version 39 41 int key = size - i; 40 42 int * v = bsearch( &key, iarr, size, sizeof( iarr[0] ), comp ); 41 43 sout | key | ':' | *v | ", "; 42 44 } // for 43 sout | endl;45 sout | nl; 44 46 45 for ( i; 0 u~ size ) {47 for ( i; 0 ~ size ) { 46 48 int * v = bsearch( size - i, iarr, size ); 47 49 sout | size - i | ':' | *v | ", "; 48 50 } // for 49 sout | endl;50 for ( i; 0 u~ size ) {51 sout | nl; 52 for ( i; 0 ~ size ) { 51 53 unsigned int posn = bsearch( size - i, iarr, size ); 52 54 sout | size - i | ':' | iarr[posn] | ", "; 53 55 } // for 54 sout | endl | endl;56 sout | nl | nl; 55 57 56 58 // descending sort/search by changing < to > 57 for ( i; 0 u~ size ) {59 for ( i; 0 ~ size ) { 58 60 iarr[i] = i + 1; 59 61 sout | iarr[i] | ", "; 60 62 } // for 61 sout | endl;63 sout | nl; 62 64 { 63 int ?<?( int x, int y ) { return x > y; } 64 qsort( iarr, size ); 65 for ( i; 0u ~ size ) { 65 // redefinition of ?<? can't overlap the loop controls: 66 { 67 int (*?<?)(int, int) = ?>?; 68 qsort( iarr, size ); 69 } 70 for ( i; 0 ~ size ) { 66 71 sout | iarr[i] | ", "; 67 72 } // for 68 sout | endl; 69 for ( i; 0u ~ size ) { 73 sout | nl; 74 for ( i; 0 ~ size ) { 75 int (*?<?)(int, int) = ?>?; 70 76 int * v = bsearch( size - i, iarr, size ); 71 77 sout | size - i | ':' | *v | ", "; 72 78 } // for 73 sout | endl; 74 for ( i; 0u ~ size ) { 79 sout | nl; 80 for ( i; 0 ~ size ) { 81 int (*?<?)(int, int) = ?>?; 75 82 unsigned int posn = bsearch( size - i, iarr, size ); 76 83 sout | size - i | ':' | iarr[posn] | ", "; 77 84 } // for 78 85 } 79 sout | endl | endl;86 sout | nl | nl; 80 87 81 88 double darr[size]; 82 for ( i; 0 u~ size ) {89 for ( i; 0 ~ size ) { 83 90 darr[i] = size - i + 0.5; 84 91 sout | darr[i] | ", "; 85 92 } // for 86 sout | endl;93 sout | nl; 87 94 qsort( darr, size ); 88 for ( i; 0 u~ size ) {95 for ( i; 0 ~ size ) { 89 96 sout | darr[i] | ", "; 90 97 } // for 91 sout | endl;92 for ( i; 0 u~ size ) {98 sout | nl; 99 for ( i; 0 ~ size ) { 93 100 double * v = bsearch( size - i + 0.5, darr, size ); 94 101 sout | size - i + 0.5 | ':' | *v | ", "; 95 102 } // for 96 sout | endl;97 for ( i; 0 u~ size ) {103 sout | nl; 104 for ( i; 0 ~ size ) { 98 105 unsigned int posn = bsearch( size - i + 0.5, darr, size ); 99 106 sout | size - i + 0.5 | ':' | darr[posn] | ", "; 100 107 } // for 101 sout | endl | endl;108 sout | nl | nl; 102 109 103 110 struct S { int i, j; } sarr[size]; 104 111 int ?<?( S t1, S t2 ) { return t1.i < t2.i && t1.j < t2.j; } 105 112 ofstream & ?|?( ofstream & os, S v ) { return os | v.i | ' ' | v.j; } 106 for ( i; 0 u~ size ) {113 for ( i; 0 ~ size ) { 107 114 sarr[i].i = size - i; 108 115 sarr[i].j = size - i + 1; 109 116 sout | sarr[i] | ", "; 110 117 } // for 111 sout | endl;118 sout | nl; 112 119 qsort( sarr, size ); 113 for ( i; 0 u~ size ) {120 for ( i; 0 ~ size ) { 114 121 sout | sarr[i] | ", "; 115 122 } // for 116 sout | endl;117 for ( i; 0 u~ size ) {123 sout | nl; 124 for ( i; 0 ~ size ) { 118 125 S temp = { size - i, size - i + 1 }; 119 126 S * v = bsearch( temp, sarr, size ); 120 127 sout | temp | ':' | *v | ", "; 121 128 } // for 122 sout | endl;123 for ( i; 0 u~ size ) {129 sout | nl; 130 for ( i; 0 ~ size ) { 124 131 S temp = { size - i, size - i + 1 }; 125 132 unsigned int posn = bsearch( temp, sarr, size ); 126 133 sout | temp | ':' | sarr[posn] | ", "; 127 134 } // for 128 sout | endl | endl;135 sout | nl | nl; 129 136 { 130 unsignedint getKey( const S & s ) { return s.j; }131 for ( i; 0 u~ size ) {137 int getKey( const S & s ) { return s.j; } 138 for ( i; 0 ~ size ) { 132 139 sout | sarr[i] | ", "; 133 140 } // for 134 sout | endl;135 for ( i; 0 u~ size ) {141 sout | nl; 142 for ( i; 0 ~ size ) { 136 143 S * v = bsearch( size - i + 1, sarr, size ); 137 144 sout | size - i + 1 | ':' | *v | ", "; 138 145 } // for 139 sout | endl;140 for ( i; 0 u~ size ) {146 sout | nl; 147 for ( i; 0 ~ size ) { 141 148 unsigned int posn = bsearch( size - i + 1, sarr, size ); 142 149 sout | size - i + 1 | ':' | sarr[posn] | ", "; 143 150 } // for 144 sout | endl | endl;151 sout | nl | nl; 145 152 } 146 153 } // main -
tests/shortCircuit.cfa
r5e49e47 rd0c91a6 1 // 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 // 4 // The contents of this file are covered under the licence agreement in the 5 // file "LICENCE" distributed with Cforall. 6 // 7 // shortCircuit.cfa -- 8 // 9 // Author : Peter A. Buhr 10 // Created On : Thu Jan 28 18:26:16 2016 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 4 18:26:05 2018 13 // Update Count : 4 14 // 15 1 16 void g( float f ) {} 2 17 void g( int i ) {} … … 33 48 } 34 49 35 36 int main(int argc, char const *argv[]) 37 { 50 int main( int argc, char const *argv[] ) { 51 sout | nlOff; 38 52 test_t true_val, false_val; 39 53 true_val.x = 1; … … 41 55 42 56 true_val && false_val; 43 sout | endl;57 sout | nl; 44 58 45 59 true_val || false_val; 46 sout | endl;60 sout | nl; 47 61 48 62 false_val && true_val; 49 sout | endl;63 sout | nl; 50 64 51 65 false_val || true_val; 52 sout | endl;66 sout | nl; 53 67 54 68 return 0; 55 69 } 70 71 // Local Variables: // 72 // tab-width: 4 // 73 // compile-command: "cfa abs.cfa" // 74 // End: // -
tests/sum.cfa
r5e49e47 rd0c91a6 11 11 // Created On : Wed May 27 17:56:53 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Nov 6 18:01:10201814 // Update Count : 28 013 // Last Modified On : Sun Dec 23 23:00:38 2018 14 // Update Count : 287 15 15 // 16 16 … … 56 56 } // for 57 57 sout | "sum from" | low | "to" | High | "is" 58 | sum( size, (unsigned char *)a ) | ", check" | (int)s | endl;58 | sum( size, (unsigned char *)a ) | ", check" | (int)s; 59 59 60 60 int s = 0, a[size], v = low; … … 64 64 } // for 65 65 sout | "sum from" | low | "to" | High | "is" 66 | sum( size, (int *)a ) | ", check" | (int)s | endl;66 | sum( size, (int *)a ) | ", check" | (int)s; 67 67 68 68 float s = 0.0f, a[size], v = low / 10.0f; … … 72 72 } // for 73 73 sout | "sum from" | low / 10.0f | "to" | High / 10.0f | "is" 74 | sum( size, (float *)a ) | ", check" | (float)s | endl;74 | sum( size, (float *)a ) | ", check" | (float)s; 75 75 76 76 double s = 0.0, a[size], v = low / 10.0; … … 80 80 } // for 81 81 sout | "sum from" | low / 10.0 | "to" | High / 10.0 | "is" 82 | sum( size, (double *)a ) | ", check" | (double)s | endl;82 | sum( size, (double *)a ) | ", check" | (double)s; 83 83 84 84 struct S { int i, j; }; … … 93 93 S ?++( S & t ) { S temp = t; t += (S){1}; return temp; } 94 94 ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; } 95 void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); } 95 96 96 97 S s = (S){0}, a[size], v = { low, low }; … … 100 101 } // for 101 102 sout | "sum from" | low | "to" | High | "is" 102 | sum( size, (S *)a ) | ", check" | (S)s | endl;103 | sum( size, (S *)a ) | ", check" | (S)s; 103 104 104 105 forall( otype Impl | sumable( Impl ) ) … … 114 115 } // for 115 116 sout | "sum from" | low | "to" | High | "is" 116 | sum( size, gs.x ) | ", check" | (int)s | endl;// add field array in generic type117 | sum( size, gs.x ) | ", check" | (int)s; // add field array in generic type 117 118 delete( gs.x ); 118 119 } // main -
tests/swap.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:01:23201813 // Update Count : 7 212 // Last Modified On : Sun Dec 23 23:00:49 2018 13 // Update Count : 77 14 14 // 15 15 … … 19 19 int main( void ) { 20 20 char c1 = 'a', c2 = 'b'; 21 sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap " ;21 sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap " | nonl; 22 22 swap( c1, c2 ); 23 sout | '\t' | c1 | ' ' | c2 | endl;23 sout | '\t' | c1 | ' ' | c2; 24 24 25 25 signed int i1 = -1, i2 = -2; 26 sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap " ;26 sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap " | nonl; 27 27 swap( i1, i2 ); 28 sout | '\t' | i1 | i2 | endl;28 sout | '\t' | i1 | i2; 29 29 30 30 unsigned int ui1 = 1, ui2 = 2; 31 sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap " ;31 sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap " | nonl; 32 32 swap( ui1, ui2 ); 33 sout | '\t' | ui1 | ui2 | endl;33 sout | '\t' | ui1 | ui2; 34 34 35 35 signed long int li1 = -1, li2 = -2; 36 sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap " ;36 sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap " | nonl; 37 37 swap( li1, li2 ); 38 sout | '\t' | li1 | li2 | endl;38 sout | '\t' | li1 | li2; 39 39 40 40 unsigned long int uli1 = 1, uli2 = 2; 41 sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap " ;41 sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap " | nonl; 42 42 swap( uli1, uli2 ); 43 sout | '\t' | uli1 | uli2 | endl;43 sout | '\t' | uli1 | uli2; 44 44 45 45 signed long long int lli1 = -1, lli2 = -2; 46 sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap " ;46 sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap " | nonl; 47 47 swap( lli1, lli2 ); 48 sout | '\t' | lli1 | lli2 | endl;48 sout | '\t' | lli1 | lli2; 49 49 50 50 unsigned long long int ulli1 = 1, ulli2 = 2; 51 sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap " ;51 sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap " | nonl; 52 52 swap( ulli1, ulli2 ); 53 sout | '\t' | ulli1 | ulli2 | endl;53 sout | '\t' | ulli1 | ulli2; 54 54 55 55 float f1 = 1.5, f2 = 2.5; 56 sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap " ;56 sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap " | nonl; 57 57 swap( f1, f2 ); 58 sout | '\t' | f1 | f2 | endl;58 sout | '\t' | f1 | f2; 59 59 60 60 double d1 = 1.5, d2 = 2.5; 61 sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap " ;61 sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap " | nonl; 62 62 swap( d1, d2 ); 63 sout | '\t' | d1 | d2 | endl;63 sout | '\t' | d1 | d2; 64 64 65 65 long double ld1 = 1.5, ld2 = 2.5; 66 sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap " ;66 sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap " | nonl; 67 67 swap( ld1, ld2 ); 68 sout | '\t' | ld1 | ld2 | endl;68 sout | '\t' | ld1 | ld2; 69 69 70 70 float _Complex fc1 = 1.5f+1.5if, fc2 = 2.5f+2.5if; 71 sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap " ;71 sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap " | nonl; 72 72 swap( fc1, fc2 ); 73 sout | '\t' | fc1 | fc2 | endl;73 sout | '\t' | fc1 | fc2; 74 74 75 75 double _Complex dc1 = 1.5d+1.5id, dc2 = 2.5d+2.5id; 76 sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap " ;76 sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap " | nonl; 77 77 swap( dc1, dc2 ); 78 sout | '\t' | dc1 | dc2 | endl;78 sout | '\t' | dc1 | dc2; 79 79 80 80 long double _Complex ldc1 = 1.5d+1.5il, ldc2 = 2.5d+2.5il; 81 sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap " ;81 sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap " | nonl; 82 82 swap( ldc1, ldc2 ); 83 sout | '\t' | ldc1 | ldc2 | endl;83 sout | '\t' | ldc1 | ldc2; 84 84 85 85 struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 }; 86 86 ofstream & ?|?( ofstream & os, S s ) { return os | s.i | s.j; } 87 sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap "; 87 void ?|?( ofstream & os, S s ) { (ofstream &)(os | s.i | s.j); nl( os ); } 88 sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap " | nonl; 88 89 swap( s1, s2 ); 89 sout | '\t' | s1 | "," | s2 | endl;90 sout | '\t' | s1 | "," | s2; 90 91 } // main 91 92 -
tests/test.py
r5e49e47 rd0c91a6 19 19 20 20 def matchTest(path): 21 match = re.search(" %s\/([\w\/\-_]*).expect\/([\w\-_]+)(\.[\w\-_]+)?\.txt" % settings.SRCDIR, path)21 match = re.search("^%s\/([\w\/\-_]*).expect\/([\w\-_]+)(\.[\w\-_]+)?\.txt$" % settings.SRCDIR, path) 22 22 if match : 23 23 test = Test() … … 34 34 # reads the directory ./.expect and indentifies the tests 35 35 def listTests( includes, excludes ): 36 includes = [canonicalPath( i ) for i in includes] if includes else None37 excludes = [canonicalPath( i ) for i in excludes] if excludes else None38 39 36 # tests directly in the .expect folder will always be processed 40 37 test_list = findTests() -
tests/time.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Mar 27 17:24:56 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Nov 6 18:01:45201813 // Update Count : 1712 // Last Modified On : Thu Dec 20 23:09:21 2018 13 // Update Count : 23 14 14 // 15 15 … … 19 19 int main() { 20 20 Duration d1 = 3`h, d2 = 2`s, d3 = 3.375`s, d4 = 12`s, d5 = 1`s + 10_000`ns; 21 sout | d1 | d2 | d3 | d4 | d5 | endl;21 sout | d1 | d2 | d3 | d4 | d5; 22 22 int i; 23 23 d1 = 0; 24 sout | d1 | d2 | d3 | endl;24 sout | d1 | d2 | d3; 25 25 d1 = 7`s; 26 26 d3 = d2 = d1; 27 sout | d1 | d2 | d3 | endl;27 sout | d1 | d2 | d3; 28 28 d1 = d1 + d2; 29 sout | d1 | endl;30 sout | d1 == 7`s | d1 == d2 | d1 == 0 | endl;31 sout | div( 7`s, 2`s ) | endl;32 sout | endl;29 sout | d1; 30 sout | d1 == 7`s | d1 == d2 | d1 == 0; 31 sout | div( 7`s, 2`s ); 32 sout | nl; 33 33 34 34 Time t = { 1970, 1, 2, 0, 0, 0, 10_000_000 }; 35 sout | t | endl;35 sout | t; 36 36 t = t + d1; 37 sout | t | t.tv | endl;37 sout | t | t.tv; 38 38 Time t1 = (timespec){ 104_414, 10_000_000 }; 39 sout | t1 | t1.tv | endl;40 sout | t - t | t + d5 | t.tv | endl;39 sout | t1 | t1.tv; 40 sout | t - t | t + d5 | t.tv; 41 41 char buf[16]; 42 sout | "yy/mm/dd" | [t, buf]`ymd ;// shared buf => separate calls43 sout | "mm/dd/yy" | mm_dd_yy( t, buf ) ;42 sout | "yy/mm/dd" | [t, buf]`ymd | nonl; // shared buf => separate calls 43 sout | "mm/dd/yy" | mm_dd_yy( t, buf ) | nonl; 44 44 strftime( buf, 16, "%D", t ); // %D => mm/dd/yy 45 sout | "mm/dd/yy" | buf ;46 sout | "dd/yy/mm" | [t, buf]`dmy | endl;45 sout | "mm/dd/yy" | buf | nonl; 46 sout | "dd/yy/mm" | [t, buf]`dmy; 47 47 Time t2 = { 2001, 7, 4, 0, 0, 1, 0 }, t3 = (timeval){ 994_219_201 }; 48 sout | t2 | t2.tv | endl | t3 | t3.tv | endl;49 sout | endl;48 sout | t2 | t2.tv | nl | t3 | t3.tv; 49 sout | nl; 50 50 51 51 // Clock Newfoundland = { -3.5`h }, PST = { -8`h }; // distance from GMT (UTC) 52 // sout | "Clock Resolution" | getRes() | endl53 // | "Newfoundland" | getTime( Newfoundland ) | endl54 // | "local" | getTime() | endl55 // | "local nsec" | getTimeNsec() | endl56 // | "PST" | PST() | endl;// getTime short form57 // sout | endl;52 // sout | "Clock Resolution" | getRes() 53 // | "Newfoundland" | getTime( Newfoundland ) 54 // | "local" | getTime() 55 // | "local nsec" | getTimeNsec() 56 // | "PST" | PST(); // getTime short form 57 // sout | nl; 58 58 59 59 // http://en.cppreference.com/w/cpp/chrono/duration/operator_arith4 60 60 Duration s = 1`h + 2 * 10`m + 70`s / 10; 61 sout | "1 hour + 2*10 min + 70/10 sec = " | s | "seconds" | endl;62 sout | "Dividing that by 2 minutes gives" | s / 2`m | endl;63 sout | "Dividing that by 2 gives" | s / 2 | "seconds \n";64 sout | s | "seconds is" | s`h | "hours," | (s % 1`h)`m | "minutes," | (s % 1`m)`s | "seconds" | endl;61 sout | "1 hour + 2*10 min + 70/10 sec = " | s | "seconds"; 62 sout | "Dividing that by 2 minutes gives" | s / 2`m; 63 sout | "Dividing that by 2 gives" | s / 2 | "seconds"; 64 sout | s | "seconds is" | s`h | "hours," | (s % 1`h)`m | "minutes," | (s % 1`m)`s | "seconds"; 65 65 } // main 66 66 -
tests/tuple/tupleAssign.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Tue Nov 15 17:24:32 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 6 21:23:58 201713 // Update Count : 3 412 // Last Modified On : Tue Dec 4 22:03:48 2018 13 // Update Count : 35 14 14 // 15 15 … … 24 24 // swap x, y and store the new [x, y] in [u, v] and in z; 25 25 printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z ); 26 sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]" | endl;26 sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]"; 27 27 z = [u, v] = [x, y] = [y, x]; 28 28 printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z ); 29 sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]" | endl;29 sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]"; 30 30 31 31 // shuffle elements -- v = z.0, z.0 = z.1, z.1 = u, u = v 32 32 [v, z, u] = [z, u, v]; 33 33 printf( "u=%d v=%d z=[%d, %d]\n", u, v, z ); 34 sout | "u=" | u | "v=" | v | "z=[" | z | "]" | endl;34 sout | "u=" | u | "v=" | v | "z=[" | z | "]"; 35 35 36 36 // multiple assignment with tuple expression on right … … 38 38 [u, v] = [123, 456]; 39 39 printf( "u=%d v=%d z=[%d, %d]\n", u, v, z ); 40 sout | "u=" | u | "v=" | v | "z=[" | z | "]" | endl;40 sout | "u=" | u | "v=" | v | "z=[" | z | "]"; 41 41 } 42 42 { … … 55 55 [t, x, d, i, c, x] = (double)94.12; 56 56 printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, (int)c, t ); 57 sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]" | endl;57 sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]"; 58 58 [x, c, i, d, x, t] = (double)-94.12; 59 59 printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, c, t ); 60 sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]" | endl;60 sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]"; 61 61 } 62 62 } -
tests/userLiterals.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Wed Sep 6 21:40:50 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:02:03201813 // Update Count : 5 512 // Last Modified On : Tue Dec 4 22:03:10 2018 13 // Update Count : 56 14 14 // 15 15 … … 18 18 #include <uchar.h> 19 19 20 int ?`s( int s ) { sout | "secs" | s | endl; return s; }21 int ?`m( int m ) { sout | "mins" | m | endl; return m * 60; }22 int ?`h( int h ) { sout | "hours" | h | endl; return h * 3600; }23 int ?`_A_( int x ) { sout | "_A_" | x | endl; return x; }24 int ?`__thingy_( int x ) { sout | "_thingy_" | x | endl; return x; }20 int ?`s( int s ) { sout | "secs" | s; return s; } 21 int ?`m( int m ) { sout | "mins" | m; return m * 60; } 22 int ?`h( int h ) { sout | "hours" | h; return h * 3600; } 23 int ?`_A_( int x ) { sout | "_A_" | x; return x; } 24 int ?`__thingy_( int x ) { sout | "_thingy_" | x; return x; } 25 25 26 int ?`s( const char * s ) { sout | "secs" | s | endl; return 0; }27 int ?`m( const char16_t * m ) { sout | "mins" | m | endl; return 0;}28 int ?`h( const char32_t * h ) { sout | "hours" | h | endl; return 0; }29 int ?`_A_( const wchar_t * str ) { sout | "_A_" | str | endl; return 0; }30 int ?`__thingy_( const char * str ) { sout | "_thingy_" | str | endl; return 0; }26 int ?`s( const char * s ) { sout | "secs" | s; return 0; } 27 int ?`m( const char16_t * m ) { sout | "mins" | m; return 0;} 28 int ?`h( const char32_t * h ) { sout | "hours" | h; return 0; } 29 int ?`_A_( const wchar_t * str ) { sout | "_A_" | str; return 0; } 30 int ?`__thingy_( const char * str ) { sout | "_thingy_" | str; return 0; } 31 31 32 32 … … 46 46 Weight w, heavy = { 20 }; // 20 stone 47 47 w = 155`lb; 48 sout | w | endl;48 sout | w; 49 49 w = 0b_1111`st; 50 sout | w | endl;50 sout | w; 51 51 w = 0_233`lb; // octal weight (155) 52 sout | w | endl;52 sout | w; 53 53 w = 0x_9b_u`kg; 54 sout | w | endl;54 sout | w; 55 55 w = 70.3`kg; 56 sout | w | endl;56 sout | w; 57 57 w = 11`st + 1`lb; 58 sout | w | endl;58 sout | w; 59 59 w = 5`st + 8`kg + 25`lb + heavy; 60 sout | w | endl;60 sout | w; 61 61 62 62 // 0`secs; -
tests/vector.cfa
r5e49e47 rd0c91a6 10 10 // Created On : Mon Jul 4 23:36:19 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 18:02:26201813 // Update Count : 2 812 // Last Modified On : Tue Dec 4 22:02:39 2018 13 // Update Count : 29 14 14 // 15 15 … … 21 21 do { \ 22 22 if ( !(x) ) { \ 23 sout | "CHECK failed :" | #x | "at" | __FILE__ | " :" | __LINE__ | endl; \23 sout | "CHECK failed :" | #x | "at" | __FILE__ | " :" | __LINE__; \ 24 24 abort(); \ 25 25 } \ … … 31 31 assert( empty( &iv ) ); 32 32 assert( size( &iv ) == 0 ); 33 sout | size( &iv ) | endl;33 sout | size( &iv ); 34 34 35 35 push_back( &iv, 1 ); 36 36 assert( size( &iv ) == 1 ); 37 sout | size( &iv ) | endl;37 sout | size( &iv ); 38 38 39 39 push_back( &iv, 2 ); 40 40 assert( size( &iv ) == 2 ); 41 sout | size( &iv ) | endl;41 sout | size( &iv ); 42 42 43 43 push_back( &iv, 3 ); 44 44 assert( size( &iv ) == 3 ); 45 sout | size( &iv ) | endl;45 sout | size( &iv ); 46 46 47 47 assert( !empty( &iv ) ); … … 58 58 assert( empty( &iv ) ); 59 59 assert( size( &iv ) == 0 ); 60 sout | size( &iv ) | endl;60 sout | size( &iv ); 61 61 } 62 62 -
tests/warnings/.expect/self-assignment.txt
r5e49e47 rd0c91a6 1 warnings/self-assignment.c :29:1 warning: self assignment of expression: Cast of:1 warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Cast of: 2 2 Variable Expression: j: signed int 3 3 ... to: 4 4 reference to signed int 5 warnings/self-assignment.c :30:1 warning: self assignment of expression: Cast of:6 Variable Expression: s: instance of struct S with body 1 5 warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Cast of: 6 Variable Expression: s: instance of struct S with body 1 7 7 ... to: 8 reference to instance of struct S with body 1 9 warnings/self-assignment.c :31:1 warning: self assignment of expression: Cast of:10 Member Expression, with field: 8 reference to instance of struct S with body 1 9 warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Cast of: 10 Member Expression, with field: 11 11 i: signed int 12 ... from aggregate: 13 Variable Expression: s: instance of struct S with body 1 12 ... from aggregate: 13 Variable Expression: s: instance of struct S with body 1 14 14 ... to: 15 15 reference to signed int 16 warnings/self-assignment.c :32:1 warning: self assignment of expression: Cast of:17 Member Expression, with field: 16 warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Cast of: 17 Member Expression, with field: 18 18 i: signed int 19 ... from aggregate: 20 Member Expression, with field: 21 s: instance of struct S with body 1 22 ... from aggregate: 23 Variable Expression: t: instance of struct T with body 1 19 ... from aggregate: 20 Member Expression, with field: 21 s: instance of struct S with body 1 22 ... from aggregate: 23 Variable Expression: t: instance of struct T with body 1 24 24 ... to: 25 25 reference to signed int -
tests/withStatement.cfa
r5e49e47 rd0c91a6 9 9 // Author : Rob Schluntz 10 10 // Created On : Mon Dec 04 17:41:45 2017 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon Dec 04 17:45:07 201713 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 24 19:08:18 2018 13 // Update Count : 5 14 14 // 15 15 16 #include <fstream.hfa> 17 16 18 struct S { 17 18 19 19 int i; 20 // dynamically allocated member ensures ctor/dtors are called correctly on temporaries 21 int * ptr; 20 22 }; 21 23 22 24 // with clause on reference parameter 23 void ?{}( S & this, int n) with(this) {24 25 ptr = (int *)malloc(sizeof(int));25 void ?{}( S & this, int n ) with( this ) { 26 i = n; 27 ptr = (int *)malloc( sizeof(int) ); 26 28 } 27 29 28 void ?{}( S & this) {29 30 void ?{}( S & this ) { 31 this{ 0 }; 30 32 } 31 33 32 void ?{}( S & this, S other) {33 34 void ?{}( S & this, S other ) { 35 this{ other.i }; 34 36 } 35 37 36 S ?=?( S & this, S other) with(this) {37 38 39 38 S ?=?( S & this, S other ) with( this ) { 39 i = other.i; 40 *ptr = *other.ptr; 41 return this; 40 42 } 41 43 42 void ^?{}( S & this) with(this) {43 free(ptr);44 void ^?{}( S & this ) with( this ) { 45 free( ptr ); 44 46 } 45 47 46 48 struct S2 { 47 49 S s; 48 50 }; 49 51 50 void ?{}( S2 & this, int n) {51 52 void ?{}( S2 & this, int n ) { 53 (this.s){ n }; 52 54 } 53 55 54 forall( otype T)56 forall( otype T ) 55 57 struct Box { 56 58 T x; 57 59 }; 58 60 59 forall( otype T)60 void ?{}( Box(T) & this) with(this) { // with clause in polymorphic function61 61 forall( otype T ) 62 void ?{}( Box(T) & this ) with( this ) { // with clause in polymorphic function 63 x{}; 62 64 } 63 65 64 void print( int i) { printf("%d", i); }66 void print( int i ) { sout | i; } 65 67 66 forall(otype T | { void print(T); }) 67 void foo(T t) { 68 Box(T) b = { t }; 69 with(b) { // with statement in polymorphic function 70 print(x); 71 printf("\n"); 72 } 68 forall( otype T | { void print( T ); }) 69 void foo( T t ) { 70 Box( T ) b = { t }; 71 with( b ) { // with statement in polymorphic function 72 print( x ); 73 } 73 74 } 74 75 75 76 // ensure with-statement temporary generation works correctly 76 77 S mk() { 77 printf("called mk\n");78 return (S){ 444 };78 sout | "called mk"; 79 return (S){ 444 }; 79 80 } 80 81 81 82 // ensure with-statement temporary generation with reference-returning functions works correctly 82 83 S & ref() { 83 84 84 static S var = { 123456789 }; 85 return var; 85 86 } 86 87 87 88 int main() { 88 89 with (s2) {90 with(s) { // with s2.s91 printf("%d %d %d\n", i, s.i, s2.s.i);92 foo(i); // s.i93 with(mk()) {94 printf("%d %d %d\n", i, i, i);95 with(ref()) {96 printf("%d %d %d\n", i, i, i);97 98 with(ref()) {99 printf("%d %d %d\n", i, i, i);100 101 102 103 89 S2 s2 = { 12345 }; 90 with ( s2) { 91 with( s ) { // with s2.s 92 sout | i | s.i | s2.s.i; 93 foo( i ); // s.i 94 with( mk()) { 95 sout | i | i | i; 96 with( ref()) { 97 sout | i | i | i; 98 } // with ref() 99 with( ref()) { 100 sout | i | i | i; 101 } // with ref() 102 } // with mk() 103 } // with s 104 } // with s2 104 105 } 105 106 -
tools/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 CC = @BACKEND_CC@ 20 AM_CFLAGS = -Wall -Wextra -O2 -g -std=c11 20 AM_CFLAGS = -Wall -Wextra -O2 -g 21 21 22 22 noinst_PROGRAMS = busy catchsig repeat watchdog -
tools/Makefile.in
r5e49e47 rd0c91a6 96 96 subdir = tools 97 97 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 98 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 99 $(top_srcdir)/configure.ac 98 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 99 $(top_srcdir)/automake/ltoptions.m4 \ 100 $(top_srcdir)/automake/ltsugar.m4 \ 101 $(top_srcdir)/automake/ltversion.m4 \ 102 $(top_srcdir)/automake/lt~obsolete.m4 \ 103 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 100 104 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 101 105 $(ACLOCAL_M4) … … 109 113 busy_OBJECTS = $(am_busy_OBJECTS) 110 114 busy_LDADD = $(LDADD) 111 busy_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(busy_LDFLAGS) $(LDFLAGS) \ 112 -o $@ 115 AM_V_lt = $(am__v_lt_@AM_V@) 116 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 117 am__v_lt_0 = --silent 118 am__v_lt_1 = 119 busy_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 120 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 121 $(busy_LDFLAGS) $(LDFLAGS) -o $@ 113 122 am_catchsig_OBJECTS = catchsig.$(OBJEXT) 114 123 catchsig_OBJECTS = $(am_catchsig_OBJECTS) … … 138 147 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 139 148 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 149 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 150 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 151 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 152 $(AM_CFLAGS) $(CFLAGS) 140 153 AM_V_CC = $(am__v_CC_@AM_V@) 141 154 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) … … 143 156 am__v_CC_1 = 144 157 CCLD = $(CC) 145 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 158 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 159 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 160 $(AM_LDFLAGS) $(LDFLAGS) -o $@ 146 161 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 147 162 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) … … 182 197 AMTAR = @AMTAR@ 183 198 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 199 AR = @AR@ 184 200 AUTOCONF = @AUTOCONF@ 185 201 AUTOHEADER = @AUTOHEADER@ 186 202 AUTOMAKE = @AUTOMAKE@ 187 203 AWK = @AWK@ 188 BACKEND_CC = @BACKEND_CC@189 204 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 190 CC = @ BACKEND_CC@205 CC = @CC@ 191 206 CCAS = @CCAS@ 192 207 CCASDEPMODE = @CCASDEPMODE@ … … 206 221 CPPFLAGS = @CPPFLAGS@ 207 222 CXX = @CXX@ 223 CXXCPP = @CXXCPP@ 208 224 CXXDEPMODE = @CXXDEPMODE@ 209 225 CXXFLAGS = @CXXFLAGS@ … … 211 227 DEFS = @DEFS@ 212 228 DEPDIR = @DEPDIR@ 229 DLLTOOL = @DLLTOOL@ 213 230 DRIVER_DIR = @DRIVER_DIR@ 231 DSYMUTIL = @DSYMUTIL@ 232 DUMPBIN = @DUMPBIN@ 214 233 ECHO_C = @ECHO_C@ 215 234 ECHO_N = @ECHO_N@ … … 217 236 EGREP = @EGREP@ 218 237 EXEEXT = @EXEEXT@ 238 FGREP = @FGREP@ 219 239 GREP = @GREP@ 220 240 HOST_FLAGS = @HOST_FLAGS@ … … 224 244 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 225 245 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 246 LD = @LD@ 226 247 LDFLAGS = @LDFLAGS@ 227 248 LEX = @LEX@ … … 232 253 LIBOBJS = @LIBOBJS@ 233 254 LIBS = @LIBS@ 255 LIBTOOL = @LIBTOOL@ 256 LIPO = @LIPO@ 257 LN_S = @LN_S@ 234 258 LTLIBOBJS = @LTLIBOBJS@ 259 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 235 260 MAKEINFO = @MAKEINFO@ 261 MANIFEST_TOOL = @MANIFEST_TOOL@ 236 262 MKDIR_P = @MKDIR_P@ 263 NM = @NM@ 264 NMEDIT = @NMEDIT@ 265 OBJDUMP = @OBJDUMP@ 237 266 OBJEXT = @OBJEXT@ 267 OTOOL = @OTOOL@ 268 OTOOL64 = @OTOOL64@ 238 269 PACKAGE = @PACKAGE@ 239 270 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 245 276 PATH_SEPARATOR = @PATH_SEPARATOR@ 246 277 RANLIB = @RANLIB@ 278 SED = @SED@ 247 279 SET_MAKE = @SET_MAKE@ 248 280 SHELL = @SHELL@ … … 256 288 abs_top_builddir = @abs_top_builddir@ 257 289 abs_top_srcdir = @abs_top_srcdir@ 290 ac_ct_AR = @ac_ct_AR@ 258 291 ac_ct_CC = @ac_ct_CC@ 259 292 ac_ct_CXX = @ac_ct_CXX@ 293 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 260 294 am__include = @am__include@ 261 295 am__leading_dot = @am__leading_dot@ … … 305 339 top_srcdir = @top_srcdir@ 306 340 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 307 AM_CFLAGS = -Wall -Wextra -O2 -g -std=c11 341 ACLOCAL_AMFLAGS = -I automake 342 AM_CFLAGS = -Wall -Wextra -O2 -g 308 343 busy_SOURCES = busy.c 309 344 busy_LDFLAGS = -pthread … … 314 349 315 350 .SUFFIXES: 316 .SUFFIXES: .c . o .obj351 .SUFFIXES: .c .lo .o .obj 317 352 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 318 353 @for dep in $?; do \ … … 346 381 347 382 clean-noinstPROGRAMS: 348 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) 383 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ 384 echo " rm -f" $$list; \ 385 rm -f $$list || exit $$?; \ 386 test -n "$(EXEEXT)" || exit 0; \ 387 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 388 echo " rm -f" $$list; \ 389 rm -f $$list 349 390 350 391 busy$(EXEEXT): $(busy_OBJECTS) $(busy_DEPENDENCIES) $(EXTRA_busy_DEPENDENCIES) … … 390 431 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 391 432 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 433 434 .c.lo: 435 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 436 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 437 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 438 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 439 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 440 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< 441 442 mostlyclean-libtool: 443 -rm -f *.lo 444 445 clean-libtool: 446 -rm -rf .libs _libs 392 447 393 448 ID: $(am__tagged_files) … … 509 564 clean: clean-am 510 565 511 clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am 566 clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 567 mostlyclean-am 512 568 513 569 distclean: distclean-am … … 564 620 mostlyclean: mostlyclean-am 565 621 566 mostlyclean-am: mostlyclean-compile mostlyclean-generic 622 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 623 mostlyclean-libtool 567 624 568 625 pdf: pdf-am … … 579 636 580 637 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 581 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ 582 distclean-compile distclean-generic distclean-tags distdir dvi \ 583 dvi-am html html-am info info-am install install-am \ 584 install-data install-data-am install-dvi install-dvi-am \ 585 install-exec install-exec-am install-html install-html-am \ 586 install-info install-info-am install-man install-pdf \ 587 install-pdf-am install-ps install-ps-am install-strip \ 588 installcheck installcheck-am installdirs maintainer-clean \ 638 clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ 639 ctags-am distclean distclean-compile distclean-generic \ 640 distclean-libtool distclean-tags distdir dvi dvi-am html \ 641 html-am info info-am install install-am install-data \ 642 install-data-am install-dvi install-dvi-am install-exec \ 643 install-exec-am install-html install-html-am install-info \ 644 install-info-am install-man install-pdf install-pdf-am \ 645 install-ps install-ps-am install-strip installcheck \ 646 installcheck-am installdirs maintainer-clean \ 589 647 maintainer-clean-generic mostlyclean mostlyclean-compile \ 590 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall\591 uninstall-am648 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 649 tags tags-am uninstall uninstall-am 592 650 593 651 .PRECIOUS: Makefile -
tools/prettyprinter/Makefile.am
r5e49e47 rd0c91a6 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 ACLOCAL_AMFLAGS = -I automake 18 19 19 20 BUILT_SOURCES = parser.hh -
tools/prettyprinter/Makefile.in
r5e49e47 rd0c91a6 95 95 subdir = tools/prettyprinter 96 96 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 97 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 98 $(top_srcdir)/configure.ac 97 am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \ 98 $(top_srcdir)/automake/ltoptions.m4 \ 99 $(top_srcdir)/automake/ltsugar.m4 \ 100 $(top_srcdir)/automake/ltversion.m4 \ 101 $(top_srcdir)/automake/lt~obsolete.m4 \ 102 $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac 99 103 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 100 104 $(ACLOCAL_M4) … … 113 117 am__DEPENDENCIES_1 = 114 118 pretty_DEPENDENCIES = $(am__DEPENDENCIES_1) 115 pretty_LINK = $(CXXLD) $(pretty_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ 116 $(LDFLAGS) -o $@ 119 AM_V_lt = $(am__v_lt_@AM_V@) 120 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 121 am__v_lt_0 = --silent 122 am__v_lt_1 = 123 pretty_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 124 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(pretty_CXXFLAGS) \ 125 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 117 126 AM_V_P = $(am__v_P_@AM_V@) 118 127 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) … … 131 140 am__depfiles_maybe = depfiles 132 141 am__mv = mv -f 133 AM_V_lt = $(am__v_lt_@AM_V@)134 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)135 am__v_lt_0 = --silent136 am__v_lt_1 =137 142 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 138 143 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 144 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 145 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 146 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 147 $(AM_CXXFLAGS) $(CXXFLAGS) 139 148 AM_V_CXX = $(am__v_CXX_@AM_V@) 140 149 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) … … 142 151 am__v_CXX_1 = 143 152 CXXLD = $(CXX) 144 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 145 -o $@ 153 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 154 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 155 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 146 156 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 147 157 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) … … 149 159 am__v_CXXLD_1 = 150 160 LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) 161 LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ 162 $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) 151 163 AM_V_LEX = $(am__v_LEX_@AM_V@) 152 164 am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) … … 157 169 -e s/c++$$/h++/ -e s/c$$/h/ 158 170 YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) 171 LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ 172 $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) 159 173 AM_V_YACC = $(am__v_YACC_@AM_V@) 160 174 am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) … … 163 177 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 164 178 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 179 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 180 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 181 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 182 $(AM_CFLAGS) $(CFLAGS) 165 183 AM_V_CC = $(am__v_CC_@AM_V@) 166 184 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) … … 168 186 am__v_CC_1 = 169 187 CCLD = $(CC) 170 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 188 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 189 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 190 $(AM_LDFLAGS) $(LDFLAGS) -o $@ 171 191 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 172 192 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) … … 206 226 AMTAR = @AMTAR@ 207 227 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 228 AR = @AR@ 208 229 AUTOCONF = @AUTOCONF@ 209 230 AUTOHEADER = @AUTOHEADER@ 210 231 AUTOMAKE = @AUTOMAKE@ 211 232 AWK = @AWK@ 212 BACKEND_CC = @BACKEND_CC@213 233 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 214 234 CC = @CC@ … … 230 250 CPPFLAGS = @CPPFLAGS@ 231 251 CXX = @CXX@ 252 CXXCPP = @CXXCPP@ 232 253 CXXDEPMODE = @CXXDEPMODE@ 233 254 CXXFLAGS = @CXXFLAGS@ … … 235 256 DEFS = @DEFS@ 236 257 DEPDIR = @DEPDIR@ 258 DLLTOOL = @DLLTOOL@ 237 259 DRIVER_DIR = @DRIVER_DIR@ 260 DSYMUTIL = @DSYMUTIL@ 261 DUMPBIN = @DUMPBIN@ 238 262 ECHO_C = @ECHO_C@ 239 263 ECHO_N = @ECHO_N@ … … 241 265 EGREP = @EGREP@ 242 266 EXEEXT = @EXEEXT@ 267 FGREP = @FGREP@ 243 268 GREP = @GREP@ 244 269 HOST_FLAGS = @HOST_FLAGS@ … … 248 273 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 249 274 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 275 LD = @LD@ 250 276 LDFLAGS = @LDFLAGS@ 251 277 LEX = @LEX@ … … 256 282 LIBOBJS = @LIBOBJS@ 257 283 LIBS = @LIBS@ 284 LIBTOOL = @LIBTOOL@ 285 LIPO = @LIPO@ 286 LN_S = @LN_S@ 258 287 LTLIBOBJS = @LTLIBOBJS@ 288 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 259 289 MAKEINFO = @MAKEINFO@ 290 MANIFEST_TOOL = @MANIFEST_TOOL@ 260 291 MKDIR_P = @MKDIR_P@ 292 NM = @NM@ 293 NMEDIT = @NMEDIT@ 294 OBJDUMP = @OBJDUMP@ 261 295 OBJEXT = @OBJEXT@ 296 OTOOL = @OTOOL@ 297 OTOOL64 = @OTOOL64@ 262 298 PACKAGE = @PACKAGE@ 263 299 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ … … 269 305 PATH_SEPARATOR = @PATH_SEPARATOR@ 270 306 RANLIB = @RANLIB@ 307 SED = @SED@ 271 308 SET_MAKE = @SET_MAKE@ 272 309 SHELL = @SHELL@ … … 280 317 abs_top_builddir = @abs_top_builddir@ 281 318 abs_top_srcdir = @abs_top_srcdir@ 319 ac_ct_AR = @ac_ct_AR@ 282 320 ac_ct_CC = @ac_ct_CC@ 283 321 ac_ct_CXX = @ac_ct_CXX@ 322 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 284 323 am__include = @am__include@ 285 324 am__leading_dot = @am__leading_dot@ … … 329 368 top_srcdir = @top_srcdir@ 330 369 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 370 ACLOCAL_AMFLAGS = -I automake 331 371 BUILT_SOURCES = parser.hh 332 372 AM_YFLAGS = -d -t -v … … 346 386 347 387 .SUFFIXES: 348 .SUFFIXES: .cc .ll . o .obj .yy388 .SUFFIXES: .cc .ll .lo .o .obj .yy 349 389 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 350 390 @for dep in $?; do \ … … 386 426 sed 's/$(EXEEXT)$$//' | \ 387 427 while read p p1; do if test -f $$p \ 428 || test -f $$p1 \ 388 429 ; then echo "$$p"; echo "$$p"; else :; fi; \ 389 430 done | \ … … 400 441 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 401 442 test -z "$$files" || { \ 402 echo " $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tools_prettyprinterdir)$$dir'"; \403 $(INSTALL_PROGRAM_ENV)$(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tools_prettyprinterdir)$$dir" || exit $$?; \443 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tools_prettyprinterdir)$$dir'"; \ 444 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tools_prettyprinterdir)$$dir" || exit $$?; \ 404 445 } \ 405 446 ; done … … 417 458 418 459 clean-tools_prettyprinterPROGRAMS: 419 -test -z "$(tools_prettyprinter_PROGRAMS)" || rm -f $(tools_prettyprinter_PROGRAMS) 460 @list='$(tools_prettyprinter_PROGRAMS)'; test -n "$$list" || exit 0; \ 461 echo " rm -f" $$list; \ 462 rm -f $$list || exit $$?; \ 463 test -n "$(EXEEXT)" || exit 0; \ 464 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 465 echo " rm -f" $$list; \ 466 rm -f $$list 420 467 parser.hh: parser.cc 421 468 @if test ! -f $@; then rm -f parser.cc; else :; fi … … 454 501 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 455 502 503 .cc.lo: 504 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 505 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 506 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 507 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 508 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 509 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 510 456 511 pretty-lex.o: lex.cc 457 512 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-lex.o -MD -MP -MF $(DEPDIR)/pretty-lex.Tpo -c -o pretty-lex.o `test -f 'lex.cc' || echo '$(srcdir)/'`lex.cc … … 529 584 .yy.cc: 530 585 $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) 586 587 mostlyclean-libtool: 588 -rm -f *.lo 589 590 clean-libtool: 591 -rm -rf .libs _libs 531 592 532 593 ID: $(am__tagged_files) … … 658 719 clean: clean-am 659 720 660 clean-am: clean-generic clean- tools_prettyprinterPROGRAMS\661 mostlyclean-am721 clean-am: clean-generic clean-libtool \ 722 clean-tools_prettyprinterPROGRAMS mostlyclean-am 662 723 663 724 distclean: distclean-am … … 714 775 mostlyclean: mostlyclean-am 715 776 716 mostlyclean-am: mostlyclean-compile mostlyclean-generic 777 mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 778 mostlyclean-libtool 717 779 718 780 pdf: pdf-am … … 729 791 730 792 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 731 clean-tools_prettyprinterPROGRAMS cscopelist-am ctags ctags-am \ 732 distclean distclean-compile distclean-generic distclean-tags \ 733 distdir dvi dvi-am html html-am info info-am install \ 734 install-am install-data install-data-am install-dvi \ 735 install-dvi-am install-exec install-exec-am install-html \ 736 install-html-am install-info install-info-am install-man \ 737 install-pdf install-pdf-am install-ps install-ps-am \ 738 install-strip install-tools_prettyprinterPROGRAMS installcheck \ 793 clean-libtool clean-tools_prettyprinterPROGRAMS cscopelist-am \ 794 ctags ctags-am distclean distclean-compile distclean-generic \ 795 distclean-libtool distclean-tags distdir dvi dvi-am html \ 796 html-am info info-am install install-am install-data \ 797 install-data-am install-dvi install-dvi-am install-exec \ 798 install-exec-am install-html install-html-am install-info \ 799 install-info-am install-man install-pdf install-pdf-am \ 800 install-ps install-ps-am install-strip \ 801 install-tools_prettyprinterPROGRAMS installcheck \ 739 802 installcheck-am installdirs maintainer-clean \ 740 803 maintainer-clean-generic mostlyclean mostlyclean-compile \ 741 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ 742 uninstall-am uninstall-tools_prettyprinterPROGRAMS 804 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 805 tags tags-am uninstall uninstall-am \ 806 uninstall-tools_prettyprinterPROGRAMS 743 807 744 808 .PRECIOUS: Makefile
Note:
See TracChangeset
for help on using the changeset viewer.