source: trunk/base/configure.ac @ 15487

Last change on this file since 15487 was 13669, checked in by jberry, 15 years ago

Default launchd startup item support to on. To disable it, configure with
--disable-launchd-support.

This feature is now present in cvs, though not
in the release branch at this point. Some work still remains in order to
finish implementation of the new startup item keys for both systemstarter
and launchd. But the belief is that at this point support for the traditional
startupitem.* keys is complete and working. Please test.

  • Property svn:eol-style set to native
File size: 4.9 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.52)
3AC_INIT([OpenDarwin DarwinPorts], [1.0], [darwinports@opendarwin.org], [darwinports])
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_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
18AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
19AC_PATH_PROG(XCODEBUILD, [xcodebuild], [])
20
21OD_TAR_NO_SAME_OWNER
22
23# Quiche eaters options.
24if test x$GCC = xyes; then
25        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
26fi
27AC_SUBST(CFLAGS_QUICHEEATERS)
28
29OD_COMPILER_ATTRIBUTE_UNUSED
30
31OD_PROG_MTREE
32AC_ARG_ENABLE(launchd-support,
33        AC_HELP_STRING([--disable-launchd-support], [disable support for launchd startupitems]),
34        [], [enable_launchd_support=yes])
35AC_SUBST(ENABLE_LAUNCHD_SUPPORT, [$enable_launchd_support])
36AS_IF([test x"${enable_launchd_support}" == "xyes"], [OD_PROG_DAEMONDO])
37
38AC_SUBST(REPLACEMENT_PROGS)
39AC_SUBST(EXTRA_PROGS)
40
41# set default dports-directory
42DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
43
44# Check for paths
45AC_PREFIX_DEFAULT(/opt/local)
46OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
47OD_PATH_PORTCONFIGDIR
48
49# Check for install ownership
50OD_CHECK_INSTALLUSER
51OD_CHECK_INSTALLGROUP
52OD_DIRECTORY_MODE
53
54# Check for standard header files.
55AC_HEADER_STDC
56AC_HEADER_DIRENT
57AC_HEADER_SYS_WAIT
58AC_HEADER_STAT
59AC_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])
60
61INCLUDES="-I.. -I. $INCLUDES"
62
63# Checks for library functions.
64AC_FUNC_CLOSEDIR_VOID
65AC_FUNC_FORK
66AC_FUNC_STRERROR_R
67AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp copyfile])
68
69# Check for md5 implementation
70OD_LIB_MD5
71# Check for X11 and paraphernalia
72OD_CHECK_X11
73
74# Load tclConfig.sh
75SC_PATH_TCLCONFIG
76SC_LOAD_TCLCONFIG
77
78# Check for Tcl public headers
79dnl XXX  hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
80CYGPATH=echo
81SC_PUBLIC_TCL_HEADERS
82
83# Check for tclsh binary
84OD_PROG_TCLSH
85
86# Check for Tcl package path
87OD_TCL_PACKAGE_DIR
88
89# Check if thread is enabled.
90OD_TCL_THREAD_SUPPORT
91
92## libcurl
93OD_LIBCURL_FLAGS
94
95# Do we have curl_easy_strerror?
96AH_TEMPLATE([HAVE_CURL_EASY_STRERROR],
97               [Define to 1 if you have the curl_easy_strerror function.])
98AC_CHECK_LIB([curl], [curl_easy_strerror],
99        [AC_DEFINE([HAVE_CURL_EASY_STRERROR])],[],
100        [$LDFLAGS_LIBCURL])
101
102# Determine if we need to install some bundled packages
103OUR_INCLUDED_PACKAGES=
104
105## Thread package.
106AC_ARG_WITH(
107                included-tclthread,
108                [  --with-included-tclthread install included Thread package.],
109                [with_included_tclthread=$withval],
110                [with_included_tclthread="unspecified"])
111
112# Check if thread package is already installed.
113if test "x$with_included_tclthread" = "xunspecified" ; then
114        OD_TCL_PACKAGE(
115                [Thread],
116                [AC_MSG_RESULT([yes]); with_included_tclthread=no],
117                [AC_MSG_RESULT([no]); with_included_tclthread=yes])
118fi
119
120# If thread package isn't installed, configure and install thread package.
121if test "$with_included_tclthread" = "yes"; then
122        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
123        AC_CONFIG_SUBDIRS([src/thread2.6])
124        # Extract thread package
125        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
126        # Patch thread package (so thread2.6 is the vanilla distribution directory)
127        patch -p0 < src/thread2.6.diff
128fi
129
130AC_SUBST(OUR_INCLUDED_PACKAGES)
131
132# Allows building of shared libraries
133SC_ENABLE_SHARED
134
135# Pull compiler / linker values from tclConfig.sh
136CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
137CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
138LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
139LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
140SHLIB_LD=${TCL_SHLIB_LD}
141STLIB_LD=${TCL_STLIB_LD}
142SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
143SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
144
145AC_SUBST(INCLUDES)
146AC_SUBST(CFLAGS_DEBUG)
147AC_SUBST(CFLAGS_OPTIMIZE)
148AC_SUBST(TCL_DEFS)
149AC_SUBST(STLIB_LD)
150AC_SUBST(SHLIB_LD)
151AC_SUBST(SHLIB_CFLAGS)
152AC_SUBST(SHLIB_LDFLAGS)
153AC_SUBST(SHLIB_SUFFIX)
154AC_SUBST(TCL_STUB_LIB_SPEC)
155AC_SUBST(TCL_CC)
156
157#misc variables that need to be expanded for substitution into tcl
158
159oldprefix=$prefix
160if test "x$prefix" = "xNONE" ; then
161   prefix=$ac_default_prefix
162fi
163
164eval "prefix_expanded=$prefix"
165AC_SUBST(prefix_expanded)
166# do this twice, since there is a nested variable of
167# ${prefix} inside of ${sysconfdir}
168eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
169eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
170AC_SUBST(PORTCONFIGDIR_EXPANDED)
171eval "localstatedir_expanded=$localstatedir"
172AC_SUBST(localstatedir_expanded)
173
174prefix=$oldprefix
175
176dnl man page settings (compressed, links, etc)
177dnl
178dnl SC_CONFIG_MANPAGES
179
180# Output
181
182AC_CONFIG_FILES([
183        Makefile
184        Mk/dports.autoconf.mk
185        doc/prefix.mtree
186        doc/macosx.mtree
187        doc/ports.conf
188        src/Makefile
189        src/darwinports1.0/darwinports_autoconf.tcl
190        src/port1.0/port_autoconf.tcl
191        src/programs/Makefile
192        src/darwinports1.0/darwinports_fastload.tcl
193])
194
195AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.