summaryrefslogtreecommitdiff
path: root/at/at-3.1.8/configure.patch
blob: af94e25dc2025735efd362ec5d016459e2132f50 (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
47
48
49
50
51
52
53
54

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- at-3.1.8/./configure.in~configure
+++ at-3.1.8/./configure.in
@@ -1,9 +1,10 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(at.c)
+AC_INIT
+AC_CONFIG_SRCDIR([at.c])
 AC_PREFIX_DEFAULT(/usr)
 AC_CONFIG_HEADER(config.h)
-AC_PREREQ(2.7)
+AC_PREREQ(2.57)
 
 
 VERSION="3.1.8"
@@ -38,19 +39,16 @@
     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);],
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_ATTRIBUTE_NORETURN),
-    AC_MSG_RESULT(no)
-)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])],[AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_ATTRIBUTE_NORETURN)],[AC_MSG_RESULT(no)
+])
 dnl Checks for libraries.
 
 AC_CHECK_LIB(fl,yywrap,
@@ -315,4 +313,5 @@
 )
 AC_SUBST(DAEMON_GROUPNAME)
 
-AC_OUTPUT(Makefile atrun atd.8 atrun.8 at.1 batch)
+AC_CONFIG_FILES([Makefile atrun atd.8 atrun.8 at.1 batch])
+AC_OUTPUT