summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorHarshavardhana <harsha@zresearch.com>2009-03-01 05:35:18 -0800
committerAnand V. Avati <avati@amp.gluster.com>2009-03-03 11:44:21 +0530
commitda71d1359c1335997595935dbaa07c5747231861 (patch)
tree944744ee0a455b3684c20cac18849e5ff19af0f7 /configure.ac
parentb29a555c0be1c0db47c290d61f8c4dfe1e6fecbf (diff)
Added proper handling for the init scripts for (Debian, Ubuntu, SuSE, Redhat), SuSE init script also added.
* Init scripts added for Debian, Redhat, SuSE distribution, each are installed by checking each distribution specific. Tested on 1. Debian, Ubuntu. 2. Redhat, CentOS. 3. OpenSUSE. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c5e0da84a8e..d6fadbe541b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,6 +490,25 @@ if test "x${have_fdatasync}" = "xyes"; then
AC_DEFINE(HAVE_FDATASYNC, 1, [define if fdatasync exists])
fi
+# Check the distribution where you are compiling glusterfs on
+
+GF_DISTRIBUTION=
+AC_CHECK_FILE([/etc/debian_version])
+AC_CHECK_FILE([/etc/SuSE-release])
+AC_CHECK_FILE([/etc/redhat-release])
+
+if test "x$ac_cv_file__etc_debian_version" = "xyes"; then
+ GF_DISTRIBUTION=Debian
+fi
+if test "x$ac_cv_file__etc_SuSE_release" = "xyes"; then
+ GF_DISTRIBUTION=SuSE
+fi
+if test "x$ac_cv_file__etc_redhat_release" = "xyes"; then
+ GF_DISTRIBUTION=Redhat
+fi
+
+AC_SUBST(GF_DISTRIBUTION)
+
GF_HOST_OS=""
GF_LDFLAGS="-rdynamic"