source: trunk/base/configure.ac @ 11922

Last change on this file since 11922 was 11922, checked in by ssen, 15 years ago

Remove compatibility logic to put sources.conf in /etc/ports for
the "default" configure. Now we always use $prefix/etc/ports, or more
precisely $sysconfdir/ports. $sysconfdir can be overridden on
the commandline independent of $prefix, but defaults to $prefix/etc
Suggested by: jmpp@

  • Property svn:eol-style set to native
File size: 3.2 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
19AC_SUBST(TAR_CMD)
20OD_TAR_NO_SAME_OWNER
21
22# Quiche eaters options.
23if test x$GCC = xyes; then
24        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
25fi
26AC_SUBST(CFLAGS_QUICHEEATERS)
27
28OD_COMPILER_ATTRIBUTE_UNUSED
29
30OD_PROG_MTREE
31
32AC_SUBST(REPLACEMENT_PROGS)
33
34# set default dports-directory
35DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
36
37# Check for paths
38AC_PREFIX_DEFAULT(/opt/local)
39OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
40OD_PATH_PORTCONFIGDIR
41
42# Check for install ownership
43OD_CHECK_INSTALLUSER
44OD_CHECK_INSTALLGROUP
45OD_DIRECTORY_MODE
46
47# Check for standard header files.
48AC_HEADER_STDC
49AC_HEADER_DIRENT
50AC_HEADER_SYS_WAIT
51AC_HEADER_STAT
52AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h])
53
54INCLUDES="-I.. -I. $INCLUDES"
55
56# Checks for library functions.
57AC_FUNC_CLOSEDIR_VOID
58AC_FUNC_FORK
59AC_FUNC_STRERROR_R
60AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp])
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.