source: trunk/base/configure.ac @ 7620

Last change on this file since 7620 was 7620, checked in by wbb4, 16 years ago

Bug:
Submitted by: wbb4@
Reviewed by: wbb4@
Approved by:
Obtained from: wbb4-versionfoobage-1 branch, pguyot@, wbb4@

This is the merge of the Port Images branch (wbb4-versionfoobage-1) into HEAD.

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