[btls] Fix i386 build on Linux by setting -arch on Darwin only
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 2 Oct 2016 22:33:15 +0000 (00:33 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 2 Oct 2016 22:33:15 +0000 (00:33 +0200)
The -arch option is an Apple extension, it caused failures on i386 Linux: "unrecognized command line option '-arch'"

configure.ac

index 27a9d324991397c393a3225f2446afd313e59619..f79f320c00987585a5cbd6f560ac52708b967cf2 100644 (file)
@@ -3937,7 +3937,11 @@ if test "x$enable_btls" = "xyes"; then
        case "$BTLS_PLATFORM" in
        i386)
                btls_arch=i386
-               btls_cflags="-m32 -arch i386"
+               btls_cflags="-m32"
+               case $host_os in
+                       darwin*)
+                               btls_cflags="$btls_cflags -arch i386"
+               esac
                ;;
        x86_64)
                btls_arch=x86_64