source: branches/variant-descs-14482/base/configure.ac @ 42567

Last change on this file since 42567 was 42567, checked in by blb@…, 12 years ago

Merged revisions 41015-41016,41030,41056,41068,41097,41123,41157,41166-41167,41170,41174-41175,41249,41379,41388-41389,41396,41404,41478-41479,41511-41512,41522-41527,41541,41573-41575,41595,41603,41637-41639,41650-41651,41655,41701-41702,41742,41841,41850,41854-41855,41907,41978,42055,42061,42134,42484 via svnmerge from
https://svn.macports.org/repository/macports/trunk/base

........

r41015 | afb@… | 2008-10-20 16:56:28 -0600 (Mon, 20 Oct 2008) | 2 lines


make tclobjc package conditional

........

r41016 | afb@… | 2008-10-20 16:57:00 -0600 (Mon, 20 Oct 2008) | 2 lines


regenerate configure

........

r41030 | afb@… | 2008-10-21 01:27:26 -0600 (Tue, 21 Oct 2008) | 2 lines


update changelog for r41015

........

r41056 | raimue@… | 2008-10-21 08:35:03 -0600 (Tue, 21 Oct 2008) | 3 lines


port/port.tcl:
Remove empty TODO tag

........

r41068 | blb@… | 2008-10-21 22:19:29 -0600 (Tue, 21 Oct 2008) | 2 lines


mirror_sites.tcl - clean out a couple more bad mirrors, found via distcheck

........

r41097 | devans@… | 2008-10-22 17:03:00 -0600 (Wed, 22 Oct 2008) | 2 lines


mirror_sites.tcl: add definition for gimp mirror site.

........

r41123 | jmr@… | 2008-10-24 02:48:57 -0600 (Fri, 24 Oct 2008) | 3 lines


Change documentation of uninstall --recursive to --follow-dependents, to match
the change made to the code in r36160.

........

r41157 | jmr@… | 2008-10-26 06:56:11 -0600 (Sun, 26 Oct 2008) | 2 lines


