source: trunk/base/configure.ac @ 13350

Last change on this file since 13350 was 13350, checked in by pguyot (Paul Guyot), 15 years ago

Removed useless fork test (since fork just doesn't work with Tcl).
Configure now tests if threads are enabled (generate an errors if they are not)
and if the thread package is present. If it is not, our own thread package
is installed (I decided to take the vanilla tarball and to patch it to get
it installed into $prefix/share/darwinports/Tcl/).
Removed the wrapper for porttrace, using only the thread flavor of the slave
implementation (the fork implementation never really worked).

I haven't tested this on 10.3 yet.

  • Property svn:eol-style set to native
File size: 3.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(CURL, [curl], [])
17AC_PATH_PROG(CVS, [cvs], [])
18AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
19AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
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
32
33AC_SUBST(REPLACEMENT_PROGS)
34
35# set default dports-directory
36DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
37
38# Check for paths
39AC_PREFIX_DEFAULT(/opt/local)
40OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
41OD_PATH_PORTCONFIGDIR
42
43# Check for install ownership
44OD_CHECK_INSTALLUSER
45OD_CHECK_INSTALLGROUP
46OD_DIRECTORY_MODE
47
48# Check for standard header files.
49AC_HEADER_STDC
50AC_HEADER_DIRENT
51AC_HEADER_SYS_WAIT
52AC_HEADER_STAT
53AC_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])
54
55INCLUDES="-I.. -I. $INCLUDES"
56
57# Checks for library functions.
58AC_FUNC_CLOSEDIR_VOID
59AC_FUNC_FORK
60AC_FUNC_STRERROR_R
61AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp copyfile])
62
63# Check for md5 implementation
64OD_LIB_MD5
65# Check for X11 and paraphernalia
66OD_CHECK_X11
67
68# Load tclConfig.sh
69SC_PATH_TCLCONFIG
70SC_LOAD_TCLCONFIG
71
72# Check for Tcl public headers
73dnl XXX hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
74CYGPATH=echo
75SC_PUBLIC_TCL_HEADERS
76
77# Check for tclsh binary
78OD_PROG_TCLSH
79
80# Check for Tcl package path
81OD_TCL_PACKAGE_DIR
82
83# Check if thread package is already installed.
84OD_TCL_THREAD_SUPPORT
85
86# If thread package isn't installed, configure and install thread package.
87if test "$with_tclthread" = "yes"; then
88        OUR_TCL_THREAD_PACKAGE=thread2.6.2
89        AC_CONFIG_SUBDIRS([src/thread2.6.2])
90        # Extract thread package
91        (cd src/; gzip -d < thread2.6.2.tar.gz | tar xf -)
92        # Patch thread package (so thread2.6.2 is the vanilla distribution directory)
93        patch -p0 < src/thread2.6.2.diff
94else
95        OUR_TCL_THREAD_PACKAGE=
96fi
97AC_SUBST(OUR_TCL_THREAD_PACKAGE)
98
99# Allows building of shared libraries
100SC_ENABLE_SHARED
101
102# Pull compiler / linker values from tclConfig.sh
103CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
104CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
105LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
106LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
107SHLIB_LD=${TCL_SHLIB_LD}
108STLIB_LD=${TCL_STLIB_LD}
109SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
110SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
111
112AC_SUBST(INCLUDES)
113AC_SUBST(CFLAGS_DEBUG)
114AC_SUBST(CFLAGS_OPTIMIZE)
115AC_SUBST(TCL_DEFS)
116AC_SUBST(STLIB_LD)
117AC_SUBST(SHLIB_LD)
118AC_SUBST(SHLIB_CFLAGS)
119AC_SUBST(SHLIB_LDFLAGS)
120AC_SUBST(SHLIB_SUFFIX)
121AC_SUBST(TCL_STUB_LIB_SPEC)
122AC_SUBST(TCL_CC)
123
124#misc variables that need to be expanded for substitution into tcl
125
126oldprefix=$prefix
127if test "x$prefix" = "xNONE" ; then
128   prefix=$ac_default_prefix
129fi
130
131eval "prefix_expanded=$prefix"
132AC_SUBST(prefix_expanded)
133# do this twice, since there is a nested variable of
134# ${prefix} inside of ${sysconfdir}
135eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
136eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
137AC_SUBST(PORTCONFIGDIR_EXPANDED)
138eval "localstatedir_expanded=$localstatedir"
139AC_SUBST(localstatedir_expanded)
140
141prefix=$oldprefix
142
143dnl man page settings (compressed, links, etc)
144dnl
145dnl SC_CONFIG_MANPAGES
146
147# Output
148
149AC_CONFIG_FILES([
150        Makefile
151        Mk/dports.autoconf.mk
152        doc/prefix.mtree
153        doc/macosx.mtree
154        doc/ports.conf
155        src/Makefile
156        src/darwinports1.0/darwinports_autoconf.tcl
157        src/port1.0/port_autoconf.tcl
158        src/programs/Makefile
159        src/darwinports1.0/darwinports_fastload.tcl
160])
161
162AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.