summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-10-20 15:27:44 +0200
committerDavid Kupka <dkupka@redhat.com>2016-10-24 13:30:12 +0200
commitc70a2873f8a4447f8b38ad7b8468fc78c91bbb63 (patch)
tree1d1cc99a8b134699694845855c144bc8e5512d27 /configure.ac
parentc954d0e1ba2a9ba8e8da679bc7246788d086d976 (diff)
downloadfreeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.tar.gz
freeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.tar.xz
freeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.zip
Build: replace ipaplatform magic with symlinks generated by configure
The original approach with __path__ implemented by 8f98fa1bd5f1da207fab6f89b75e0cdc19d00797 broke Pylint: We decided to resort back to symlinks as it is easiest solution which does not break pylint in weird ways. This commit introduces configure --with-ipaplatform option. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac35
1 files changed, 35 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 47e9295ff..1f4865c7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,6 +309,35 @@ if test "x$MSGATTRIB" = "xno"; then
fi
dnl ---------------------------------------------------------------------------
+dnl IPA platform
+dnl ---------------------------------------------------------------------------
+AC_ARG_WITH([ipaplatform],
+ [AC_HELP_STRING([--with-ipaplatform],
+ [IPA platform module to use])],
+ [IPAPLATFORM=${withval}],
+ [IPAPLATFORM=""])
+AC_MSG_CHECKING([supported IPA platform])
+
+if test "x${IPAPLATFORM}" == "x"; then
+ if test -r "/etc/os-release"; then
+ IPAPLATFORM=$(. /etc/os-release; echo "$ID")
+ else
+ AC_MSG_ERROR([unable to read /etc/os-release])
+ fi
+ if test "x${IPAPLATFORM}" == "x"; then
+ AC_MSG_ERROR([unable to find ID variable in /etc/os-release])
+ fi
+fi
+
+if test ! -d "ipaplatform/${IPAPLATFORM}"; then
+ AC_MSG_ERROR([IPA platform ${IPAPLATFORM} is not supported])
+fi
+
+AC_SUBST([IPAPLATFORM])
+AC_MSG_RESULT([${IPAPLATFORM}])
+
+
+dnl ---------------------------------------------------------------------------
dnl Finish
dnl ---------------------------------------------------------------------------
@@ -360,6 +389,12 @@ AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
# Files
+AC_CONFIG_LINKS([ipaplatform/__init__.py:ipaplatform/$IPAPLATFORM/__init__.py
+ ipaplatform/constants.py:ipaplatform/$IPAPLATFORM/constants.py
+ ipaplatform/paths.py:ipaplatform/$IPAPLATFORM/paths.py
+ ipaplatform/services.py:ipaplatform/$IPAPLATFORM/services.py
+ ipaplatform/tasks.py:ipaplatform/$IPAPLATFORM/tasks.py
+ ])
AC_CONFIG_FILES([
asn1/Makefile