Apply global variants for all targets (#11897)

........

r41166 | blb@… | 2008-10-26 18:01:47 -0600 (Sun, 26 Oct 2008) | 2 lines


ChangeLog - there will be no 1.6.1, so those changes will also be in 1.7.0

........

r41167 | blb@… | 2008-10-26 19:07:22 -0600 (Sun, 26 Oct 2008) | 2 lines


ChangeLog - add closed 1.7.0 milestone tickets not already noted

........

r41170 | ryandesign@… | 2008-10-26 19:32:41 -0600 (Sun, 26 Oct 2008) | 2 lines


portlint.tcl: No longer nitpick whitespace or patchfile names unless the nitpick option is enabled. There is currently no way to enable this option. A future revision should provide a way to do so. See issue #14799.

........

r41174 | ryandesign@… | 2008-10-26 19:48:47 -0600 (Sun, 26 Oct 2008) | 2 lines


Set svn:eol-style to native on tcl files.

........

r41175 | ryandesign@… | 2008-10-26 19:49:23 -0600 (Sun, 26 Oct 2008) | 2 lines


Set svn:keywords to Id on tcl files

........

r41249 | pguyot@… | 2008-10-29 03:17:40 -0600 (Wed, 29 Oct 2008) | 2 lines


Add support for +universal variants with the xcode portgroup

........

r41379 | jmr@… | 2008-10-31 23:49:19 -0600 (Fri, 31 Oct 2008) | 2 lines


Document the new Norwegian mirror in the relevant config files.

........

r41388 | afb@… | 2008-11-01 04:20:52 -0600 (Sat, 01 Nov 2008) | 2 lines


make sure to expand default prefix (from NONE)

........

r41389 | afb@… | 2008-11-01 04:21:17 -0600 (Sat, 01 Nov 2008) | 2 lines


regenerate configure

........

r41396 | raimue@… | 2008-11-01 13:12:44 -0600 (Sat, 01 Nov 2008) | 4 lines


port/port.tcl:
Add proc wraplabel which outputs a wrapped string with a label. Use the new
wrapping code for output of deps, platforms and maintainers.

........

r41404 | raimue@… | 2008-11-01 16:39:42 -0600 (Sat, 01 Nov 2008) | 3 lines


port1.0/portlivecheck.tcl:
Fix livecheck if using https with invalid certificates, passive ftp, or username and password

........

r41478 | toby@… | 2008-11-03 23:37:10 -0700 (Mon, 03 Nov 2008) | 2 lines


set CURLOPT_MAXREDIRS to 50 to avoid infinite redirection

........

r41479 | jmr@… | 2008-11-03 23:49:20 -0700 (Mon, 03 Nov 2008) | 2 lines


Add new Norwegian distfiles mirror.

........

r41511 | blb@… | 2008-11-04 19:50:05 -0700 (Tue, 04 Nov 2008) | 2 lines


lint command - add --nitpick option; ticket #14799

........

r41512 | blb@… | 2008-11-04 20:18:28 -0700 (Tue, 04 Nov 2008) | 2 lines


port.1 - document --nitpick option added in r41511

........

r41522 | pguyot@… | 2008-11-05 06:33:22 -0700 (Wed, 05 Nov 2008) | 2 lines


Fixed expectations in tests to reflect changes in the code (obviously tests are simply not run)

........

r41523 | pguyot@… | 2008-11-05 06:35:27 -0700 (Wed, 05 Nov 2008) | 2 lines


Add a test that was sleeping on my disk, and that illustrates a buggy behaviour with variants

........

r41524 | pguyot@… | 2008-11-05 06:41:54 -0700 (Wed, 05 Nov 2008) | 2 lines


Include the forgotten test

........

r41525 | pguyot@… | 2008-11-05 06:42:13 -0700 (Wed, 05 Nov 2008) | 2 lines


Partial fix for test trace

........

r41526 | pguyot@… | 2008-11-05 06:45:07 -0700 (Wed, 05 Nov 2008) | 2 lines


Handle new syntax for dependencies, to allow work for dependencies to happen on trunk/ where ports lie, while base/ is frozen for most users (cf bug #126)

........

r41527 | pguyot@… | 2008-11-05 07:38:06 -0700 (Wed, 05 Nov 2008) | 2 lines


Fix switch statement (put comment before the statement) and add a test to check for that

........

r41541 | ryandesign@… | 2008-11-05 15:21:41 -0700 (Wed, 05 Nov 2008) | 2 lines


port.1: --nitpick also checks patchfile names

........

r41573 | ryandesign@… | 2008-11-06 03:44:45 -0700 (Thu, 06 Nov 2008) | 2 lines


portutil.tcl: Fix reinplace for filenames containing spaces; fixes #17098

........

r41574 | ryandesign@… | 2008-11-06 03:50:06 -0700 (Thu, 06 Nov 2008) | 2 lines


ChangeLog: Add note for issue #17098

........

r41575 | ryandesign@… | 2008-11-06 03:52:18 -0700 (Thu, 06 Nov 2008) | 2 lines


ChangeLog: Remove trailing whitespace.

........

r41595 | blb@… | 2008-11-06 13:43:18 -0700 (Thu, 06 Nov 2008) | 2 lines


ChangeLog - note port lint improvements from #14799

........

r41603 | blb@… | 2008-11-06 19:48:44 -0700 (Thu, 06 Nov 2008) | 8 lines


base/src/pextlib1.0/Pextlib.c - this should get the edge case issues of
the Tcl environment bug (#13930); basically, looping through environ while
unsetting stuff changes environ, so not all variables are caught.
clearenv() if it becomes a standard would be best for this, but is not
available everywhere (including Mac OS X/Darwin), so instead use a simple
technique that has been found to work on a number of various platforms (see
<http://lists.freebsd.org/pipermail/freebsd-stable/2008-June/043136.html>).

........

r41637 | blb@… | 2008-11-07 14:00:43 -0700 (Fri, 07 Nov 2008) | 2 lines


pextlib1.0/tests/unsetenv.tcl - remove some spaces on empty lines

........

r41638 | blb@… | 2008-11-07 14:06:17 -0700 (Fri, 07 Nov 2008) | 4 lines


pextlib1.0/tests/unsetenv.tcl - add test for verifying 'unsetenv *' does
empty out the environment; use 'error' instead of 'exit' so the cause for
a failure is shown

........

r41639 | blb@… | 2008-11-07 14:09:31 -0700 (Fri, 07 Nov 2008) | 5 lines


pextlib1.0/Pextlib.c - it turns out Tcl gets a little confused when items
in the environment are removed (either via the complete clear or using
unsetenv()), so we need to force Tcl to sync back with the environment
after changing it (follow up to #13930)

........

r41650 | blb@… | 2008-11-08 02:05:33 -0700 (Sat, 08 Nov 2008) | 8 lines


pextlib1.0/Pextlib.c - move away from "environ = calloc(1, sizeof(char *));"
as that appears to tickle some memory bug on Mac OS X 10.4 tclsh which then
causes apparently-random crashes. Instead, create a list of which variables
are set in the environment, storing in a Tcl list (since that's much easier
for a dynamic list like this), then loop through that list and unsetenv()
each one. No crashing on 10.3-10.5 and tests/unsetenv.tcl pass (hopefully
final bit for #13930).

........

r41651 | afb@… | 2008-11-08 02:33:01 -0700 (Sat, 08 Nov 2008) | 2 lines


use clearenv(3) where available

........

r41655 | toby@… | 2008-11-08 03:50:42 -0700 (Sat, 08 Nov 2008) | 5 lines


SystemCmd:

  • fix major leak (circbuf only freed when command exited non-zero)
  • fix fd leak
  • minor refactoring

........

r41701 | ryandesign@… | 2008-11-09 02:25:36 -0700 (Sun, 09 Nov 2008) | 2 lines


portindex.tcl: Generate the port index in a temporary file first, then replace the PortIndex file all at once; fixes #16234

........

r41702 | ryandesign@… | 2008-11-09 02:28:13 -0700 (Sun, 09 Nov 2008) | 2 lines


ChangeLog: update for issue #16234 (atomic PortIndex regeneration)

........

r41742 | raimue@… | 2008-11-09 19:43:42 -0700 (Sun, 09 Nov 2008) | 4 lines


pextlib1.0/tests/curl.tcl:
The old password protected file no longer exists, use another file from the
same server.

........

r41841 | toby@… | 2008-11-10 19:43:25 -0700 (Mon, 10 Nov 2008) | 2 lines


make setrlimit stop complaining

........

r41850 | ryandesign@… | 2008-11-11 01:44:01 -0700 (Tue, 11 Nov 2008) | 2 lines


portimage.tcl: fix typo in comment

........

r41854 | ryandesign@… | 2008-11-11 02:23:45 -0700 (Tue, 11 Nov 2008) | 2 lines


Registry: Properly handle ports whose version evaluates to 0; see #16740

........

r41855 | ryandesign@… | 2008-11-11 02:27:17 -0700 (Tue, 11 Nov 2008) | 2 lines


receipt_flat.tcl: fix typo in error message

........

r41907 | ryandesign@… | 2008-11-11 21:42:24 -0700 (Tue, 11 Nov 2008) | 2 lines


preflight: fix typo in dp2mp-move code introduced in r26518.

........

r41978 | ryandesign@… | 2008-11-12 16:59:39 -0700 (Wed, 12 Nov 2008) | 2 lines


ChangeLog: add note for ticket #16740

........

r42055 | blb@… | 2008-11-14 00:12:06 -0700 (Fri, 14 Nov 2008) | 2 lines


ChangeLog - note change from ticket #12288

........

r42061 | toby@… | 2008-11-14 01:54:14 -0700 (Fri, 14 Nov 2008) | 2 lines


leak fix

........

r42134 | blb@… | 2008-11-15 18:00:02 -0700 (Sat, 15 Nov 2008) | 2 lines


fetch/mirror_sites.tcl - fix path for a CPAN mirror, ticket #17262

........

r42484 | mcalhoun@… | 2008-11-21 19:54:44 -0700 (Fri, 21 Nov 2008) | 3 lines


group/perl5-1.0.tcl: Change perl dependency from path:...:perl5.8 to path:bin/perl:perl5 (see #16830).
bin/perl is used instead of the full path until #17182 is fixed.

........

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 12.4 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl $Id: configure.ac 42567 2008-11-24 09:14:55Z blb@macports.org $
3AC_PREREQ(2.52)
4AC_DEFUN([MACPORTS_VERSION_MACRO], [esyscmd(cat config/macports_version | tr -d '\n')])
5AC_INIT([MacPorts], [MACPORTS_VERSION_MACRO], [macports-dev@lists.macosforge.org], [macports])
6AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
7AC_CONFIG_HEADERS([src/config.h])
8AC_CANONICAL_SYSTEM
9
10# Read in the MacPorts version from the base/config/macports_vesion file
11AC_MSG_CHECKING(MacPorts version)
12MACPORTS_VERSION=MACPORTS_VERSION_MACRO
13AC_MSG_RESULT([$MACPORTS_VERSION])
14AC_SUBST(MACPORTS_VERSION)
15# Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
16MP_VERSION=$(cat config/mp_version | tr -d '\n')
17AC_SUBST(MP_VERSION)
18
19# Check user PATH for MP paths, and remove as necessary.
20MP_PATH_SCAN
21
22AC_CHECK_PROGS(SW_VERS, sw_vers)
23if test "x$SW_VERS" != "x"; then
24  AC_MSG_CHECKING(Mac OS X version)
25  MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
26  AC_MSG_RESULT([$MACOSX_VERSION])
27fi
28
29case "$MACOSX_VERSION" in
30  10.0*|10.1*|10.2*)
31    AC_WARN(This version of Mac OS X is not supported)
32    AC_WARN(Please upgrade at http://store.apple.com/)
33    ;;
34  10.1.[[0-4]]|10.2.[[0-7]]|10.3.[[0-8]]|10.4.[[0-8]])
35    AC_WARN(This version of Mac OS X is out of date)
36    AC_WARN(Please run Software Update to update it)
37    ;;
38  10.3*|10.4*|10.5*)
39    dnl Supported version
40    ;;
41  *)
42    ;;
43esac
44
45XCODEPLIST=/Developer/Applications/Xcode.app/Contents/version.plist
46if test -r "$XCODEPLIST"; then
47  AC_MSG_CHECKING(Xcode version)
48  XCODE_VERSION=`tr -d '\r\n' < $XCODEPLIST | sed -e 's/.*<key>CFBundleShortVersionString<\/key>.<string>\([[0-9.]]*\)<\/string>.*/\1/'`
49  AC_MSG_RESULT([$XCODE_VERSION])
50fi
51
52case "$XCODE_VERSION" in
53  1.[[0-1]]*|2.[[0-1]]*)
54    AC_WARN(This version of Xcode Tools is not supported)
55    AC_WARN(Please upgrade at http://connect.apple.com/)
56    ;;
57  1.[[2-4]]*|2.[[2-3]]*)
58    AC_WARN(This version of Xcode Tools is out of date)
59    AC_WARN(Please consider upgrading as some ports fail compiling)
60    ;;
61  1.5*|2.4*|3.*)
62    dnl Supported version
63    ;;
64  *)
65    ;;
66esac
67
68# Checks for programs.
69AC_PROG_CC
70AC_PROG_OBJC
71AC_PROG_INSTALL
72AC_PROG_MAKE_SET
73AC_PROG_LN_S
74AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
75AC_PATH_PROG(CVS, [cvs], [])
76AC_PATH_PROG(SVN, [svn], [])
77AC_PATH_PROG(GIT, [git], [])
78AC_PATH_PROG(RSYNC, [rsync], [])
79AC_PATH_PROG(SED, [sed])
80AC_PATH_PROG(TAR, [tar])
81AC_PATH_PROG(MAKE, [make])
82AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
83AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
84AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
85AC_PATH_PROGS(GNUTAR, [gnutar gtar], [], [$PATH:/usr/local/bin])
86AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [], [$PATH:/usr/local/bin])
87AC_PATH_PROG(BZIP2, [bzip2], [])
88AC_PATH_PROG(XAR, [xar], [])
89AC_PATH_PROG(OPEN, [open], [])
90
91# Define some precious variables allowing user to override PATH for some programs
92AC_ARG_VAR(MTREE, [path to mtree command])
93AC_ARG_VAR(CVS, [path to cvs command])
94AC_ARG_VAR(SVN, [path to svn command])
95AC_ARG_VAR(RSYNC, [path to rsync command])
96AC_ARG_VAR(SED, [path to sed command])
97AC_ARG_VAR(TAR, [path to tar command])
98AC_ARG_VAR(MAKE, [path to make command])
99AC_ARG_VAR(GNUTAR, [path to gnutar command])
100AC_ARG_VAR(GNUMAKE, [path to gnumake command])
101AC_ARG_VAR(BZIP2, [path to bzip2 command])
102AC_ARG_VAR(XAR, [path to xar command])
103AC_ARG_VAR(OPEN, [path to open command])
104
105MP_SED_EXTENDED_REGEXP
106MP_TAR_NO_SAME_OWNER
107
108# Quiche eaters options.
109if test x$GCC = xyes; then
110        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
111fi
112AC_SUBST(CFLAGS_QUICHEEATERS)
113MP_WERROR
114
115MP_COMPILER_ATTRIBUTE_UNUSED
116MP_COMPILER_ATTRIBUTE_LF_PRIVATE
117
118# Determine if we want to install conditional packages
119CONDITIONAL_PACKAGES=
120
121# Foundation checks
122ACX_PTHREAD
123MP_OBJC_RUNTIME
124MP_OBJC_FOUNDATION
125
126# tclobjc requires objc (runtime and foundation) support
127if test x$OBJC_RUNTIME != xnone -a x$OBJC_FOUNDATION != xnone; then
128        CONDITIONAL_PACKAGES="tclobjc1.0 $CONDITIONAL_PACKAGES"
129fi
130
131MP_PROG_DAEMONDO
132#MP_PROG_XAR
133
134AC_SUBST(REPLACEMENT_PROGS)
135AC_SUBST(EXTRA_PROGS)
136
137# set default ports-directory
138PORTS_DIR_DEFAULT=`pwd | sed -e "s/base/ports/"`
139
140# Check for paths
141AC_PREFIX_DEFAULT(/opt/local)
142MP_PATH_PORTSDIR([$PORTS_DIR_DEFAULT])
143MP_PATH_MPCONFIGDIR
144
145# Check for install ownership
146MP_CHECK_INSTALLUSER
147MP_CHECK_INSTALLGROUP
148MP_DIRECTORY_MODE
149
150# Check for default directories
151MP_PATH_APPLICATIONS
152MP_PATH_FRAMEWORKS
153
154# Check for universal options
155MP_UNIVERSAL_OPTIONS
156
157# Check for standard header files.
158AC_HEADER_STDC
159AC_HEADER_DIRENT
160AC_HEADER_SYS_WAIT
161AC_HEADER_STAT
162AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h sys/socket.h \
163        readline/readline.h readline/history.h pwd.h sys/paths.h utime.h])
164
165INCLUDES="-I.. -I. $INCLUDES"
166
167# Checks for library functions.
168AC_FUNC_CLOSEDIR_VOID
169AC_FUNC_FORK
170AC_FUNC_STRERROR_R
171AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile clearenv])
172MP_CHECK_READLINK_IS_P1003_1A
173
174AC_ARG_WITH(x11-prefix, [AC_HELP_STRING([--with-x11-prefix=PREFIX], [use PREFIX as the X11 base dir (default autodetect)])], [ x11prefix="$withval" ] )
175case "$x11prefix" in
176  "")
177    # default to traditional value
178    x11prefix=/usr/X11R6
179    ;;
180  *)
181    x_includes=$x11prefix/include
182    x_libraries=$x11prefix/lib
183    ;;
184esac
185
186# Check for md5 implementation
187MP_LIB_MD5
188# Check for X11 and paraphernalia
189MP_CHECK_X11
190
191AC_MSG_CHECKING(for X11 prefix)
192X_INCLUDES_PREFIX=`echo "$x_includes" | sed "s,/include,,"`
193X_LIBRARIES_PREFIX=`echo "$x_libraries" | sed "s,/lib,,"`
194if test "x$have_x" = "xyes" -a "x$X_INCLUDES_PREFIX" = "x$X_LIBRARIES_PREFIX" -a "x$X_LIBRARIES_PREFIX" != x; then
195    x11prefix=$X_LIBRARIES_PREFIX
196fi
197AC_MSG_RESULT([$x11prefix])
198AC_SUBST(x11prefix)
199
200# Check for readline
201AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [Enable addition of readline support, if readline present.]),
202[
203        AC_CHECK_LIB([readline], [readline], [
204                                  READLINE_LIBS=-lreadline
205                                  AC_DEFINE([HAVE_LIBREADLINE], [1], [Define to 1 if you have the `readline' library (-lreadline).])
206                                  ])
207        AC_CHECK_DECLS([rl_username_completion_function,rl_filename_completion_function,rl_completion_matches,username_completion_function,filename_completion_function,completion_matches], [], [],
208        [
209        #include <stdio.h>
210        #if HAVE_READLINE_READLINE_H
211        # include <readline/readline.h>
212        #endif
213        ])
214])
215AC_SUBST(READLINE_LIBS)
216
217# Lowest non-system-reserved uid and gid (Apple claims <500)
218AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])
219AC_DEFINE([MIN_USABLE_GID], [500], [Lowest non-system-reserved GID.])
220
221# Load tclConfig.sh
222SC_PATH_TCLCONFIG
223SC_LOAD_TCLCONFIG
224
225# Check for Tcl public headers
226dnl XXX  hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
227CYGPATH=echo
228SC_PUBLIC_TCL_HEADERS
229
230# Check for tclsh binary
231MP_PROG_TCLSH
232
233# Check for Tcl package path
234MP_TCL_PACKAGE_DIR
235
236# Check if thread is enabled.
237MP_TCL_THREAD_SUPPORT
238
239## libcurl
240MP_LIBCURL_FLAGS
241
242# Do we have curl_easy_strerror?
243AH_TEMPLATE([HAVE_CURL_EASY_STRERROR],
244               [Define to 1 if you have the curl_easy_strerror function.])
245AC_CHECK_LIB([curl], [curl_easy_strerror],
246        [AC_DEFINE([HAVE_CURL_EASY_STRERROR])],[],
247        [$LDFLAGS_LIBCURL])
248
249# Determine if we need to install some bundled packages
250OUR_INCLUDED_PACKAGES=
251
252## Thread package.
253AC_ARG_WITH(
254                included-tclthread,
255                AS_HELP_STRING([--with-included-tclthread],
256                        [install included Thread package.]),
257                [with_included_tclthread=$withval],
258                [with_included_tclthread="unspecified"])
259
260# Check if thread package is already installed.
261if test "x$with_included_tclthread" = "xunspecified" ; then
262        MP_TCL_PACKAGE(
263                [Thread],
264                [AC_MSG_RESULT([yes]); with_included_tclthread=no],
265                [AC_MSG_RESULT([no]); with_included_tclthread=yes])
266fi
267
268# If thread package isn't installed, configure and install thread package.
269if test "$with_included_tclthread" = "yes"; then
270        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
271        AC_CONFIG_SUBDIRS([src/thread2.6])
272        # Extract thread package
273        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
274        # Patch thread package (so thread2.6 is the vanilla distribution directory)
275        patch -p0 < src/thread2.6.diff
276fi
277
278## sqlite3 package.
279AC_ARG_WITH(
280                included-sqlite3,
281                AS_HELP_STRING([--with-included-sqlite3],
282                        [build using bundled sqlite3 package]),
283                [with_included_sqlite3=$withval],
284                [with_included_sqlite3="unspecified"])
285
286# Check if sqlite3 package is already installed.
287if test "x$with_included_sqlite3" = "xunspecified" ; then
288        AC_CHECK_LIB([sqlite3],[sqlite3_open],
289                [with_included_sqlite3=no],
290                [with_included_sqlite3=yes])
291fi
292
293AC_ARG_WITH(
294                tcl-sqlite3,
295                AS_HELP_STRING([--with-tcl-sqlite3=DIR],
296                        [directory for Tcl sqlite3 (default /usr/lib/sqlite3)]),
297                [mp_sqlite3_dir=$withval],
298                [mp_sqlite3_dir=/usr/lib/sqlite3])
299
300# If sqlite3 package isn't installed, configure and install sqlite3 package.
301if test "$with_included_sqlite3" = "yes"; then
302        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES sqlite-3.1.3"
303        INCLUDES="$INCLUDES -I../sqlite-3.1.3"
304        AC_CONFIG_SUBDIRS([src/sqlite-3.1.3])
305        # Extract sqlite3 package
306        (cd src/; gzip -d < sqlite-3.1.3.tar.gz | tar xf -)
307        # patch sqlite3 with desired configure options
308        patch -p0 < src/sqlite-3.1.3.diff
309        # the new tclinstaller.tcl needs to have substitution occur
310        mv src/sqlite-3.1.3/tclinstaller.tcl src/sqlite-3.1.3/tclinstaller.tcl.in
311        SQLITE3_LIBS=`pwd`"/src/sqlite-3.1.3/.libs/libsqlite3.a"
312        if test "x$prefix" = "xNONE" ; then
313                SQLITE3_DIR=$ac_default_prefix/share/macports/Tcl/sqlite3
314        else
315                SQLITE3_DIR=$prefix/share/macports/Tcl/sqlite3
316        fi
317else
318        SQLITE3_LIBS="-lsqlite3"
319
320        AC_CACHE_CHECK([for Tcl sqlite3 location], [mp_cv_sqlite3_dir],
321                [mp_cv_sqlite3_dir=
322                test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
323                ])
324
325        SQLITE3_DIR=$mp_cv_sqlite3_dir
326fi
327
328AC_SUBST(SQLITE3_LIBS)
329AC_SUBST(SQLITE3_DIR)
330
331AH_TEMPLATE([TRACE_SDK], [SDK for SDK redirect in tracelib])
332AC_ARG_WITH(
333        trace-sdk,
334        AS_HELP_STRING([--with-trace-sdk=SDK],
335                [SDK for redirection in trace lib (for example MacOSX10.4u.sdk)]),
336        [test -d /Developer/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])
337       
338       
339# If /etc/paths.d and /etc/manpaths.d then we can install our path configuration
340# (this code is currently disabled since this mechanism implies that MacPorts paths are
341# added after the system's paths, and so MacPorts commands would not override system functions).
342AC_MSG_CHECKING(whether to install MacPorts paths into /etc/paths.d and /etc/manpaths.d)
343mpprefix=$prefix
344test "x$mpprefix" = "xNONE" && mpprefix=$ac_default_prefix
345if false && test -d /etc/paths.d -a -d /etc/manpaths.d -a "$mpprefix" = "$ac_default_prefix"; then
346        PATHCONF=pathconf
347        AC_CONFIG_FILES([src/pathconf/Makefile src/pathconf/paths src/pathconf/manpaths])
348        AC_MSG_RESULT([yes])
349else
350        AC_MSG_RESULT([no])
351fi
352
353
354# Allows building of shared libraries
355SC_ENABLE_SHARED
356
357# Pull compiler / linker values from tclConfig.sh
358CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
359CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
360LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
361LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
362SHLIB_LD=${TCL_SHLIB_LD}
363STLIB_LD=${TCL_STLIB_LD}
364SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
365SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
366
367AC_SUBST(INCLUDES)
368AC_SUBST(CFLAGS_DEBUG)
369AC_SUBST(CFLAGS_OPTIMIZE)
370AC_SUBST(PATHCONF)
371AC_SUBST(STLIB_LD)
372AC_SUBST(SHLIB_LD)
373AC_SUBST(SHLIB_CFLAGS)
374AC_SUBST(SHLIB_LDFLAGS)
375AC_SUBST(SHLIB_SUFFIX)
376AC_SUBST(TCL_DEFS)
377AC_SUBST(TCL_STUB_LIB_SPEC)
378AC_SUBST(TCL_CC)
379AC_SUBST(CONDITIONAL_PACKAGES)
380AC_SUBST(OUR_INCLUDED_PACKAGES)
381
382# misc variables that need to be expanded for substitution into tcl
383
384oldprefix=$prefix
385if test "x$prefix" = "xNONE" ; then
386   prefix=$ac_default_prefix
387fi
388
389eval "prefix_expanded=$prefix"
390AC_SUBST(prefix_expanded)
391# do this twice, since there is a nested variable of
392# ${prefix} inside of ${sysconfdir}
393eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
394eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
395AC_SUBST(MPCONFIGDIR_EXPANDED)
396eval "localstatedir_expanded=$localstatedir"
397AC_SUBST(localstatedir_expanded)
398
399prefix=$oldprefix
400
401dnl man page settings (compressed, links, etc)
402dnl
403dnl SC_CONFIG_MANPAGES
404
405# Output
406AC_CONFIG_FILES([
407        Doxyfile
408        Makefile
409        Mk/macports.autoconf.mk
410        doc/prefix.mtree
411        doc/macosx.mtree
412        doc/macports.conf
413        portmgr/freebsd/Makefile
414        portmgr/fedora/macports.spec
415        src/Makefile
416        src/macports1.0/macports_autoconf.tcl
417        src/tclobjc1.0/Makefile
418        src/port1.0/port_autoconf.tcl
419        src/registry1.0/registry_autoconf.tcl
420        src/programs/Makefile
421        src/macports1.0/macports_fastload.tcl
422        setupenv.bash
423])
424
425AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.