~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# Set VERSION so we only need to edit in one place (i.e., here)
7
7
m4_define(PYTHON_VERSION, 2.6)
8
8
 
9
 
AC_REVISION($Revision: 75132 $)
 
9
AC_REVISION($Revision: 78820 $)
10
10
AC_PREREQ(2.61)
11
11
AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
12
12
AC_CONFIG_SRCDIR([Include/object.h])
69
69
AC_SUBST(CONFIG_ARGS)
70
70
CONFIG_ARGS="$ac_configure_args"
71
71
 
 
72
AC_MSG_CHECKING([for --enable-universalsdk])
72
73
AC_ARG_ENABLE(universalsdk,
73
74
        AC_HELP_STRING(--enable-universalsdk@<:@=SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)),
74
75
[
75
76
        case $enableval in
76
77
        yes)
77
78
                enableval=/Developer/SDKs/MacOSX10.4u.sdk
 
79
                if test ! -d "${enableval}"
 
80
                then
 
81
                        enableval=/
 
82
                fi
78
83
                ;;
79
84
        esac
80
85
        case $enableval in
84
89
                ;;
85
90
        *)
86
91
                UNIVERSALSDK=$enableval
 
92
                if test ! -d "${UNIVERSALSDK}"
 
93
                then
 
94
                        AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
 
95
                fi
87
96
                ;;
88
97
        esac
 
98
        
89
99
],[
90
100
        UNIVERSALSDK=
91
101
        enable_universalsdk=
92
102
])
 
103
if test -n "${UNIVERSALSDK}"
 
104
then
 
105
        AC_MSG_RESULT(${UNIVERSALSDK})
 
106
else
 
107
        AC_MSG_RESULT(no)
 
108
fi
93
109
AC_SUBST(UNIVERSALSDK)
94
110
 
95
111
AC_SUBST(ARCH_RUN_32BIT)
96
112
 
97
113
UNIVERSAL_ARCHS="32-bit"
 
114
AC_SUBST(LIPO_32BIT_FLAGS)
 
115
AC_SUBST(LIPO_64BIT_FLAGS)
 
116
AC_SUBST(UNIVERSAL_ARCH32_FLAGS)
 
117
AC_SUBST(UNIVERSAL_ARCH64_FLAGS)
98
118
AC_MSG_CHECKING(for --with-universal-archs)
99
119
AC_ARG_WITH(universal-archs,
100
120
    AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")),
160
180
                PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
161
181
                FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
162
182
                FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
163
 
                if test "$UNIVERSAL_ARCHS" = "all"
164
 
                then
 
183
                case "${UNIVERSAL_ARCHS}" in
 
184
                all|3-way|intel)
165
185
                        FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
166
186
                        FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
167
 
                else
 
187
                        ;;
 
188
                *)
168
189
                        FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
169
190
                        FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
170
 
                fi
 
191
                        ;;
 
192
                esac
171
193
 
172
194
                if test "x${prefix}" = "xNONE" ; then
173
195
                        FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
262
284
  # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
263
285
  # even though select is a POSIX function. Reported by J. Ribbens.
264
286
  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
265
 
  OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0123@:>@) 
 
287
  # In addition, Stefan Krah confirms that issue #1244610 exists through
 
288
  # OpenBSD 4.6, but is fixed in 4.7.
 
289
  OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0123456@:>@) 
266
290
    define_xopen_source=no
267
291
    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
268
292
    # also defined. This can be overridden by defining _BSD_SOURCE
269
293
    # As this has a different meaning on Linux, only define it on OpenBSD
270
294
    AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
271
295
    ;;
 
296
  OpenBSD/4.@<:@789@:>@)
 
297
    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
 
298
    # also defined. This can be overridden by defining _BSD_SOURCE
 
299
    # As this has a different meaning on Linux, only define it on OpenBSD
 
300
    AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
 
301
    ;;
272
302
  # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
273
303
  # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
274
304
  # Marc Recht
300
330
  # has no effect, don't bother defining them
301
331
  Darwin/@<:@6789@:>@.*)
302
332
    define_xopen_source=no;;
 
