]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ntp/files/configure.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ntp / files / configure.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- ntp-4.1.2/./configure.in~configure
7 +++ ntp-4.1.2/./configure.in
8 @@ -1,12 +1,13 @@
9  dnl -*-fundamental-*-
10  dnl Process this file with autoconf to produce a configure script.
11 -AC_INIT(ntpd/ntp_refclock.c)
12 -AC_CANONICAL_SYSTEM
13 +AC_INIT
14 +AC_CONFIG_SRCDIR([ntpd/ntp_refclock.c])
15 +AC_CANONICAL_TARGET([])
16  AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) string])
17  AM_CONFIG_HEADER(config.h)
18  AC_ARG_PROGRAM
19  AM_INIT_AUTOMAKE(ntp, 4.1.2)
20 -AC_PREREQ(2.53)
21 +AC_PREREQ(2.57)
22  
23  ac_cv_var_atom_ok=no
24  ac_cv_var_oncore_ok=no
25 @@ -22,7 +23,7 @@
26  
27  dnl  we need to check for cross compile tools for vxWorks here
28  AC_PROG_CC
29 -AC_PROG_CC_STDC
30 +
31  AC_PROG_CPP
32  
33  case "$host" in
34 @@ -294,19 +295,15 @@
35  AC_CHECK_HEADER(nlist.h,
36  [AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
37  AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
38 -[AC_TRY_COMPILE([#include <nlist.h>],
39 -[struct nlist n; n.n_un.n_name = 0;],
40 -ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
41 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]], [[struct nlist n; n.n_un.n_name = 0;]])],[ac_cv_struct_nlist_n_un=yes],[ac_cv_struct_nlist_n_un=no])])
42  if test $ac_cv_struct_nlist_n_un = yes; then
43    AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
44  fi
45  ])dnl
46  
47  AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
48 -[AC_TRY_COMPILE([],[
49 -volatile int x;],
50 -       ac_cv_c_volatile=yes,
51 -       ac_cv_c_volatile=no)
52 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
53 +volatile int x;]])],[ac_cv_c_volatile=yes],[ac_cv_c_volatile=no])
54  ])
55  case "$ac_cv_c_volatile" in
56   yes)
57 @@ -324,10 +321,10 @@
58      ;;
59  esac
60  AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
61 -[AC_TRY_COMPILE([
62 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
63  extern int foo (short);
64 -int foo(short i) { return i; }],[
65 -int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
66 +int foo(short i) { return i; }]], [[
67 +int i;]])],[ac_cv_have_prototypes=yes],[ac_cv_have_prototypes=no])
68  ])
69  if test "$ac_cv_have_prototypes" = yes; then
70    AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
71 @@ -376,9 +373,8 @@
72  esac
73  
74  dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
75 -dnl [AC_TRY_LINK([#include <sys/types.h>
76 -dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
77 -dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
78 +dnl [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
79 +dnl #include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[dnl ac_cv_func_ut_host_in_utmp=yes],[ac_cv_func_ut_host_in_utmp=no])])
80  dnl if test $su_cv_func_ut_host_in_utmp = yes; then
81  dnl   AC_DEFINE(HAVE_UT_HOST)
82  dnl fi
83 @@ -401,12 +397,8 @@
84    struct sigaction for sa_sigaction,
85    ac_cv_struct_sigaction_has_sa_sigaction,
86    [
87 -    AC_TRY_COMPILE(
88 -      [#include <signal.h>],
89 -      [struct sigaction act; act.sa_sigaction = 0;],
90 -      ac_cv_struct_sigaction_has_sa_sigaction=yes,
91 -      ac_cv_struct_sigaction_has_sa_sigaction=no
92 -    )
93 +    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], [[struct sigaction act; act.sa_sigaction = 0;]])],[ac_cv_struct_sigaction_has_sa_sigaction=yes],[ac_cv_struct_sigaction_has_sa_sigaction=no
94 +    ])
95    ]
96  )
97  if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
98 @@ -414,7 +406,7 @@
99  fi
100  
101  AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
102 -[AC_TRY_COMPILE([
103 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
104  #include <sys/types.h>
105  #ifdef HAVE_SYS_TERMIOS_H
106  # include <sys/termios.h>
107 @@ -424,24 +416,20 @@
108  #endif
109  #ifdef HAVE_SYS_PPSCLOCK_H
110  # include <sys/ppsclock.h>
111 -#endif],[
112 +#endif]], [[
113  extern struct ppsclockev *pce;
114 -return pce->serial;],
115 -       ac_cv_struct_ppsclockev=yes,
116 -       ac_cv_struct_ppsclockev=no)
117 +return pce->serial;]])],[ac_cv_struct_ppsclockev=yes],[ac_cv_struct_ppsclockev=no])
118  ])
119  if test $ac_cv_struct_ppsclockev = yes; then
120      AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
121  fi
122  
123  AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
124 -[AC_TRY_COMPILE([
125 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
126  #include <sys/types.h>
127 -#include <sys/socket.h>],[
128 +#include <sys/socket.h>]], [[
129  extern struct sockaddr *ps;
130 -return ps->sa_len;],
131 -       ac_cv_struct_sockaddr_has_sa_len=yes,
132 -       ac_cv_struct_sockaddr_has_sa_len=no)
133 +return ps->sa_len;]])],[ac_cv_struct_sockaddr_has_sa_len=yes],[ac_cv_struct_sockaddr_has_sa_len=no])
134  ])
135  if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
136      AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
137 @@ -450,17 +438,15 @@
138  case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
139    *yes*)
140      AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size,
141 -[AC_TRY_COMPILE([
142 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
143  #ifdef HAVE_MACHINE_SOUNDCARD_H
144  # include <machine/soundcard.h>
145  #endif
146  #ifdef HAVE_SYS_SOUNDCARD_H
147  # include <sys/soundcard.h>
148 -#endif],[
149 +#endif]], [[
150  extern struct snd_size *ss;
151 -return ss->rec_size;],
152 -    ac_cv_struct_snd_size=yes,
153 -    ac_cv_struct_snd_size=no)
154 +return ss->rec_size;]])],[ac_cv_struct_snd_size=yes],[ac_cv_struct_snd_size=no])
155  ])
156      case "$ac_cv_struct_snd_size" in
157       yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;;
158 @@ -469,31 +455,27 @@
159  esac
160  
161  AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
162 -[AC_TRY_COMPILE([
163 -#include <sys/time.h>],[
164 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
165 +#include <sys/time.h>]], [[
166  extern struct clockinfo *pc;
167 -return pc->hz;],
168 -       ac_cv_struct_clockinfo_has_hz=yes,
169 -       ac_cv_struct_clockinfo_has_hz=no)
170 +return pc->hz;]])],[ac_cv_struct_clockinfo_has_hz=yes],[ac_cv_struct_clockinfo_has_hz=no])
171  ])
172  if test $ac_cv_struct_clockinfo_has_hz = yes; then
173      AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
174  fi
175  
176  AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
177 -[AC_TRY_COMPILE([
178 -#include <sys/time.h>],[
179 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
180 +#include <sys/time.h>]], [[
181  extern struct clockinfo *pc;
182 -return pc->tickadj;],
183 -       ac_cv_struct_clockinfo_has_tickadj=yes,
184 -       ac_cv_struct_clockinfo_has_tickadj=no)
185 +return pc->tickadj;]])],[ac_cv_struct_clockinfo_has_tickadj=yes],[ac_cv_struct_clockinfo_has_tickadj=no])
186  ])
187  if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
188      AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
189  fi
190  
191  AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
192 -[AC_TRY_COMPILE([
193 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
194  #include <sys/time.h>
195  /* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
196  #ifdef HAVE_ERRNO_H
197 @@ -502,19 +484,15 @@
198  #ifdef HAVE_SYS_TIMEPPS_H
199  # define FRAC 4294967296
200  # include <sys/timepps.h>
201 -#endif],
202 -[struct timespec n;],
203 -ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
204 +#endif]], [[struct timespec n;]])],[ac_cv_struct_timespec=yes],[ac_cv_struct_timespec=no])])
205  if test $ac_cv_struct_timespec = yes; then
206    AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
207  fi
208  
209  AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
210 -[AC_TRY_COMPILE([
211 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
212  #include <sys/time.h>
213 -#include <sys/timex.h>],
214 -[struct ntptimeval n;],
215 -ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
216 +#include <sys/timex.h>]], [[struct ntptimeval n;]])],[ac_cv_struct_ntptimeval=yes],[ac_cv_struct_ntptimeval=no])])
217  if test $ac_cv_struct_ntptimeval = yes; then
218    AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
219  fi
220 @@ -575,7 +553,7 @@
221         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
222         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
223         # IBM pulls its thumbs out long enough to implement clock_settime,
224 -       # this conditional will need to change.  Maybe use AC_TRY_RUN
225 +       # this conditional will need to change.  Maybe use AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[])
226         # instead to try to set the time to itself and check errno.
227      ;;
228   *) AC_CHECK_FUNCS(clock_gettime clock_settime)
229 @@ -587,10 +565,8 @@
230      [AC_MSG_CHECKING(for isfinite with <math.h>)
231      _libs=$LIBS
232      LIBS="$LIBS -lm"
233 -    AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
234 -      [AC_MSG_RESULT(yes)
235 -      AC_DEFINE(HAVE_ISFINITE)],
236 -      AC_MSG_RESULT(no))
237 +    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isfinite(f)]])],[AC_MSG_RESULT(yes)
238 +      AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])
239      LIBS=$_libs])])
240  AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage)
241  AC_CHECK_FUNC(gettimeofday, ,[
242 @@ -691,26 +667,24 @@
243  AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf)
244  
245  AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
246 -[AC_TRY_COMPILE([#include <sys/time.h>],[
247 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[
248  gettimeofday((struct timeval*)0,(struct timezone*)0);
249  settimeofday((struct timeval*)0,(struct timezone*)0);
250 -],
251 -       ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
252 +]])],[ac_cv_func_Xettimeofday_nargs=2],[ac_cv_func_Xettimeofday_nargs=1])
253  ])
254  if test $ac_cv_func_Xettimeofday_nargs = 1; then
255         AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
256  fi
257  
258  AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
259 -[AC_TRY_COMPILE([
260 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
261  #ifdef HAVE_SYS_TYPES_H
262  # include <sys/types.h>
263  #endif
264  #ifdef HAVE_UNISTD_H
265  # include <unistd.h>
266  #endif
267 -],[setpgrp(0,0);],
268 -        ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
269 +]], [[setpgrp(0,0);]])],[ac_cv_func_setpgrp_nargs=2],[ac_cv_func_setpgrp_nargs=0])
270  ])
271  if test $ac_cv_func_setpgrp_nargs = 0; then
272          AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
273 @@ -721,7 +695,7 @@
274  
275  AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
276  ac_cv_func_qsort_argtype,
277 -[AC_TRY_COMPILE([
278 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
279  #include "l_stdlib.h"
280  
281  #ifdef HAVE_PROTOTYPES
282 @@ -735,10 +709,9 @@
283  int sortfunc(a, b)
284    const void *a;
285    const void *b; { return 0; }
286 -],[
287 +]], [[
288  qsort(base, 2, sizeof(char *), sortfunc);
289 -],
290 -       ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
291 +]])],[ac_cv_func_qsort_argtype=void],[ac_cv_func_qsort_argtype=char])
292  ])
293  case "$ac_cv_func_qsort_argtype" in
294   void)
295 @@ -749,11 +722,9 @@
296  CFLAGS=$save_CFLAGS
297  
298  AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
299 -[AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
300 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_ERRNO_H
301  #include <errno.h>
302 -#endif],
303 -  [errno = 0;],
304 -  ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
305 +#endif]], [[errno = 0;]])],[ac_cv_decl_errno=no],[ac_cv_decl_errno=yes])])
306  case "$ac_cv_decl_errno" in
307   yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
308  esac
309 @@ -767,7 +738,7 @@
310  dnl without breaking any other platforms.
311  dnl
312  AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
313 -[AC_TRY_COMPILE([#include <sys/types.h>
314 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
315  #ifdef HAVE_NETINET_IN_H
316  #include <netinet/in.h>
317  #endif
318 @@ -779,28 +750,24 @@
319  #endif
320  #ifdef HAVE_RESOLV_H
321  #include <resolv.h>
322 -#endif],
323 -  [extern int h_errno;],
324 -  ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
325 +#endif]], [[extern int h_errno;]])],[ac_cv_decl_h_errno=yes],[ac_cv_decl_h_errno=no])])
326  case "$ac_cv_decl_h_errno" in
327   yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
328  esac
329  
330  dnl See if char *sys_errlist[] is OK.
331  AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
332 -[AC_TRY_COMPILE([#include <stdio.h>
333 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
334  #ifdef HAVE_ERRNO_H
335  #include <errno.h>
336 -#endif],
337 -  [extern char *sys_errlist[];
338 -],
339 -  ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
340 +#endif]], [[extern char *sys_errlist[];
341 +]])],[ac_cv_decl_sys_errlist=yes],[ac_cv_decl_sys_errlist=no])])
342  case "$ac_cv_decl_sys_errlist" in
343   yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
344  esac
345  
346  AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
347 -[AC_TRY_COMPILE([
348 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
349  #ifdef HAVE_SYS_TYPES_H
350  # include <sys/types.h>
351  #endif
352 @@ -812,9 +779,7 @@
353  #else
354  #define P(x) ()
355  #endif
356 -],
357 -  [extern int syscall P((int, ...));],
358 -  ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
359 +]], [[extern int syscall P((int, ...));]])],[ac_cv_decl_syscall=yes],[ac_cv_decl_syscall=no])])
360  case "$ac_cv_decl_syscall" in
361   yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
362  esac