summaryrefslogtreecommitdiffstats
path: root/server/external
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-10-21 14:55:20 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-12-07 10:19:03 -0500
commit3999ec5b254cfd822e2a1dc6401a7b8ec6313dbf (patch)
tree6d347c070f89108db097c384bc8560cb616c1299 /server/external
parent9a9f6858e488b6aaf1df7f484a7caea5346f5a3e (diff)
downloadsssd-3999ec5b254cfd822e2a1dc6401a7b8ec6313dbf.tar.gz
sssd-3999ec5b254cfd822e2a1dc6401a7b8ec6313dbf.tar.xz
sssd-3999ec5b254cfd822e2a1dc6401a7b8ec6313dbf.zip
Add basic OS detection
Detect if the OS is Fedora, RHEL or SUSE and install the SUSE start-script on SUSE systems.
Diffstat (limited to 'server/external')
-rw-r--r--server/external/platform.m429
1 files changed, 29 insertions, 0 deletions
diff --git a/server/external/platform.m4 b/server/external/platform.m4
new file mode 100644
index 000000000..71b4f2c85
--- /dev/null
+++ b/server/external/platform.m4
@@ -0,0 +1,29 @@
+AC_ARG_WITH([os],
+ [AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse)])]
+ )
+osname=""
+if test x"$with_os" != x ; then
+ if test x"$with_os" == xfedora -o \
+ x"$with_os" == xredhat -o \
+ x"$with_os" == xsuse ; then
+ osname=$with_os
+ else
+ AC_MSG_ERROR([Illegal value -$with_os- for option --with-os])
+ fi
+fi
+
+if test x"$osname" = x ; then
+ if test -f /etc/fedora-release ; then
+ osname="fedora"
+ elif test -f /etc/redhat-release ; then
+ osname="redhat"
+ elif test -f /etc/SuSE-release ; then
+ osname="suse"
+ fi
+
+ AC_MSG_NOTICE([Detected operation system type: $osname])
+fi
+
+AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" == xfedora])
+AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" == xredhat])
+AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" == xsuse])