source: trunk/base/configure.ac @ 8756

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

Avoid expensive Tcl's startup package globbing, if DP installation isn't moved
after installation (however, things should continue to work if any package is
moved). The gain is between 10 and 15 seconds on my PowerBook.

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