summaryrefslogtreecommitdiff
path: root/packages/liboil/liboil-0.3.15/autotools.patch
blob: bbd4cbb2508458f6862661b50fe538bcb18c653c (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
35
36
37
38
39
40
41
42
43
44
45
46
Index: liboil-0.3.15/configure.ac
===================================================================
--- liboil-0.3.15.orig/configure.ac	2008-07-01 06:45:53.000000000 +0200
+++ liboil-0.3.15/configure.ac	2008-09-24 20:37:24.963143501 +0200
@@ -187,15 +187,33 @@
     true)
 fi
 
-if test x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes ; then
-  AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"],
-    [VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"],
-    true)
-  #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"],
-  #  [VFP_CFLAGS="$VFP_CFLAGS -mfloat-abi=softfp"],
-  #  true)
+dnl macro taken from cacao
+dnl check if softfloat should be used
+
+AC_DEFUN([AC_CHECK_SOFTFLOAT],[
+AC_MSG_CHECKING(whether softfloat should be used)
+AC_ARG_ENABLE([softfloat],
+              [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
+              [case "${enableval}" in
+                  yes)
+                      ENABLE_SOFTFLOAT=yes
+                      ;;
+                  *)
+                      ENABLE_SOFTFLOAT=no
+                      ;;
+              esac],
+              [ENABLE_SOFTFLOAT=no])
+AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
+
+if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
+	VFP_CFLAGS="$VFP_CFLAGS -mfloat-abi=softfp"
+else
+	VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"
 fi
-AC_SUBST(VFP_CFLAGS)
+AC_SUBST([VFP_CFLAGS])
+])
+
+AC_CHECK_SOFTFLOAT
 
 #AS_COMPILER_FLAG(["-fasm-blocks"], HAVE_ASM_BLOCKS=yes, HAVE_ASM_BLOCKS=no)
 HAVE_ASM_BLOCKS=no