1dnl Process this with autoconf to create configure 2 3AC_PREREQ(2.68) 4 5AC_INIT([libffi], [3.0.13], [http://github.com/atgreen/libffi/issues]) 6AC_CONFIG_HEADERS([fficonfig.h]) 7 8AC_CANONICAL_SYSTEM 9target_alias=${target_alias-$host_alias} 10 11. ${srcdir}/configure.host 12 13AX_ENABLE_BUILDDIR 14 15AM_INIT_AUTOMAKE 16 17# The same as in boehm-gc and libstdc++. Have to borrow it from there. 18# We must force CC to /not/ be precious variables; otherwise 19# the wrong, non-multilib-adjusted value will be used in multilibs. 20# As a side effect, we have to subst CFLAGS ourselves. 21# Also save and restore CFLAGS, since AC_PROG_CC will come up with 22# defaults of its own if none are provided. 23 24m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS]) 25m4_define([_AC_ARG_VAR_PRECIOUS],[]) 26save_CFLAGS=$CFLAGS 27AC_PROG_CC 28CFLAGS=$save_CFLAGS 29m4_undefine([_AC_ARG_VAR_PRECIOUS]) 30m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) 31 32AC_SUBST(CFLAGS) 33 34AM_PROG_AS 35AM_PROG_CC_C_O 36AC_PROG_LIBTOOL 37AC_CONFIG_MACRO_DIR([m4]) 38 39# Test for 64-bit build. 40AC_CHECK_SIZEOF([size_t]) 41 42AX_COMPILER_VENDOR 43AX_CC_MAXOPT 44# The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro 45# compiler. 46if test "$ax_cv_c_compiler_vendor" != "sun"; then 47 AX_CFLAGS_WARN_ALL 48fi 49 50if test "x$GCC" = "xyes"; then 51 CFLAGS="$CFLAGS -fexceptions" 52 touch local.exp 53else 54 cat > local.exp <<EOF 55set CC_FOR_TARGET "$CC" 56EOF 57fi 58 59AM_MAINTAINER_MODE 60 61AC_CHECK_HEADERS(sys/mman.h) 62AC_CHECK_FUNCS(mmap) 63AC_FUNC_MMAP_BLACKLIST 64 65dnl The -no-testsuite modules omit the test subdir. 66AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite) 67 68TARGETDIR="unknown" 69case "$host" in 70 aarch64*-*-*) 71 TARGET=AARCH64; TARGETDIR=aarch64 72 ;; 73 74 alpha*-*-*) 75 TARGET=ALPHA; TARGETDIR=alpha; 76 # Support 128-bit long double, changeable via command-line switch. 77 HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)' 78 ;; 79 80 arm*-*-*) 81 TARGET=ARM; TARGETDIR=arm 82 ;; 83 84 amd64-*-freebsd* | amd64-*-openbsd*) 85 TARGET=X86_64; TARGETDIR=x86 86 ;; 87 88 amd64-*-freebsd*) 89 TARGET=X86_64; TARGETDIR=x86 90 ;; 91 92 amd64-*-freebsd*) 93 TARGET=X86_64; TARGETDIR=x86 94 ;; 95 96 avr32*-*-*) 97 TARGET=AVR32; TARGETDIR=avr32 98 ;; 99 100 bfin*) 101 TARGET=BFIN; TARGETDIR=bfin 102 ;; 103 104 cris-*-*) 105 TARGET=LIBFFI_CRIS; TARGETDIR=cris 106 ;; 107 108 frv-*-*) 109 TARGET=FRV; TARGETDIR=frv 110 ;; 111 112 hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*) 113 TARGET=PA_LINUX; TARGETDIR=pa 114 ;; 115 hppa*64-*-hpux*) 116 TARGET=PA64_HPUX; TARGETDIR=pa 117 ;; 118 hppa*-*-hpux*) 119 TARGET=PA_HPUX; TARGETDIR=pa 120 ;; 121 122 i?86-*-freebsd* | i?86-*-openbsd*) 123 TARGET=X86_FREEBSD; TARGETDIR=x86 124 ;; 125 i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*) 126 TARGET=X86_WIN32; TARGETDIR=x86 127 # All mingw/cygwin/win32 builds require -no-undefined for sharedlib. 128 # We must also check with_cross_host to decide if this is a native 129 # or cross-build and select where to install dlls appropriately. 130 if test -n "$with_cross_host" && 131 test x"$with_cross_host" != x"no"; then 132 AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"'; 133 else 134 AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"'; 135 fi 136 ;; 137 i?86-*-darwin*) 138 TARGET=X86_DARWIN; TARGETDIR=x86 139 ;; 140 i?86-*-solaris2.1[[0-9]]*) 141 TARGETDIR=x86 142 if test $ac_cv_sizeof_size_t = 4; then 143 TARGET=X86; 144 else 145 TARGET=X86_64; 146 fi 147 ;; 148 149 x86_64-*-darwin*) 150 TARGET=X86_DARWIN; TARGETDIR=x86 151 ;; 152 153 x86_64-*-cygwin* | x86_64-*-mingw*) 154 TARGET=X86_WIN64; TARGETDIR=x86 155 # All mingw/cygwin/win32 builds require -no-undefined for sharedlib. 156 # We must also check with_cross_host to decide if this is a native 157 # or cross-build and select where to install dlls appropriately. 158 if test -n "$with_cross_host" && 159 test x"$with_cross_host" != x"no"; then 160 AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"'; 161 else 162 AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"'; 163 fi 164 ;; 165 166 i?86-*-* | x86_64-*-*) 167 TARGETDIR=x86 168 if test $ac_cv_sizeof_size_t = 4; then 169 case "$host" in 170 *-gnux32) 171 TARGET=X86_64 172 ;; 173 *) 174 TARGET=X86 175 ;; 176 esac 177 else 178 TARGET=X86_64; 179 fi 180 ;; 181 182 ia64*-*-*) 183 TARGET=IA64; TARGETDIR=ia64 184 ;; 185 186 m32r*-*-*) 187 TARGET=M32R; TARGETDIR=m32r 188 ;; 189 190 m68k-*-*) 191 TARGET=M68K; TARGETDIR=m68k 192 ;; 193 194 microblaze*-*-*) 195 TARGET=MICROBLAZE; TARGETDIR=microblaze 196 ;; 197 198 moxie-*-*) 199 TARGET=MOXIE; TARGETDIR=moxie 200 ;; 201 202 metag-*-*) 203 TARGET=METAG; TARGETDIR=metag 204 ;; 205 206 mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) 207 TARGET=MIPS; TARGETDIR=mips 208 ;; 209 mips*-*-linux* | mips*-*-openbsd*) 210 # Support 128-bit long double for NewABI. 211 HAVE_LONG_DOUBLE='defined(__mips64)' 212 TARGET=MIPS; TARGETDIR=mips 213 ;; 214 215 powerpc*-*-linux* | powerpc-*-sysv*) 216 TARGET=POWERPC; TARGETDIR=powerpc 217 ;; 218 powerpc-*-amigaos*) 219 TARGET=POWERPC; TARGETDIR=powerpc 220 ;; 221 powerpc-*-beos*) 222 TARGET=POWERPC; TARGETDIR=powerpc 223 ;; 224 powerpc-*-darwin* | powerpc64-*-darwin*) 225 TARGET=POWERPC_DARWIN; TARGETDIR=powerpc 226 ;; 227 powerpc-*-aix* | rs6000-*-aix*) 228 TARGET=POWERPC_AIX; TARGETDIR=powerpc 229 ;; 230 powerpc-*-freebsd* | powerpc-*-openbsd*) 231 TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc 232 ;; 233 powerpc64-*-freebsd*) 234 TARGET=POWERPC; TARGETDIR=powerpc 235 ;; 236 powerpc*-*-rtems*) 237 TARGET=POWERPC; TARGETDIR=powerpc 238 ;; 239 240 s390-*-* | s390x-*-*) 241 TARGET=S390; TARGETDIR=s390 242 ;; 243 244 sh-*-* | sh[[34]]*-*-*) 245 TARGET=SH; TARGETDIR=sh 246 ;; 247 sh64-*-* | sh5*-*-*) 248 TARGET=SH64; TARGETDIR=sh64 249 ;; 250 251 sparc*-*-*) 252 TARGET=SPARC; TARGETDIR=sparc 253 ;; 254 255 tile*-*) 256 TARGET=TILE; TARGETDIR=tile 257 ;; 258 259 xtensa*-*) 260 TARGET=XTENSA; TARGETDIR=xtensa 261 ;; 262 263esac 264 265AC_SUBST(AM_RUNTESTFLAGS) 266AC_SUBST(AM_LTLDFLAGS) 267 268if test $TARGETDIR = unknown; then 269 AC_MSG_ERROR(["libffi has not been ported to $host."]) 270fi 271 272AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS) 273AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN) 274AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) 275AM_CONDITIONAL(X86, test x$TARGET = xX86) 276AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD) 277AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32) 278AM_CONDITIONAL(X86_WIN64, test x$TARGET = xX86_WIN64) 279AM_CONDITIONAL(X86_DARWIN, test x$TARGET = xX86_DARWIN) 280AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA) 281AM_CONDITIONAL(IA64, test x$TARGET = xIA64) 282AM_CONDITIONAL(M32R, test x$TARGET = xM32R) 283AM_CONDITIONAL(M68K, test x$TARGET = xM68K) 284AM_CONDITIONAL(MICROBLAZE, test x$TARGET = xMICROBLAZE) 285AM_CONDITIONAL(METAG, test x$TARGET = xMETAG) 286AM_CONDITIONAL(MOXIE, test x$TARGET = xMOXIE) 287AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC) 288AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX) 289AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN) 290AM_CONDITIONAL(POWERPC_FREEBSD, test x$TARGET = xPOWERPC_FREEBSD) 291AM_CONDITIONAL(AARCH64, test x$TARGET = xAARCH64) 292AM_CONDITIONAL(ARM, test x$TARGET = xARM) 293AM_CONDITIONAL(AVR32, test x$TARGET = xAVR32) 294AM_CONDITIONAL(LIBFFI_CRIS, test x$TARGET = xLIBFFI_CRIS) 295AM_CONDITIONAL(FRV, test x$TARGET = xFRV) 296AM_CONDITIONAL(S390, test x$TARGET = xS390) 297AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) 298AM_CONDITIONAL(SH, test x$TARGET = xSH) 299AM_CONDITIONAL(SH64, test x$TARGET = xSH64) 300AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX) 301AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX) 302AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX) 303AM_CONDITIONAL(TILE, test x$TARGET = xTILE) 304AM_CONDITIONAL(XTENSA, test x$TARGET = xXTENSA) 305 306AC_HEADER_STDC 307AC_CHECK_FUNCS(memcpy) 308AC_FUNC_ALLOCA 309 310AC_CHECK_SIZEOF(double) 311AC_CHECK_SIZEOF(long double) 312 313# Also AC_SUBST this variable for ffi.h. 314if test -z "$HAVE_LONG_DOUBLE"; then 315 HAVE_LONG_DOUBLE=0 316 if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then 317 if test $ac_cv_sizeof_long_double != 0; then 318 HAVE_LONG_DOUBLE=1 319 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) 320 fi 321 fi 322fi 323AC_SUBST(HAVE_LONG_DOUBLE) 324 325AC_C_BIGENDIAN 326 327GCC_AS_CFI_PSEUDO_OP 328 329if test x$TARGET = xSPARC; then 330 AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs], 331 libffi_cv_as_sparc_ua_pcrel, [ 332 save_CFLAGS="$CFLAGS" 333 save_LDFLAGS="$LDFLAGS" 334 CFLAGS="$CFLAGS -fpic" 335 LDFLAGS="$LDFLAGS -shared" 336 AC_TRY_LINK([asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");],, 337 [libffi_cv_as_sparc_ua_pcrel=yes], 338 [libffi_cv_as_sparc_ua_pcrel=no]) 339 CFLAGS="$save_CFLAGS" 340 LDFLAGS="$save_LDFLAGS"]) 341 if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then 342 AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1, 343 [Define if your assembler and linker support unaligned PC relative relocs.]) 344 fi 345 346 AC_CACHE_CHECK([assembler .register pseudo-op support], 347 libffi_cv_as_register_pseudo_op, [ 348 libffi_cv_as_register_pseudo_op=unknown 349 # Check if we have .register 350 AC_TRY_COMPILE(,[asm (".register %g2, #scratch");], 351 [libffi_cv_as_register_pseudo_op=yes], 352 [libffi_cv_as_register_pseudo_op=no]) 353 ]) 354 if test "x$libffi_cv_as_register_pseudo_op" = xyes; then 355 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, 356 [Define if your assembler supports .register.]) 357 fi 358fi 359 360if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64; then 361 AC_CACHE_CHECK([assembler supports pc related relocs], 362 libffi_cv_as_x86_pcrel, [ 363 libffi_cv_as_x86_pcrel=no 364 echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s 365 if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then 366 libffi_cv_as_x86_pcrel=yes 367 fi 368 ]) 369 if test "x$libffi_cv_as_x86_pcrel" = xyes; then 370 AC_DEFINE(HAVE_AS_X86_PCREL, 1, 371 [Define if your assembler supports PC relative relocs.]) 372 fi 373 374 AC_CACHE_CHECK([assembler .ascii pseudo-op support], 375 libffi_cv_as_ascii_pseudo_op, [ 376 libffi_cv_as_ascii_pseudo_op=unknown 377 # Check if we have .ascii 378 AC_TRY_COMPILE(,[asm (".ascii \\"string\\"");], 379 [libffi_cv_as_ascii_pseudo_op=yes], 380 [libffi_cv_as_ascii_pseudo_op=no]) 381 ]) 382 if test "x$libffi_cv_as_ascii_pseudo_op" = xyes; then 383 AC_DEFINE(HAVE_AS_ASCII_PSEUDO_OP, 1, 384 [Define if your assembler supports .ascii.]) 385 fi 386 387 AC_CACHE_CHECK([assembler .string pseudo-op support], 388 libffi_cv_as_string_pseudo_op, [ 389 libffi_cv_as_string_pseudo_op=unknown 390 # Check if we have .string 391 AC_TRY_COMPILE(,[asm (".string \\"string\\"");], 392 [libffi_cv_as_string_pseudo_op=yes], 393 [libffi_cv_as_string_pseudo_op=no]) 394 ]) 395 if test "x$libffi_cv_as_string_pseudo_op" = xyes; then 396 AC_DEFINE(HAVE_AS_STRING_PSEUDO_OP, 1, 397 [Define if your assembler supports .string.]) 398 fi 399fi 400 401# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. 402AC_ARG_ENABLE(pax_emutramp, 403 [ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC], 404 if test "$enable_pax_emutramp" = "yes"; then 405 AC_DEFINE(FFI_MMAP_EXEC_EMUTRAMP_PAX, 1, 406 [Define this if you want to enable pax emulated trampolines]) 407 fi) 408 409if test x$TARGET = xX86_WIN64; then 410 LT_SYS_SYMBOL_USCORE 411 if test "x$sys_symbol_underscore" = xyes; then 412 AC_DEFINE(SYMBOL_UNDERSCORE, 1, [Define if symbols are underscored.]) 413 fi 414fi 415 416FFI_EXEC_TRAMPOLINE_TABLE=0 417case "$target" in 418 *arm*-apple-darwin*) 419 FFI_EXEC_TRAMPOLINE_TABLE=1 420 AC_DEFINE(FFI_EXEC_TRAMPOLINE_TABLE, 1, 421 [Cannot use PROT_EXEC on this target, so, we revert to 422 alternative means]) 423 ;; 424 *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) 425 AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, 426 [Cannot use malloc on this target, so, we revert to 427 alternative means]) 428 ;; 429esac 430AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1) 431AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE) 432 433if test x$TARGET = xX86_64; then 434 AC_CACHE_CHECK([assembler supports unwind section type], 435 libffi_cv_as_x86_64_unwind_section_type, [ 436 libffi_cv_as_x86_64_unwind_section_type=yes 437 echo '.section .eh_frame,"a",@unwind' > conftest.s 438 if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then 439 libffi_cv_as_x86_64_unwind_section_type=no 440 fi 441 ]) 442 if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then 443 AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1, 444 [Define if your assembler supports unwind section type.]) 445 fi 446fi 447 448if test "x$GCC" = "xyes"; then 449 AC_CACHE_CHECK([whether .eh_frame section should be read-only], 450 libffi_cv_ro_eh_frame, [ 451 libffi_cv_ro_eh_frame=no 452 echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c 453 if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then 454 objdump -h conftest.o > conftest.dump 2>&1 455 libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1` 456 libffi_test_line=`expr $libffi_eh_frame_line + 1`p 457 sed -n $libffi_test_line conftest.dump > conftest.line 458 if grep READONLY conftest.line > /dev/null; then 459 libffi_cv_ro_eh_frame=yes 460 fi 461 fi 462 rm -f conftest.* 463 ]) 464 if test "x$libffi_cv_ro_eh_frame" = xyes; then 465 AC_DEFINE(HAVE_RO_EH_FRAME, 1, 466 [Define if .eh_frame sections should be read-only.]) 467 AC_DEFINE(EH_FRAME_FLAGS, "a", 468 [Define to the flags needed for the .section .eh_frame directive. ]) 469 else 470 AC_DEFINE(EH_FRAME_FLAGS, "aw", 471 [Define to the flags needed for the .section .eh_frame directive. ]) 472 fi 473 474 AC_CACHE_CHECK([for __attribute__((visibility("hidden")))], 475 libffi_cv_hidden_visibility_attribute, [ 476 echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c 477 libffi_cv_hidden_visibility_attribute=no 478 if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then 479 if grep '\.hidden.*foo' conftest.s >/dev/null; then 480 libffi_cv_hidden_visibility_attribute=yes 481 fi 482 fi 483 rm -f conftest.* 484 ]) 485 if test $libffi_cv_hidden_visibility_attribute = yes; then 486 AC_DEFINE(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE, 1, 487 [Define if __attribute__((visibility("hidden"))) is supported.]) 488 fi 489fi 490 491AH_BOTTOM([ 492#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 493#ifdef LIBFFI_ASM 494#define FFI_HIDDEN(name) .hidden name 495#else 496#define FFI_HIDDEN __attribute__ ((visibility ("hidden"))) 497#endif 498#else 499#ifdef LIBFFI_ASM 500#define FFI_HIDDEN(name) 501#else 502#define FFI_HIDDEN 503#endif 504#endif 505]) 506 507AC_SUBST(TARGET) 508AC_SUBST(TARGETDIR) 509 510AC_SUBST(SHELL) 511 512AC_ARG_ENABLE(debug, 513[ --enable-debug debugging mode], 514 if test "$enable_debug" = "yes"; then 515 AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging.]) 516 fi) 517AM_CONDITIONAL(FFI_DEBUG, test "$enable_debug" = "yes") 518 519AC_ARG_ENABLE(structs, 520[ --disable-structs omit code for struct support], 521 if test "$enable_structs" = "no"; then 522 AC_DEFINE(FFI_NO_STRUCTS, 1, [Define this is you do not want support for aggregate types.]) 523 fi) 524AM_CONDITIONAL(FFI_DEBUG, test "$enable_debug" = "yes") 525 526AC_ARG_ENABLE(raw-api, 527[ --disable-raw-api make the raw api unavailable], 528 if test "$enable_raw_api" = "no"; then 529 AC_DEFINE(FFI_NO_RAW_API, 1, [Define this is you do not want support for the raw API.]) 530 fi) 531 532AC_ARG_ENABLE(purify-safety, 533[ --enable-purify-safety purify-safe mode], 534 if test "$enable_purify_safety" = "yes"; then 535 AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.]) 536 fi) 537 538# These variables are only ever used when we cross-build to X86_WIN32. 539# And we only support this with GCC, so... 540if test "x$GCC" = "xyes"; then 541 if test -n "$with_cross_host" && 542 test x"$with_cross_host" != x"no"; then 543 toolexecdir='$(exec_prefix)/$(target_alias)' 544 toolexeclibdir='$(toolexecdir)/lib' 545 else 546 toolexecdir='$(libdir)/gcc-lib/$(target_alias)' 547 toolexeclibdir='$(libdir)' 548 fi 549 multi_os_directory=`$CC -print-multi-os-directory` 550 case $multi_os_directory in 551 .) ;; # Avoid trailing /. 552 ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; 553 esac 554 AC_SUBST(toolexecdir) 555else 556 toolexeclibdir='$(libdir)' 557fi 558AC_SUBST(toolexeclibdir) 559 560AC_CONFIG_COMMANDS(include, [test -d include || mkdir include]) 561AC_CONFIG_COMMANDS(src, [ 562test -d src || mkdir src 563test -d src/$TARGETDIR || mkdir src/$TARGETDIR 564], [TARGETDIR="$TARGETDIR"]) 565 566AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h) 567 568AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc) 569 570AC_OUTPUT 571