source: trunk/base/configure.ac @ 9806

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

Allow installation directory permissions to be specified with a configure flag

  • 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
13AC_PATH_PROG(CURL, [curl], [])
14AC_PATH_PROG(CVS, [cvs], [])
15
16# Quiche eaters options.
17if test x$GCC = xyes; then
18        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
19fi
20AC_SUBST(CFLAGS_QUICHEEATERS)
21
22OD_COMPILER_ATTRIBUTE_UNUSED
23
24OD_PROG_MTREE
25
26AC_SUBST(REPLACEMENT_PROGS)
27
28# set default dports-directory
29DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
30
31# Check for paths
32AC_PREFIX_DEFAULT(/opt/local)
33OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
34OD_PATH_PORTCONFIGDIR([$prefix])
35
36# Check for install ownership
37OD_CHECK_INSTALLUSER
38OD_CHECK_INSTALLGROUP
39OD_DIRECTORY_MODE
40
41# Check for standard header files.
42AC_HEADER_STDC
43AC_HEADER_DIRENT
44AC_HEADER_SYS_WAIT
45AC_HEADER_STAT
46AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h])
47
48INCLUDES="-I.. -I. $INCLUDES"
49
50# Checks for library functions.
51AC_FUNC_CLOSEDIR_VOID
52AC_FUNC_FORK
53AC_FUNC_STRERROR_R
54AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp])
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([
127        Makefile
128        Mk/dports.autoconf.mk
129        doc/prefix.mtree
130        doc/macosx.mtree
131        doc/ports.conf
132        src/darwinports1.0/darwinports_autoconf.tcl
133        src/port1.0/port_autoconf.tcl
134        src/programs/Makefile
135        src/darwinports1.0/darwinports_fastload.tcl
136])
137
138AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.