source: trunk/base/configure.ac @ 13243

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

New Pextlib commands:
fork
unixsocketpair
mkchannelfromfd

These will be used to replace threads when Tcl doesn't provide them (on 10.3
for example).

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

  • Property svn:eol-style set to native
File size: 3.3 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# Allows building of shared libraries
84SC_ENABLE_SHARED
85
86# Pull compiler / linker values from tclConfig.sh
87CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
88CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
89LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
90LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
91SHLIB_LD=${TCL_SHLIB_LD}
92STLIB_LD=${TCL_STLIB_LD}
93SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
94SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
95
96AC_SUBST(INCLUDES)
97AC_SUBST(CFLAGS_DEBUG)
98AC_SUBST(CFLAGS_OPTIMIZE)
99AC_SUBST(TCL_DEFS)
100AC_SUBST(STLIB_LD)
101AC_SUBST(SHLIB_LD)
102AC_SUBST(SHLIB_CFLAGS)
103AC_SUBST(SHLIB_LDFLAGS)
104AC_SUBST(SHLIB_SUFFIX)
105AC_SUBST(TCL_STUB_LIB_SPEC)
106AC_SUBST(TCL_CC)
107
108#misc variables that need to be expanded for substitution into tcl
109
110oldprefix=$prefix
111if test "x$prefix" = "xNONE" ; then
112   prefix=$ac_default_prefix
113fi
114
115eval "prefix_expanded=$prefix"
116AC_SUBST(prefix_expanded)
117# do this twice, since there is a nested variable of
118# ${prefix} inside of ${sysconfdir}
119eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
120eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
121AC_SUBST(PORTCONFIGDIR_EXPANDED)
122eval "localstatedir_expanded=$localstatedir"
123AC_SUBST(localstatedir_expanded)
124
125prefix=$oldprefix
126
127dnl man page settings (compressed, links, etc)
128dnl
129dnl SC_CONFIG_MANPAGES
130
131# Output
132
133AC_CONFIG_FILES([
134        Makefile
135        Mk/dports.autoconf.mk
136        doc/prefix.mtree
137        doc/macosx.mtree
138        doc/ports.conf
139        src/darwinports1.0/darwinports_autoconf.tcl
140        src/port1.0/port_autoconf.tcl
141        src/programs/Makefile
142        src/darwinports1.0/darwinports_fastload.tcl
143])
144
145AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.