source: branches/gsoc08-privileges/base/configure.ac @ 65055

Last change on this file since 65055 was 39000, checked in by pmagrath@…, 12 years ago

Merged revisions 38683-38684,38753,38756,38765,38835,38883,38940-38942,38960-38961,38973 via svnmerge from
https://svn.macosforge.org/repository/macports/trunk/base

........

r38683 | febeling@… | 2008-07-28 22:21:33 +0100 (Mon, 28 Jul 2008) | 9 lines


Support for ruby19 ports in the ruby port group.


The command ruby.setup accepts an new optional
parameter "implementation", which is ruby18 by
default, and can also be ruby19. (As more ruby
implementations appear these may be added as
well.) Unit tests are in the new sub-directory
tests/.

........

r38684 | febeling@… | 2008-07-28 22:32:47 +0100 (Mon, 28 Jul 2008) | 2 lines


ChangeLog for ruby group change, #15912.

........

r38753 | afb@… | 2008-07-30 08:30:39 +0100 (Wed, 30 Jul 2008) | 2 lines


update changelog for r38577

........

r38756 | afb@… | 2008-07-30 11:13:23 +0100 (Wed, 30 Jul 2008) | 2 lines


unbreak test case when ruby19 is not installed or not running leopard

........

r38765 | toby@… | 2008-07-30 20:59:14 +0100 (Wed, 30 Jul 2008) | 2 lines


fix distclean

........

r38835 | febeling@… | 2008-08-01 09:47:58 +0100 (Fri, 01 Aug 2008) | 2 lines


remove hard-coded mp prefix in test case setup

........

r38883 | wsiegrist@… | 2008-08-02 00:53:41 +0100 (Sat, 02 Aug 2008) | 2 lines


Make the guide chunkier at <http://guide.macports.org/chunked/>

........

r38940 | raimue@… | 2008-08-03 09:05:42 +0100 (Sun, 03 Aug 2008) | 4 lines


pextlib1.0:
Add a wrapper for isatty(3). Add term_get_size to find the size of a connected
terminal for a channel using ioctl(2).

........

r38941 | raimue@… | 2008-08-03 09:10:26 +0100 (Sun, 03 Aug 2008) | 4 lines


port/port.tcl:
Use isatty and term_get_size from pextlib to determine the size of the
connected terminal. This requires the Pextlib package.

........

r38942 | raimue@… | 2008-08-03 09:19:05 +0100 (Sun, 03 Aug 2008) | 3 lines


pextlib1.0/tty.c:
Tabs to spaces

........

r38960 | afb@… | 2008-08-04 10:23:00 +0100 (Mon, 04 Aug 2008) | 2 lines


add use_lzma for .tar.lzma support

........

r38961 | afb@… | 2008-08-04 10:29:00 +0100 (Mon, 04 Aug 2008) | 2 lines


fix typo

........

r38973 | jmr@… | 2008-08-04 17:11:28 +0100 (Mon, 04 Aug 2008) | 2 lines


mirror sites: order sourceforge mirrors more or less geographically

