summaryrefslogtreecommitdiff
path: root/multimedia/libmpeg2/patches/patch-configure.ac
blob: c374800bc98fe51041f133a61a1f6fb8aa2322f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-configure.ac,v 1.1 2022/09/25 14:43:27 he Exp $

--- configure.ac.orig	2008-07-18 14:30:17.000000000 +0000
+++ configure.ac
@@ -41,7 +41,7 @@ elif test x"$GCC" = x"yes"; then
     changequote(<<,>>)
     TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"`
     changequote([,])
-    TRY_CFLAGS="$TRY_CFLAGS -O3"
+    TRY_CFLAGS="$TRY_CFLAGS $CFLAGS"
     AC_TRY_CFLAGS([$TRY_CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
 
     AC_ARG_ENABLE([debug],
@@ -78,15 +78,15 @@ elif test x"$GCC" = x"yes"; then
 		[save_CFLAGS="$CFLAGS"
 		 CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
 		 AC_MSG_CHECKING([if <altivec.h> is needed])
-		 AC_TRY_COMPILE([],
-		    [typedef vector int t;
-		     vec_ld(0, (unsigned char *)0);],
-		    [have_altivec=yes; AC_MSG_RESULT(no)],
-		    [AC_TRY_COMPILE([#include <altivec.h>],
+		 [AC_TRY_COMPILE([#include <altivec.h>],
 			[typedef vector int t; vec_ld(0, (unsigned char *)0);],
 			[AC_DEFINE([HAVE_ALTIVEC_H],,
 			    [Define to 1 if you have the <altivec.h> header.])
 			 have_altivec=yes; AC_MSG_RESULT(yes)],
+			 AC_TRY_COMPILE([],
+			    [typedef vector int t;
+			     vec_ld(0, (unsigned char *)0);],
+			    [have_altivec=yes; AC_MSG_RESULT(no)],
 			[AC_MSG_RESULT(unsupported)])])
 		 CFLAGS="$save_CFLAGS"])
 	    if test "$have_altivec" = "yes"; then