333
  Darwin/1@<:@0-9@:>@.*)
 
334
    define_xopen_source=no;;
303
335
  # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
304
336
  # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
305
337
  # or has another value. By not (re)defining it, the defaults come in place.
831
863
# tweak OPT based on compiler and platform, only if the user didn't set
832
864
# it on the command line
833
865
AC_SUBST(OPT)
834
 
if test -z "$OPT"
 
866
if test "${OPT-unset}" == "unset"
835
867
then
836
868
    case $GCC in
837
869
    yes)
921
953
            # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
922
954
            # used to be here, but non-Apple gcc doesn't accept them.
923
955
 
924
 
 
925
956
            if test "${enable_universalsdk}"; then
926
957
                UNIVERSAL_ARCH_FLAGS=""
927
958
                if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
 
959
                   ARCH_RUN_32BIT=""
928
960
                   UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
929
 
                   ARCH_RUN_32BIT=""
930
961
 
931
962
                 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
 
963
                   ARCH_RUN_32BIT="true"
932
964
                   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
933
 
                   ARCH_RUN_32BIT="true"
934
965
 
935
966
                 elif test "$UNIVERSAL_ARCHS" = "all" ; then
 
967
                   ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
936
968
                   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
937
 
                   ARCH_RUN_32BIT="arch -i386 -ppc"
 
969
                   UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
 
970
                   UNIVERSAL_ARCH64_FLAGS="-arch x86_64 -arch ppc64"
 
971
                   LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
 
972
                   LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
938
973
 
939
974
                 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
 
975
                   ARCH_RUN_32BIT="/usr/bin/arch -i386"
940
976
                   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
941
 
                   ARCH_RUN_32BIT="arch -i386"
 
977
                   UNIVERSAL_ARCH32_FLAGS="-arch i386"
 
978
                   UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
 
979
                   LIPO_32BIT_FLAGS="-extract i386"
 
980
                   LIPO_64BIT_FLAGS="-extract x86_64"
942
981
 
943
982
                 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
 
983
                   ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
944
984
                   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
945
 
                   ARCH_RUN_32BIT="arch -i386 -ppc"
 
985
                   UNIVERSAL_ARCH32_FLAGS="-arch i386 -arch ppc"
 
986
                   UNIVERSAL_ARCH64_FLAGS="-arch x86_64"
 
987
                   LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
 
988
                   LIPO_64BIT_FLAGS="-extract x86_64"
946
989
 
947
990
                 else
948
991
                   AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
980
1023
                                    cur_target='10.5'
981
1024
                            fi
982
1025
                    else
983
 
                            if test `arch` = "i386"; then
 
1026
                            if test `/usr/bin/arch` = "i386"; then
984
1027
                                    # On Intel macs default to a deployment
985
1028
                                    # target of 10.4, that's the first OSX
986
1029
                                    # release with Intel support.
1448
1491
[The number of bytes in an off_t.])
1449
1492
 
1450
1493
AC_MSG_CHECKING(whether to enable large file support)
1451
 
if test "$have_long_long" = yes -a \
1452
 
        "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
 
1494
if test "$have_long_long" = yes
 
1495
then
 
1496
if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
1453
1497
        "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
1454
1498
  AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, 
