aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2009-01-17 21:22:52 -0500
committerAvatar Mike Kelly <pioto@pioto.org> 2009-01-17 21:23:37 -0500
commitfb2933b864e78a6375fbdb66aa4408b08036b5ed (patch)
tree4f24a01cadc3b9c1d3d0502a4e8da635b300b90e
parent1ac892e399f4c41e378f91a8d5823d1f3f2ef908 (diff)
downloadpaludis-fb2933b864e78a6375fbdb66aa4408b08036b5ed.tar.gz
paludis-fb2933b864e78a6375fbdb66aa4408b08036b5ed.tar.xz
Auto-detect config framework.
Default to eclectic, if available, and eselect otherwise.
-rw-r--r--configure.ac13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 2c97ad2..1cb7da6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1414,9 +1414,18 @@ dnl }}}
dnl {{{ eselect or eclectic
AC_MSG_CHECKING([for config framework])
AC_ARG_WITH([config-framework],
- AS_HELP_STRING([--with-config-framework=@<:@eselect|eclectic@:>@], [Specify whether to use eselect or eclectic (default: eselect)]),
+ AS_HELP_STRING([--with-config-framework=@<:@eselect|eclectic@:>@],
+ [Specify whether to use eselect or eclectic (default: auto)]),
CONFIG_FRAMEWORK=`eval echo $withval`,
- CONFIG_FRAMEWORK=eselect)
+ CONFIG_FRAMEWORK=auto)
+
+if test x"$CONFIG_FRAMEWORK" = x"auto" ; then
+ if test -x `which eclectic 2>/dev/null` ; then
+ CONFIG_FRAMEWORK="eclectic"
+ else
+ CONFIG_FRAMEWORK="eselect"
+ fi
+fi
if $CONFIG_FRAMEWORK version >/dev/null 2>/dev/null ; then
AC_MSG_RESULT([$CONFIG_FRAMEWORK])