........

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 12.2 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl $Id: configure.ac 39000 2008-08-05 20:25:51Z pmagrath@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# Foundation checks
119ACX_PTHREAD
120MP_OBJC_RUNTIME
121MP_OBJC_FOUNDATION
122
123MP_PROG_DAEMONDO
124#MP_PROG_XAR
125
126AC_SUBST(REPLACEMENT_PROGS)
127AC_SUBST(EXTRA_PROGS)
128
129# set default ports-directory
130PORTS_DIR_DEFAULT=`pwd | sed -e "s/base/ports/"`
131
132# Check for paths
133AC_PREFIX_DEFAULT(/opt/local)
134MP_PATH_PORTSDIR([$PORTS_DIR_DEFAULT])
135MP_PATH_MPCONFIGDIR
136
137# Check whether to install without root privileges
138MP_CHECK_NOROOTPRIVILEGES
139
140# Check for install ownership
141MP_CHECK_INSTALLUSER
142MP_CHECK_INSTALLGROUP
143MP_CHECK_RUNUSER
144MP_DIRECTORY_MODE
145MP_SHARED_DIRECTORY
146
147# Check for default directories
148MP_PATH_APPLICATIONS
149MP_PATH_FRAMEWORKS
150
151# Check for universal options
152MP_UNIVERSAL_OPTIONS
153
154# Check for standard header files.
155AC_HEADER_STDC
156AC_HEADER_DIRENT
157AC_HEADER_SYS_WAIT
158AC_HEADER_STAT
159AC_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 \
160        readline/readline.h readline/history.h pwd.h sys/paths.h utime.h])
161
162INCLUDES="-I.. -I. $INCLUDES"
163
164# Checks for library functions.
165AC_FUNC_CLOSEDIR_VOID
166AC_FUNC_FORK
167AC_FUNC_STRERROR_R
168AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile])
169MP_CHECK_READLINK_IS_P1003_1A
170
171AC_ARG_WITH(x11-prefix, [AC_HELP_STRING([--with-x11-prefix=PREFIX], [use PREFIX as the X11 base dir (default autodetect)])], [ x11prefix="$withval" ] )
172case "$x11prefix" in
173  "")
174    # default to traditional value
175    x11prefix=/usr/X11R6
176    ;;
177  *)
178    x_includes=$x11prefix/include
179    x_libraries=$x11prefix/lib
180    ;;
181esac
182
183# Check for md5 implementation
184MP_LIB_MD5
185# Check for X11 and paraphernalia
186MP_CHECK_X11
187
188AC_MSG_CHECKING(for X11 prefix)
189X_INCLUDES_PREFIX=`echo "$x_includes" | sed "s,/include,,"`
190X_LIBRARIES_PREFIX=`echo "$x_libraries" | sed "s,/lib,,"`
191if test "x$have_x" = "xyes" -a "x$X_INCLUDES_PREFIX" = "x$X_LIBRARIES_PREFIX" -a "x$X_LIBRARIES_PREFIX" != x; then
192    x11prefix=$X_LIBRARIES_PREFIX
193fi
194AC_MSG_RESULT([$x11prefix])
195AC_SUBST(x11prefix)
196
197# Check for readline
198AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [Enable addition of readline support, if readline present.]),
199[
200        AC_CHECK_LIB([readline], [readline], [
201                                  READLINE_LIBS=-lreadline
202                                  AC_DEFINE([HAVE_LIBREADLINE], [1], [Define to 1 if you have the `readline' library (-lreadline).])
203                                  ])
204        AC_CHECK_DECLS([rl_username_completion_function,rl_filename_completion_function,rl_completion_matches,username_completion_function,filename_completion_function,completion_matches], [], [],
205        [
206        #include <stdio.h>
207        #if HAVE_READLINE_READLINE_H
208        # include <readline/readline.h>
209        #endif
210        ])
211])
212AC_SUBST(READLINE_LIBS)
213
214# Lowest non-system-reserved uid and gid (Apple claims <500)
215AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])
216AC_DEFINE([MIN_USABLE_GID], [500], [Lowest non-system-reserved GID.])
217
218# Load tclConfig.sh
219SC_PATH_TCLCONFIG
220SC_LOAD_TCLCONFIG
221
222# Check for Tcl public headers
223dnl XXX  hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
224CYGPATH=echo
225SC_PUBLIC_TCL_HEADERS
226
227# Check for tclsh binary
228MP_PROG_TCLSH
229
230# Check for Tcl package path
231MP_TCL_PACKAGE_DIR
232
233# Check if thread is enabled.
234MP_TCL_THREAD_SUPPORT
235
236## libcurl
237MP_LIBCURL_FLAGS
238
239# Do we have curl_easy_strerror?
240AH_TEMPLATE([HAVE_CURL_EASY_STRERROR],
241               [Define to 1 if you have the curl_easy_strerror function.])
242AC_CHECK_LIB([curl], [curl_easy_strerror],
243        [AC_DEFINE([HAVE_CURL_EASY_STRERROR])],[],
244        [$LDFLAGS_LIBCURL])
245
246# Determine if we need to install some bundled packages
247OUR_INCLUDED_PACKAGES=
248
249## Thread package.
250AC_ARG_WITH(
251                included-tclthread,
252                AS_HELP_STRING([--with-included-tclthread],
253                        [install included Thread package.]),
254                [with_included_tclthread=$withval],
255                [with_included_tclthread="unspecified"])
256
257# Check if thread package is already installed.
258if test "x$with_included_tclthread" = "xunspecified" ; then
259        MP_TCL_PACKAGE(
260                [Thread],
261                [AC_MSG_RESULT([yes]); with_included_tclthread=no],
262                [AC_MSG_RESULT([no]); with_included_tclthread=yes])
263fi
264
265# If thread package isn't installed, configure and install thread package.
266if test "$with_included_tclthread" = "yes"; then
267        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
268        AC_CONFIG_SUBDIRS([src/thread2.6])
269        # Extract thread package
270        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
271        # Patch thread package (so thread2.6 is the vanilla distribution directory)
272        patch -p0 < src/thread2.6.diff
273fi
274
275## sqlite3 package.
276AC_ARG_WITH(
277                included-sqlite3,
278                AS_HELP_STRING([--with-included-sqlite3],
279                        [build using bundled sqlite3 package]),
280                [with_included_sqlite3=$withval],
281                [with_included_sqlite3="unspecified"])
282
283# Check if sqlite3 package is already installed.
284if test "x$with_included_sqlite3" = "xunspecified" ; then
285        AC_CHECK_LIB([sqlite3],[sqlite3_open],
286                [with_included_sqlite3=no],
287                [with_included_sqlite3=yes])
288fi
289
290AC_ARG_WITH(
291                tcl-sqlite3,
292                AS_HELP_STRING([--with-tcl-sqlite3=DIR],
293                        [directory for Tcl sqlite3 (default /usr/lib/sqlite3)]),
294                [mp_sqlite3_dir=$withval],
295                [mp_sqlite3_dir=/usr/lib/sqlite3])
296
297# If sqlite3 package isn't installed, configure and install sqlite3 package.
298if test "$with_included_sqlite3" = "yes"; then
299        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES sqlite-3.1.3"
300        INCLUDES="$INCLUDES -I../sqlite-3.1.3"
301        AC_CONFIG_SUBDIRS([src/sqlite-3.1.3])
302        # Extract sqlite3 package
303        (cd src/; gzip -d < sqlite-3.1.3.tar.gz | tar xf -)
304        # patch sqlite3 with desired configure options
305        patch -p0 < src/sqlite-3.1.3.diff
306        # the new tclinstaller.tcl needs to have substitution occur
307        mv src/sqlite-3.1.3/tclinstaller.tcl src/sqlite-3.1.3/tclinstaller.tcl.in
308        SQLITE3_LIBS=`pwd`"/src/sqlite-3.1.3/.libs/libsqlite3.a"
309        if test "x$prefix" = "xNONE" ; then
310                SQLITE3_DIR=$ac_default_prefix/share/macports/Tcl/sqlite3
311        else
312                SQLITE3_DIR=$prefix/share/macports/Tcl/sqlite3
313        fi
314else
315        SQLITE3_LIBS="-lsqlite3"
316
317        AC_CACHE_CHECK([for Tcl sqlite3 location], [mp_cv_sqlite3_dir],
318                [mp_cv_sqlite3_dir=
319                test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
320                ])
321
322        SQLITE3_DIR=$mp_cv_sqlite3_dir
323fi
324
325AC_SUBST(SQLITE3_LIBS)
326AC_SUBST(SQLITE3_DIR)
327
328AH_TEMPLATE([TRACE_SDK], [SDK for SDK redirect in tracelib])
329AC_ARG_WITH(
330        trace-sdk,
331        AS_HELP_STRING([--with-trace-sdk=SDK],
332                [SDK for redirection in trace lib (for example MacOSX10.4u.sdk)]),
333        [test -d /Developer/SDKs/$withval && AC_DEFINE_UNQUOTED([TRACE_SDK], "${withval}")], [])
334       
335       
336# If /etc/paths.d and /etc/manpaths.d then we can install our path configuration
337# (this code is currently disabled since this mechanism implies that MacPorts paths are
338# added after the system's paths, and so MacPorts commands would not override system functions).
339AC_MSG_CHECKING(whether to install MacPorts paths into /etc/paths.d and /etc/manpaths.d)
340mpprefix=$prefix
341test "x$mpprefix" = "xNONE" && mpprefix=$ac_default_prefix
342if false && test -d /etc/paths.d -a -d /etc/manpaths.d -a "$mpprefix" = "$ac_default_prefix"; then
343        PATHCONF=pathconf
344        AC_CONFIG_FILES([src/pathconf/Makefile src/pathconf/paths src/pathconf/manpaths])
345        AC_MSG_RESULT([yes])
346else
347        AC_MSG_RESULT([no])
348fi
349
350
351# Allows building of shared libraries
352SC_ENABLE_SHARED
353
354# Pull compiler / linker values from tclConfig.sh
355CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
356CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
357LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
358LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
359SHLIB_LD=${TCL_SHLIB_LD}
360STLIB_LD=${TCL_STLIB_LD}
361SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
362SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
363
364AC_SUBST(INCLUDES)
365AC_SUBST(CFLAGS_DEBUG)
366AC_SUBST(CFLAGS_OPTIMIZE)
367AC_SUBST(PATHCONF)
368AC_SUBST(STLIB_LD)
369AC_SUBST(SHLIB_LD)
370AC_SUBST(SHLIB_CFLAGS)
371AC_SUBST(SHLIB_LDFLAGS)
372AC_SUBST(SHLIB_SUFFIX)
373AC_SUBST(TCL_DEFS)
374AC_SUBST(TCL_STUB_LIB_SPEC)
375AC_SUBST(TCL_CC)
376AC_SUBST(OUR_INCLUDED_PACKAGES)
377
378# misc variables that need to be expanded for substitution into tcl
379
380oldprefix=$prefix
381if test "x$prefix" = "xNONE" ; then
382   prefix=$ac_default_prefix
383fi
384
385eval "prefix_expanded=$prefix"
386AC_SUBST(prefix_expanded)
387# do this twice, since there is a nested variable of
388# ${prefix} inside of ${sysconfdir}
389eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
390eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
391AC_SUBST(MPCONFIGDIR_EXPANDED)
392eval "localstatedir_expanded=$localstatedir"
393AC_SUBST(localstatedir_expanded)
394
395prefix=$oldprefix
396
397dnl man page settings (compressed, links, etc)
398dnl
399dnl SC_CONFIG_MANPAGES
400
401# Output
402AC_CONFIG_FILES([
403        Doxyfile
404        Makefile
405        Mk/macports.autoconf.mk
406        doc/prefix.mtree
407        doc/macosx.mtree
408        doc/macports.conf
409        portmgr/freebsd/Makefile
410        portmgr/fedora/macports.spec
411        src/Makefile
412        src/macports1.0/macports_autoconf.tcl
413        src/tclobjc1.0/Makefile
414        src/port1.0/port_autoconf.tcl
415        src/registry1.0/registry_autoconf.tcl
416        src/programs/Makefile
417        src/macports1.0/macports_fastload.tcl
418        setupenv.bash
419])
420
421AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.