aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2004-11-20 10:20:53 +0000
committerBrian Harring <ferringb@gentoo.org>2004-11-20 10:20:53 +0000
commit96667515a1e1cf539ef0b80adeee466a44821f23 (patch)
tree8c164d7b48f1a00a5b34e982c7451400a097522e /configure.in
parentautotooling fun. (diff)
downloadportage-cvs-96667515a1e1cf539ef0b80adeee466a44821f23.tar.gz
portage-cvs-96667515a1e1cf539ef0b80adeee466a44821f23.tar.bz2
portage-cvs-96667515a1e1cf539ef0b80adeee466a44821f23.zip
autotooling of portage.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in98
1 files changed, 98 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..ab5cede
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,98 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(portage, cvs, dev-portage@gentoo.org)
+AM_INIT_AUTOMAKE
+dnl AM_CONFIG_HEADER(config.h)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+
+dnl Checks for libraries.
+dnl Replace `main' with a function in -lc:
+AC_CHECK_LIB(c, main)
+dnl Replace `main' with a function in -ldl:
+AC_CHECK_LIB(dl, main)
+dnl Replace `main' with a function in -lgcc:
+AC_CHECK_LIB(gcc, main)
+dnl Replace `main' with a function in -lpthread:
+AC_CHECK_LIB(pthread, main)
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_SIZE_T
+
+dnl Checks for library functions.
+AC_FUNC_ALLOCA
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(getcwd mkdir regcomp rmdir strdup strerror strspn strstr)
+
+AC_ARG_ENABLE(tbz2tool,
+AC_HELP_STRING([--enable-tbz2tool],[build tbz2tool, tool for creating binpkgs (default yes)]),
+[case "${enableval}" in
+ yes) enable_tbz2tool=true;;
+ no) enable_tbz2tool=false;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-tbz2tool);;
+esac],
+[enable_tbz2tool=true])
+
+AC_ARG_ENABLE(filter-env,
+AC_HELP_STRING([--enable-filter-env],[build filter-env, tool for filtering bash progs/env (default yes)]),
+[case "${enableval}" in
+ yes) enable_filter_env=true;;
+ no) enable_filter_env=false;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-filter-env);;
+esac],
+[enable_filter_env=true])
+
+AC_ARG_ENABLE(missingos,
+AC_HELP_STRING([--enable-missingos],[build compatibility missingos code for python 2.2 (default auto)]),
+[case "${enableval}" in
+ yes) enable_missingos=true;;
+ no) enable_missingos=false;;
+ auto) enable_missingos=auto;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-missingos);;
+esac],
+[enable_missingos=auto])
+
+AC_ARG_ENABLE(just-compiled-sources,
+AC_HELP_STRING([--enable-just-compiled-sources],[install just the bytecode, not the sources (default no)]),
+[case "${enableval}" in
+ yes) enable_py_sources=false;;
+ no) enable_py_sources=true;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-just-compiled-sources);;
+esac],
+[enable_py_sources=false])
+
+if test x$enable_missingos = xauto
+then
+ pyver=[`python -c 'import sys;print sys.version[0:3]';`]
+ case ${pyver} in
+ 2.4) ;;
+ 2.3) ;;
+ 2.2) enable_missingos=true;;
+ *) AC_MSG_WARN([unable to determine python version, ${pyver}]);;
+ esac
+fi
+
+AC_CONFIG_FILES([ Makefile ])
+AC_CONFIG_FILES([ src/Makefile ])
+AC_CONFIG_FILES([ src/filter-env/Makefile ])
+AC_CONFIG_FILES([ man/Makefile ])
+AC_CONFIG_FILES([ src/python-missingos/Makefile ])
+AC_CONFIG_FILES([ bin/Makefile ])
+AC_CONFIG_FILES([ pym/Makefile ])
+
+AC_SUBST(PORTAGE_BASE,"/usr/lib/portage")
+AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue)
+AM_CONDITIONAL(BUILD_TBZ2TOOL, test x$enable_tbz2tool = xtrue)
+AM_CONDITIONAL(BUILD_MISSINGOS, test x$enable_missingos = xtrue)
+AM_CONDITIONAL(BUILD_FILTER_ENV, test x$enable_filter_env = xtrue)
+AC_OUTPUT