~ubuntu-branches/debian/squeeze/ntp/squeeze

« back to all changes in this revision

Viewing changes to .pc/dfsg.patch/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-05-24 11:09:51 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524110951-1o7gh469ygochf4n
Tags: 1:4.2.6.p1+dfsg-1
* New upstream version
  - They no longer ship arlib, adjust dfsg.patch.
  - Drop kfreebsd.patch, applied upstream
  - Update patches for upstream changes.
* Remove the obsolete config files:

  for ntp:
  - /etc/logcheck/ignore.d.server/ntp, removed in 1:4.2.6+dfsg-1
  - /etc/dhcp3/dhclient-enter-hooks.d/ntp, replaced by exit hooks in
    1:4.2.4p4+dfsg-3
  - /etc/network/if-up.d/ntp, removed in 1:4.2.4p0+dfsg-1

  for ntpdate:
  - /etc/dhcp3/dhclient-enter-hooks.d/ntpdate, replaced by exit hooks in
    1:4.2.4p4+dfsg-3

  Use dpkg 1.15.7.2's dpkg-maintscript-helper.  This needs
  a Pre-Depends to work, else it's never going to be removed.
  (Closes: #569530)
* Add "Depends: ${misc:Depends}" to ntp-doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
85
85
case "$host" in
86
 
 *-*-amigaos)
87
 
    CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
88
 
    ;;
89
 
 *-*-hpux10.*)  # at least for hppa2.0-hp-hpux10.20
90
 
    case "$GCC" in
91
 
     yes)
92
 
        ;;
93
 
     *) CFLAGS="$CFLAGS -Wp,-H18816"
94
 
        ;;
95
 
    esac
96
 
    ;;
97
86
 *-pc-cygwin*)
98
87
    CFLAGS="$CFLAGS -DSYS_CYGWIN32"
99
88
    ;;
119
108
    ;;
120
109
esac
121
110
 
122
 
AMU_OS_CFLAGS
 
111
NTP_OS_CFLAGS
123
112
NTP_DIR_SEP
124
113
NTP_VPATH_HACK
125
114
 
222
211
    ;;
223
212
esac
224
213
AC_MSG_RESULT($use_binsubdir)
 
214
 
225
215
BINSUBDIR=$use_binsubdir
226
216
AC_SUBST(BINSUBDIR)
 
217
AM_CONDITIONAL(NTP_BINSUBDIR_IS_BIN, test "bin" = "$BINSUBDIR")
227
218
 
228
 
AC_MSG_CHECKING([if we want to use arlib])
229
 
AC_ARG_WITH(arlib,
230
 
        AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
 
219
AC_MSG_CHECKING([for deprecated --with-arlib])
 
220
AC_ARG_WITH([arlib],
 
221
        AC_HELP_STRING([--with-arlib], [- deprecated, arlib not distributed]),
231
222
        [ans=$withval], [ans=no])
232
223
AC_MSG_RESULT([$ans])
233
224
 
234
 
if test -d $srcdir/arlib
235
 
then
236
 
    case "$ans" in
237
 
     yes)
238
 
        ARLIB_DIR=arlib
239
 
        AC_CONFIG_SUBDIRS(arlib)
240
 
        ;;
241
 
    esac
242
 
fi
243
 
AC_SUBST(ARLIB_DIR)
 
225
case "$ans" in
 
226
 yes)
 
227
    AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included.  In the future, --with-arlib will not be recognized.])
 
228
esac
244
229
 
245
230
AC_ARG_WITH(rpath,
246
231
        AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
274
259
    ;;
275
260
esac
276
261
 
277
 
case "$build" in
278
 
 $host)
279
 
    ;;
280
 
 *) case "$host" in
281
 
     *-*-vxworks*)
282
 
        # Quick and dirty sanity check
283
 
        case "$VX_KERNEL" in
284
 
         '') AC_MSG_ERROR(Please follow the directions in html/build/hints/vxworks.html!)
285
 
            ;;
286
 
        esac
287
 
        CFLAGS="$CFLAGS -DSYS_VXWORKS"
288
 
        ;;
289
 
    esac
290
 
    ;;
291
 
esac
292
 
 
293
262
dnl  we need to check for cross compile tools for vxWorks here
294
263
AC_PROG_AWK
295
264
AC_PROG_MAKE_SET
318
287
     yes)
319
288
        CFLAGS="$CFLAGS -Wstrict-overflow"
320
289
    esac
321
 
    # if building with OpenSSL, -Wno-strict-prototypes is added later
322
 
esac
323
 
 
324
 
case "$host" in
325
 
 *-next-nextstep3)
326
 
    CFLAGS="$CFLAGS -posix"
327
 
    ;;
328
 
dnl This is currently commented out by bor. 
329
 
dnl The new versions of ReliantUNIX round adjtime() interval down
330
 
dnl to 1/100s (system tick). This makes tickadj actually useless.
331
 
dnl So, I'd better not use additional flags.
332
 
dnl I leave it here just in case anybody has better idea
333
 