1455
1499
  [Defined to enable large file support when an off_t is bigger than a long
1460
1504
else
1461
1505
  AC_MSG_RESULT(no)
1462
1506
fi
 
1507
else
 
1508
  AC_MSG_RESULT(no)
 
1509
fi
1463
1510
 
1464
1511
# AC_CHECK_SIZEOF() doesn't include <time.h>.
1465
1512
AC_MSG_CHECKING(size of time_t)
1565
1612
    if test "${enable_universalsdk}"; then
1566
1613
            :
1567
1614
    else
1568
 
        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
 
1615
        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
1569
1616
    fi
1570
1617
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1571
1618
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
1572
1619
  Darwin/*)
1573
 
    gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`
 
1620
    gcc_version=`gcc -dumpversion`
1574
1621
    if test ${gcc_version} '<' 4.0
1575
1622
        then
1576
1623
            LIBTOOL_CRUFT="-lcc_dynamic"
1592
1639
       ac_osx_32bit=yes)
1593
1640
    
1594
1641
    if test "${ac_osx_32bit}" = "yes"; then
1595
 
        case `arch` in
 
1642
        case `/usr/bin/arch` in
1596
1643
        i386) 
1597
1644
                MACOSX_DEFAULT_ARCH="i386" 
1598
1645
                ;;
1604
1651
                ;;
1605
1652
        esac
1606
1653
    else
1607
 
        case `arch` in
 
1654
        case `/usr/bin/arch` in
1608
1655
        i386) 
1609
1656
                MACOSX_DEFAULT_ARCH="x86_64" 
1610
1657
                ;;
2652
2699
 
2653
2700
# On Tru64, chflags seems to be present, but calling it will
2654
2701
# exit Python
2655
 
AC_MSG_CHECKING(for chflags)
2656
 
AC_TRY_RUN([
 
2702
AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
 
2703
AC_TRY_RUN([[
2657
2704
#include <sys/stat.h>
2658
2705
#include <unistd.h>
2659
2706
int main(int argc, char*argv[])
2662
2709
    return 1;
2663
2710
  return 0;
2664
2711
}
2665
 
],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
2666
 
  AC_MSG_RESULT(yes),
2667
 
  AC_MSG_RESULT(no)
2668
 
)
 
2712
]], ac_cv_have_chflags=yes,
 
2713
   ac_cv_have_chflags=no,
 
2714
   ac_cv_have_chflags=cross)
 
2715
])
 
2716
if test "$ac_cv_have_chflags" = cross ; then
 
2717
  AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
 
2718
fi
 
2719
if test "$ac_cv_have_chflags" = yes ; then
 
2720
  AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
 
2721
fi
2669
2722
 
2670
 
AC_MSG_CHECKING(for lchflags)
2671
 
AC_TRY_RUN([
 
2723
AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
 
2724
AC_TRY_RUN([[
2672
2725
#include <sys/stat.h>
2673
2726
#include <unistd.h>
2674
2727
int main(int argc, char*argv[])
2677
2730
    return 1;
2678
2731
  return 0;
2679
2732
}
2680
 
],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
2681
 
  AC_MSG_RESULT(yes),
2682
 
  AC_MSG_RESULT(no)
2683
 
)
 
2733
]], ac_cv_have_lchflags=yes,
 
2734
   ac_cv_have_lchflags=no,
 
2735
   ac_cv_have_lchflags=cross)
 
2736
])
 
2737
if test "$ac_cv_have_lchflags" = cross ; then
 
2738
  AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
 
2739
fi
 
2740
if test "$ac_cv_have_lchflags" = yes ; then
 
2741
  AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
 
2742
fi
2684
2743
 
2685
2744
dnl Check if system zlib has *Copy() functions
2686
2745
dnl
3373
3432
ucs4) unicode_size="4"
3374
3433
      AC_DEFINE(Py_UNICODE_SIZE,4)
3375
3434
      ;;
 
3435
*) AC_MSG_ERROR([invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase).]) ;;
3376
3436
esac
3377
3437
 
3378
3438
AH_TEMPLATE(PY_UNICODE_TYPE,
3499
3559
  [readline/readline.h],
3500
3560
  AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
3501
3561
  [Define if you have readline 2.2]), )
 
3562
  AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
 
3563
  [readline/readline.h],
 
3564
  AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
 
3565
  [Define if you have rl_completion_suppress_append]), )
3502
3566
fi
3503
3567
 
3504
3568
# check for readline 4.0
3837
3901
  THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
3838
3902
done
3839
3903
 
 
3904
if test $ac_sys_system = Darwin
 
3905
then
 
3906
        LIBS="$LIBS -framework CoreFoundation"
 
3907
fi
 
3908
 
 
3909
 
 
3910
 
3840
3911
AC_SUBST(SRCDIRS)
3841
3912
SRCDIRS="Parser Grammar Objects Python Modules Mac"
3842
3913
AC_MSG_CHECKING(for build directories)