summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/at/at-3.1.12/configure.patch
blob: 6ab528d0b21224badbc7e8a9cfdb1fd0fc33eba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Fix cross-compilation issues in configure.ac
# Derived from an OE patch for at-3.1.8

--- at-3.1.12.orig/configure.ac	2009-11-23 07:11:52.000000000 -0800
+++ at-3.1.12/configure.ac	2010-07-20 16:23:14.000000000 -0700
@@ -38,12 +38,11 @@
     AC_MSG_RESULT(no)
     ;;
 esac
+if [ X"${cross_compiling}" = Xno ]; then
 AC_MSG_CHECKING(Trying to compile a trivial ANSI C program)
-AC_TRY_RUN([ main(int ac, char **av) { return 0; } ],
-    AC_MSG_RESULT(yes),
-    AC_MSG_RESULT(no)
-    AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.),
-    AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.))
+AC_RUN_IFELSE([AC_LANG_SOURCE([[ main(int ac, char **av) { return 0; } ]])], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
+    AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)], [AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)])
+fi
 
 AC_MSG_CHECKING(__attribute__((noreturn)))
 AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);],