source: trunk/base/configure.ac @ 9263

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

Remove duplicate checks

  • 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_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 libgen.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# Load tclConfig.sh
59SC_PATH_TCLCONFIG
60SC_LOAD_TCLCONFIG
61
62# Check for Tcl public headers
63dnl XXX hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
64CYGPATH=echo
65SC_PUBLIC_TCL_HEADERS
66
67# Check for tclsh binary
68OD_PROG_TCLSH
69
70# Check for Tcl package path
71OD_TCL_PACKAGE_DIR
72
73# Allows building of shared libraries
74SC_ENABLE_SHARED
75
76# Pull compiler / linker values from tclConfig.sh
77CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
78CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
79LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
80LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
81SHLIB_LD=${TCL_SHLIB_LD}
82STLIB_LD=${TCL_STLIB_LD}
83SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
84SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
85
86AC_SUBST(INCLUDES)
87AC_SUBST(CFLAGS_DEBUG)
88AC_SUBST(CFLAGS_OPTIMIZE)
89AC_SUBST(TCL_DEFS)
90AC_SUBST(STLIB_LD)
91AC_SUBST(SHLIB_LD)
92AC_SUBST(SHLIB_CFLAGS)
93AC_SUBST(SHLIB_LDFLAGS)
94AC_SUBST(SHLIB_SUFFIX)
95AC_SUBST(TCL_STUB_LIB_SPEC)
96AC_SUBST(TCL_CC)
97
98#misc variables that need to be expanded for substitution into tcl
99
100oldprefix=$prefix
101if test "x$prefix" = "xNONE" ; then
102   prefix=$ac_default_prefix
103fi
104
105eval "prefix_expanded=$prefix"
106AC_SUBST(prefix_expanded)
107# do this twice, since there is a nested variable of
108# ${prefix} inside of ${sysconfdir}
109eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
110eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
111AC_SUBST(PORTCONFIGDIR_EXPANDED)
112eval "localstatedir_expanded=$localstatedir"
113AC_SUBST(localstatedir_expanded)
114
115prefix=$oldprefix
116
117dnl man page settings (compressed, links, etc)
118dnl
119dnl SC_CONFIG_MANPAGES
120
121# Output
122
123AC_CONFIG_FILES([Makefile Mk/dports.autoconf.mk doc/prefix.mtree
124                doc/ports.conf src/darwinports1.0/darwinports_autoconf.tcl
125                src/darwinports1.0/darwinports_fastload.tcl
126                src/programs/Makefile])
127
128AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.