dnl  mips-sni-sysv4* )
334
 
dnl     #
335
 
dnl     # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
336
 
dnl     #
337
 
dnl     if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
338
 
dnl       CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
339
 
dnl     fi
340
 
dnl     ;;
 
290
    # -W[no-]strict-prototypes is added later depending on OpenSSL
341
291
esac
342
292
 
343
293
ac_busted_vpath_in_make=no
456
406
 
457
407
AC_SEARCH_LIBS([setsockopt], [socket xnet])
458
408
AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
 
409
case "$host" in
 
410
 *-*-darwin*)
 
411
    AC_CHECK_LIB([resolv],[res_9_init])
 
412
    ;;
 
413
esac
 
414
AC_HEADER_RESOLV
459
415
AC_CHECK_FUNCS(res_init __res_init)
460
416
 
461
417
AC_HEADER_STDC
780
736
 *-*-sunos4*)
781
737
    ac_cv_var_override_hz=yes
782
738
    ;;
 
739
 *-*-kfreebsd*)
 
740
    ac_cv_var_override_hz=yes
 
741
    ;;
783
742
esac])
784
743
case "$ac_cv_var_override_hz" in
785
744
 yes)
822
781
 
823
782
AC_CACHE_CHECK([for struct rtattr], ac_cv_struct_rtattr,
824
783
[AC_TRY_COMPILE([
 
784
#include <stddef.h>
825
785
#include <linux/rtnetlink.h>],
826
786
[struct rtattr p;],
827
787
        ac_cv_struct_rtattr=yes,
1897
1857
     *-*-unicosmp*)
1898
1858
        ans=no
1899
1859
        ;;
 
1860
     *-*-kfreebsd*)
 
1861
        ans=no
 
1862
        ;;
1900
1863
    esac
1901
1864
    ;;
1902
1865
esac
1965
1928
     *-*-unicosmp*)
1966
1929
        ans=no
1967
1930
        ;;
 
1931
     *-*-kfreebsd*)
 
1932
        ans=no
 
1933
        ;;
1968
1934
     *) ans=yes
1969
1935
        ;;
1970
1936
    esac
2016
1982
     *-*-unicosmp*)
2017
1983
        ans=no
2018
1984
        ;;
 
1985
     *-*-kfreebsd*)
 
1986
        ans=no
 
1987
        ;;
2019
1988
     *) ans=yes
2020
1989
        ;;
2021
1990
    esac
2175
2144
 yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
2176
2145
esac
2177
2146
 
2178
 
AC_CACHE_CHECK([for kernel multicast support], ac_cv_var_mcast,
2179
 
  [ac_cv_var_mcast=no
2180
 
  case "$host" in
2181
 
   i386-sequent-sysv4) ;;
2182
 
   *) AC_EGREP_CPP(yes,
2183
 
  [#include <netinet/in.h>
2184
 
#ifdef IP_ADD_MEMBERSHIP
2185
 
   yes
2186
 
#endif
2187
 
  ], ac_cv_var_mcast=yes) ;;
2188
 
  esac])
2189
 
case "$ac_cv_var_mcast" in
 
2147
AC_CACHE_CHECK(
 
2148
    [for multicast IP support],
 
2149
    ntp_cv_multicast,
 
2150
    [
 
2151
        ntp_cv_multicast=no
 
2152
        case "$host" in
 
2153
         i386-sequent-sysv4)
 
2154
            ;;
 
2155
         *)
 
2156
            AC_COMPILE_IFELSE(
 
2157
                AC_LANG_PROGRAM(
 
2158
                    [
 
2159
                        #ifdef HAVE_NETINET_IN_H
 
2160
                        #include <netinet/in.h>
 
2161
                        #endif
 
2162
                    ],
 
2163
                    [
 
2164
                        struct ip_mreq ipmr;
 
2165
                        ipmr.imr_interface.s_addr = 0;
 
2166
                    ]
 
2167
                ),
 
2168
                [ntp_cv_multicast=yes],
 
2169
                []
 
2170
            )
 
2171
        esac
 
2172
    ]
 
2173
)
 
2174
 
 
2175
case "$ntp_cv_multicast" in
2190
2176
 yes)
2191
 
    AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?])
2192
 
    AC_CACHE_CHECK([[arg type needed for IP*_MULTICAST_LOOP for setsockopt()]],
2193
 
        ac_cv_var_typeof_ip_multicast_loop,
2194
 
        [case "$host" in
2195
 
         *-*-netbsd*|*-*-*linux*)
2196
 
            ac_cv_var_typeof_ip_multicast_loop=u_int
2197
 
            ;;
2198
 
         *-*-winnt*)
2199
 
            ac_cv_var_typeof_ip_multicast_loop=BOOL
2200
 
            ;;
2201
 
         *) ac_cv_var_typeof_ip_multicast_loop=u_char
2202
 
            ;;
2203
 
        esac])
2204
 
    AC_DEFINE_UNQUOTED(TYPEOF_IP_MULTICAST_LOOP,
2205
 
                   $ac_cv_var_typeof_ip_multicast_loop,
2206
 
                   [What type to use for setsockopt])
