OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / libffi / configure.ac
index 2c67335..c810b85 100644 (file)
@@ -12,7 +12,7 @@ target_alias=${target_alias-$host_alias}
 
 . ${srcdir}/configure.host
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([no-dist])
 
 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
 # We must force CC to /not/ be precious variables; otherwise
@@ -99,7 +99,7 @@ case "$host" in
        TARGET=X86_64; TARGETDIR=x86
        ;;
   i?86-*-*)
-       TARGET=X86; TARGETDIR=x86
+       TARGET=X86_64; TARGETDIR=x86
        ;;
 
   ia64*-*-*)
@@ -166,6 +166,15 @@ case "$host" in
 
   x86_64-*-cygwin* | x86_64-*-mingw*)
        TARGET=X86_WIN64; TARGETDIR=x86
+       # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
+       # We must also check with_cross_host to decide if this is a native
+       # or cross-build and select where to install dlls appropriately.
+       if test -n "$with_cross_host" &&
+          test x"$with_cross_host" != x"no"; then
+         AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
+       else
+         AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
+       fi
        ;;
 
   x86_64-*-*)