source: trunk/base/configure.ac @ 5395

Last change on this file since 5395 was 5395, checked in by ssen, 16 years ago

Implement and use OD_CHECK_X11. If the user has an X11 runtime
(as defined by libX11), require corresponding headers. If they don't
have a runtime, print a warning. Eventually, this should say
"You don't have X11. You won't be able to build any X11-dependent
ports without building all of XFree86, which probably isn't what you want"
Bug: Lots of mailing list newbies

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