source: trunk/base/configure.ac @ 3937

Last change on this file since 3937 was 3937, checked in by fkr, 16 years ago

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

enable --with-dports-dir.
Attention: this changes the default behavior upon installation, since it will
configure $PREFIX/$portconfigdir/sources.conf (commonly /etc/ports/sources.conf)
If you don't re-install (and remove your old sources.conf prior to that), this won't affect you.
(and it should not, since you most likely have a already configured sources.conf).
By default, it will add the dports-tree from your checked out copy from which you install
to sources.conf.

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