source: trunk/base/configure.ac @ 10524

Last change on this file since 10524 was 10524, checked in by landonf (Landon Fuller), 16 years ago

Add autoconf check for CoreFoundation

  • 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], [])
18
19# Quiche eaters options.
20if test x$GCC = xyes; then
21        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
22fi
23AC_SUBST(CFLAGS_QUICHEEATERS)
24
25OD_COMPILER_ATTRIBUTE_UNUSED
26
27OD_PROG_MTREE
28
29AC_SUBST(REPLACEMENT_PROGS)
30
31# set default dports-directory
32DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
33
34# Check for paths
35AC_PREFIX_DEFAULT(/opt/local)
36OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
37OD_PATH_PORTCONFIGDIR([$prefix])
38
39# Check for install ownership
40OD_CHECK_INSTALLUSER
41OD_CHECK_INSTALLGROUP
42OD_DIRECTORY_MODE
43
44# Check for standard header files.
45AC_HEADER_STDC
46AC_HEADER_DIRENT
47AC_HEADER_SYS_WAIT
48AC_HEADER_STAT
49AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h])
50
51INCLUDES="-I.. -I. $INCLUDES"
52
53# Checks for library functions.
54AC_FUNC_CLOSEDIR_VOID
55AC_FUNC_FORK
56AC_FUNC_STRERROR_R
57AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp])
58
59# Check for CoreFoundation
60OD_COREFOUNDATION
61
62# Check for md5 implementation
63OD_LIB_MD5
64# Check for X11 and paraphernalia
65OD_CHECK_X11
66
67# Load tclConfig.sh
68SC_PATH_TCLCONFIG
69SC_LOAD_TCLCONFIG
70
71# Check for Tcl public headers
72dnl XXX hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
73CYGPATH=echo
74SC_PUBLIC_TCL_HEADERS
75
76# Check for tclsh binary
77OD_PROG_TCLSH
78
79# Check for Tcl package path
80OD_TCL_PACKAGE_DIR
81
82# Allows building of shared libraries
83SC_ENABLE_SHARED
84
85# Pull compiler / linker values from tclConfig.sh
86CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
87CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
88LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
89LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
90SHLIB_LD=${TCL_SHLIB_LD}
91STLIB_LD=${TCL_STLIB_LD}
92SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
93SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
94
95AC_SUBST(INCLUDES)
96AC_SUBST(CFLAGS_DEBUG)
97AC_SUBST(CFLAGS_OPTIMIZE)
98AC_SUBST(TCL_DEFS)
99AC_SUBST(STLIB_LD)
100AC_SUBST(SHLIB_LD)
101AC_SUBST(SHLIB_CFLAGS)
102AC_SUBST(SHLIB_LDFLAGS)
103AC_SUBST(SHLIB_SUFFIX)
104AC_SUBST(TCL_STUB_LIB_SPEC)
105AC_SUBST(TCL_CC)
106
107#misc variables that need to be expanded for substitution into tcl
108
109oldprefix=$prefix
110if test "x$prefix" = "xNONE" ; then
111   prefix=$ac_default_prefix
112fi
113
114eval "prefix_expanded=$prefix"
115AC_SUBST(prefix_expanded)
116# do this twice, since there is a nested variable of
117# ${prefix} inside of ${sysconfdir}
118eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
119eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
120AC_SUBST(PORTCONFIGDIR_EXPANDED)
121eval "localstatedir_expanded=$localstatedir"
122AC_SUBST(localstatedir_expanded)
123
124prefix=$oldprefix
125
126dnl man page settings (compressed, links, etc)
127dnl
128dnl SC_CONFIG_MANPAGES
129
130# Output
131
132AC_CONFIG_FILES([
133        Makefile
134        Mk/dports.autoconf.mk
135        doc/prefix.mtree
136        doc/macosx.mtree
137        doc/ports.conf
138        src/darwinports1.0/darwinports_autoconf.tcl
139        src/port1.0/port_autoconf.tcl
140        src/programs/Makefile
141        src/darwinports1.0/darwinports_fastload.tcl
142])
143
144AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.