2207
 
    ;;
 
2177
    AC_DEFINE(MCAST, 1, [Does the target support multicast IP?])
 
2178
    AC_CACHE_CHECK(
 
2179
        [[arg type needed for setsockopt() IP*_MULTICAST_LOOP]],
 
2180
        ntp_cv_typeof_ip_multicast_loop,
 
2181
        [
 
2182
            case "$host" in
 
2183
             *-*-netbsd*|*-*-*linux*)
 
2184
                ntp_cv_typeof_ip_multicast_loop=u_int
 
2185
                ;;
 
2186
             *-*-winnt*)
 
2187
                ntp_cv_typeof_ip_multicast_loop=BOOL
 
2188
                ;;
 
2189
             *)
 
2190
                ntp_cv_typeof_ip_multicast_loop=u_char
 
2191
            esac
 
2192
        ]
 
2193
    )
 
2194
    AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
 
2195
        $ntp_cv_typeof_ip_multicast_loop,
 
2196
        [What type to use for setsockopt]
 
2197
    )
2208
2198
esac
2209
2199
 
2210
2200
AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
3368
3358
esac
3369
3359
 
3370
3360
#
3371
 
# OpenSSL has a number of callback prototypes inside other function
3372
 
# prototypes which trigger copious warnings with -Wstrict-prototypes,
3373
 
# (which is included in -Wall).
 
3361
# Older OpenSSL headers have a number of callback prototypes inside
 
3362
# other function prototypes which trigger copious warnings with gcc's
 
3363
# -Wstrict-prototypes, which is included in -Wall.
3374
3364
#
3375
3365
# An example:
3376
3366
#
3377
3367
# int i2d_RSA_NET(const RSA *a, unsigned char **pp, 
3378
 
#                 int (*cb)(), int sgckey);
3379
 
#                 ^^^^^^^^^^^
3380
 
#
3381
 
# The OpenSSL headers probably haven't been fixed in this regard
3382
 
# due to the hoops you have to jump through to stay compatible with
3383
 
# K&R C compilers.
3384
 
#
 
3368
#                 int (*cb)(), int sgckey);
 
3369
#                 ^^^^^^^^^^^
 
3370
#
 
3371
 
3372
#
 
3373
openssl_triggers_warnings=unknown
 
3374
SAVED_CFLAGS="$CFLAGS"
 
3375
 
3385
3376
case "$GCC$ntp_openssl" in
3386
3377
 yesyes)
3387
 
    CFLAGS="$CFLAGS -Wno-strict-prototypes"
 
3378
    CFLAGS="$CFLAGS -Werror"
 
3379
    AC_COMPILE_IFELSE(
 
3380
        AC_LANG_SOURCE([[ /* see if -Werror breaks gcc */ ]]),
 
3381
        [gcc_handles_Werror=yes],
 
3382
        [gcc_handles_Werror=no]
 
3383
    )
 
3384
    case "$gcc_handles_Werror" in
 
3385
     no)
 
3386
        # if this gcc doesn't do -Werror go ahead and use
 
3387
        # -Wstrict-prototypes.
 
3388
        openssl_triggers_warnings=yes
 
3389
        ;;
 
3390
     yes)
 
3391
        CFLAGS="$CFLAGS -Wstrict-prototypes"
 
3392
        AC_COMPILE_IFELSE(
 
3393
            AC_LANG_PROGRAM(
 
3394
                [[
 
3395
                    #include "openssl/asn1_mac.h"
 
3396
                    #include "openssl/bn.h"
 
3397
                    #include "openssl/err.h"
 
3398
                    #include "openssl/evp.h"
 
3399
                    #include "openssl/pem.h"
 
3400
                    #include "openssl/rand.h"
 
3401
                    #include "openssl/x509v3.h"
 
3402
                ]],
 
3403
                [[ /* empty body */ ]]
 
3404
            ),
 
3405
            [openssl_triggers_warnings=no],
 
3406
            [openssl_triggers_warnings=yes]
 
3407
        )
 
3408
    esac
 
3409
    case "$openssl_triggers_warnings" in
 
3410
     yes)
 
3411
        CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
 
3412
        ;;
 
3413
     *)
 
3414
        CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
 
3415
    esac
 
3416
    ;;
 
3417
 yesno)
 
3418
    # gcc without OpenSSL
 
3419
    CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
3388
3420
esac
3389
3421
 
3390
3422
AC_MSG_CHECKING([if we want to compile with ElectricFence])
4495
4527
 
4496
4528
case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
4497
4529
 yesyes)
4498
 
    ntp_have_linuxcaps=yes
 
4530
    case "$host" in
 
4531
     mips-sgi-irix*)
 
4532
        ntp_have_linuxcaps=no
 
4533
        ;;
 
4534
     *) ntp_have_linuxcaps=yes
 
4535
        ;;
 
4536
    esac
4499
4537
    ;;
4500
4538
 *)
4501
4539
    ntp_have_linuxcaps=no