[2.28] add niepce
[jhbuild.git] / patches / nspr.config_64bits.patch
blob0b6043c6af1684bdbc3bbb078e7c44afb1faf1cf
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 30_config_64bits.dpatch by <glandium@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Add autodetection for 64 bits hosts. bz#375281.
7 @DPATCH@
9 --- nspr/mozilla/nsprpub/configure.in
10 +++ nspr/mozilla/nsprpub/configure.in
11 @@ -57,7 +57,7 @@
12 USE_USER_PTHREADS=
13 USE_NSPR_THREADS=
14 USE_N32=
15 -USE_64=
16 +USE_64=maybe
17 USE_CPLUS=
18 USE_IPV6=
19 USE_MDUPDATE=
20 @@ -222,11 +222,26 @@
21 fi ])
23 AC_ARG_ENABLE(64bit,
24 - [ --enable-64bit Enable 64-bit support (on certain platforms)],
25 - [ if test "$enableval" = "yes"; then
26 - USE_64=1
27 + [ --disable-64bit Disable 64-bit support (on 64-bit platforms)],
28 + [ if test "$enableval" = "no"; then
29 + USE_64=
30 + else
31 + USE_64=1
32 fi ])
34 +if test "${USE_64}"; then
35 + AC_MSG_CHECKING(for 64-bit OS)
36 + AC_TRY_COMPILE([],[int assert[(sizeof(long) == 8) ? 1: -1]],
37 + result="yes", result="no")
38 + AC_MSG_RESULT("$result")
39 + if test "$result" = "no" && test "$USE_64" = 1; then
40 + AC_MSG_ERROR([Can't --enable-64bit on non 64-bit platforms])
41 + fi
42 + if test "$result" = "yes"; then
43 + USE_64=1
44 + fi
45 +fi
47 AC_ARG_ENABLE(mdupdate,
48 [ --enable-mdupdate Enable use of certain compilers' mdupdate feature],
49 [ if test "$enableval" = "yes"; then