source: trunk/base/configure.ac @ 24107

Last change on this file since 24107 was 24107, checked in by jberry@…, 13 years ago

Remove xar macports build/install. xar build was breaking on panther.

Also, remove configure switch for launchd support.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.7 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.52)
3AC_INIT([MacPorts], [1.5], [macports-dev@lists.macosforge.org], [macports])
4AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
5AC_CONFIG_HEADERS([src/config.h])
6AC_CANONICAL_SYSTEM
7
8# Check user PATH for DP paths, and remove as necessary.
9OD_PATH_SCAN
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_INSTALL
14AC_PROG_MAKE_SET
15AC_PROG_LN_S
16AC_PATH_PROG(CVS, [cvs], [])
17AC_PATH_PROG(RSYNC, [rsync], [])
18AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
19AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
20AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
21AC_PATH_PROG(BZIP2, [bzip2], [])
22
23# Define some precious variables allowing user to override PATH for some programs
24AC_ARG_VAR(CVS, [path to cvs command])
25AC_ARG_VAR(RSYNC, [path to rsync command])
26AC_ARG_VAR(TAR, [path to tar command])
27AC_ARG_VAR(GNUTAR, [path to gnutar command])
28AC_ARG_VAR(BZIP2, [path to bzip2 command])
29
30OD_TAR_NO_SAME_OWNER
31
32# Quiche eaters options.
33if test x$GCC = xyes; then
34        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
35fi
36AC_SUBST(CFLAGS_QUICHEEATERS)
37
38OD_COMPILER_ATTRIBUTE_UNUSED
39
40OD_PROG_MTREE
41#OD_PROG_XAR
42OD_PROG_DAEMONDO
43
44AC_SUBST(REPLACEMENT_PROGS)
45AC_SUBST(EXTRA_PROGS)
46
47# set default dports-directory
48DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
49
50# Check for paths
51AC_PREFIX_DEFAULT(/opt/local)
52OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
53OD_PATH_PORTCONFIGDIR
54OD_PATH_SQLITE3
55
56# Check for install ownership
57OD_CHECK_INSTALLUSER
58OD_CHECK_INSTALLGROUP
59OD_DIRECTORY_MODE
60
61# Check for standard header files.
62AC_HEADER_STDC
63AC_HEADER_DIRENT
64AC_HEADER_SYS_WAIT
65AC_HEADER_STAT
66AC_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 \
67        readline/readline.h readline/history.h pwd.h sys/paths.h])
68
69INCLUDES="-I.. -I. $INCLUDES"
70
71# Checks for library functions.
72AC_FUNC_CLOSEDIR_VOID
73AC_FUNC_FORK
74AC_FUNC_STRERROR_R
75AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile])
76DP_CHECK_READLINK_IS_P1003_1A
77
78# Check for md5 implementation
79OD_LIB_MD5
80# Check for X11 and paraphernalia
81OD_CHECK_X11
82
83# Check for readline
84AC_CHECK_LIB([readline], [readline])
85AC_CHECK_DECLS([rl_username_completion_function,rl_filename_completion_function,rl_completion_matches,username_completion_function,filename_completion_function,completion_matches], [], [],
86[
87#include <stdio.h>
88#if HAVE_READLINE_READLINE_H
89# include <readline/readline.h>
90#endif
91])
92
93# Lowest non-system-reserved uid and gid (Apple claims <500)
94AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])
95AC_DEFINE([MIN_USABLE_GID], [500], [Lowest non-system-reserved GID.])
96
97# Load tclConfig.sh
98SC_PATH_TCLCONFIG
99SC_LOAD_TCLCONFIG
100
101# Check for Tcl public headers
102dnl XXX  hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
103CYGPATH=echo
104SC_PUBLIC_TCL_HEADERS
105
106# Check for tclsh binary
107OD_PROG_TCLSH
108
109# Check for Tcl package path
110OD_TCL_PACKAGE_DIR
111
112# Check if thread is enabled.
113OD_TCL_THREAD_SUPPORT
114
115## libcurl
116OD_LIBCURL_FLAGS
117
118# Do we have curl_easy_strerror?
119AH_TEMPLATE([HAVE_CURL_EASY_STRERROR],
120               [Define to 1 if you have the curl_easy_strerror function.])
121AC_CHECK_LIB([curl], [curl_easy_strerror],
122        [AC_DEFINE([HAVE_CURL_EASY_STRERROR])],[],
123        [$LDFLAGS_LIBCURL])
124
125# Determine if we need to install some bundled packages
126OUR_INCLUDED_PACKAGES=
127
128## Thread package.
129AC_ARG_WITH(
130                included-tclthread,
131                [  --with-included-tclthread install included Thread package.],
132                [with_included_tclthread=$withval],
133                [with_included_tclthread="unspecified"])
134
135# Check if thread package is already installed.
136if test "x$with_included_tclthread" = "xunspecified" ; then
137        OD_TCL_PACKAGE(
138                [Thread],
139                [AC_MSG_RESULT([yes]); with_included_tclthread=no],
140                [AC_MSG_RESULT([no]); with_included_tclthread=yes])
141fi
142
143# If thread package isn't installed, configure and install thread package.
144if test "$with_included_tclthread" = "yes"; then
145        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
146        AC_CONFIG_SUBDIRS([src/thread2.6])
147        # Extract thread package
148        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
149        # Patch thread package (so thread2.6 is the vanilla distribution directory)
150        patch -p0 < src/thread2.6.diff
151fi
152
153AC_SUBST(OUR_INCLUDED_PACKAGES)
154
155# Allows building of shared libraries
156SC_ENABLE_SHARED
157
158# Pull compiler / linker values from tclConfig.sh
159CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
160CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
161LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
162LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
163SHLIB_LD=${TCL_SHLIB_LD}
164STLIB_LD=${TCL_STLIB_LD}
165SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
166SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
167
168AC_SUBST(INCLUDES)
169AC_SUBST(CFLAGS_DEBUG)
170AC_SUBST(CFLAGS_OPTIMIZE)
171AC_SUBST(TCL_DEFS)
172AC_SUBST(STLIB_LD)
173AC_SUBST(SHLIB_LD)
174AC_SUBST(SHLIB_CFLAGS)
175AC_SUBST(SHLIB_LDFLAGS)
176AC_SUBST(SHLIB_SUFFIX)
177AC_SUBST(TCL_STUB_LIB_SPEC)
178AC_SUBST(TCL_CC)
179
180#misc variables that need to be expanded for substitution into tcl
181
182oldprefix=$prefix
183if test "x$prefix" = "xNONE" ; then
184   prefix=$ac_default_prefix
185fi
186
187eval "prefix_expanded=$prefix"
188AC_SUBST(prefix_expanded)
189# do this twice, since there is a nested variable of
190# ${prefix} inside of ${sysconfdir}
191eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
192eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
193AC_SUBST(PORTCONFIGDIR_EXPANDED)
194eval "localstatedir_expanded=$localstatedir"
195AC_SUBST(localstatedir_expanded)
196
197prefix=$oldprefix
198
199dnl man page settings (compressed, links, etc)
200dnl
201dnl SC_CONFIG_MANPAGES
202
203# Output
204
205AC_CONFIG_FILES([
206        Makefile
207        Mk/dports.autoconf.mk
208        doc/prefix.mtree
209        doc/macosx.mtree
210        doc/ports.conf
211        src/Makefile
212        src/darwinports1.0/darwinports_autoconf.tcl
213        src/port1.0/port_autoconf.tcl
214        src/registry1.0/registry_autoconf.tcl
215        src/programs/Makefile
216        src/darwinports1.0/darwinports_fastload.tcl
217])
218
219AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.