From 3cdebc6df99b92d81fea72584afb6a8be812d966 Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Sat, 8 Mar 2003 00:55:12 +0000
Subject: [PATCH]  o get rid of --with-slurm-conf in favor of standard
 sysconfdir  o update slurm.spec.in for eventual passing of "with-PACKAGE"
 args    in make rpm target

---
 configure.ac  | 21 ++-------------------
 slurm.spec.in | 33 +++++++++++++++++++--------------
 2 files changed, 21 insertions(+), 33 deletions(-)

diff --git a/configure.ac b/configure.ac
index 02b866845ce..cdd2d6236b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,26 +146,9 @@ AC_SUBST(SLURMD_PORT)
 
 dnl Set SLURM_CONFIG_DIR in config.h
 dnl
-AC_MSG_CHECKING(for slurm config dir location)
-AC_ARG_WITH(slurm-conf,
-  AC_HELP_STRING([--with-slurm-conf=DIR],
-      [set slurm config dir location]),
-    [ if test -n "$withval" -a "$withval" != yes -a "$withval" != no; then
-        slurmconf="$withval"
-      fi
-    ]
-)
-
-#
-# FIXME: default config dir is in srcdir
-#        during development. Needs to be
-#        moved to $prefix/etc!!
-#
-topsrcdir=`cd $srcdir && pwd`
-AC_MSG_RESULT(${slurmconf=${topsrcdir}/etc})
-AC_DEFINE_UNQUOTED(SLURM_CONFIG_DIR, "$slurmconf", 
+AC_DEFINE_UNQUOTED(SLURM_CONFIG_DIR, "$sysconfdir", 
                    [Define Default slurm config dir])
-AC_DEFINE_UNQUOTED(SLURM_CONFIG_FILE, "$slurmconf/slurm.conf", 
+AC_DEFINE_UNQUOTED(SLURM_CONFIG_FILE, "$sysconfdir/slurm.conf", 
                    [Define Default slurm config file location])
 
 
diff --git a/slurm.spec.in b/slurm.spec.in
index 0d50616eefc..41fdbc54d20 100644
--- a/slurm.spec.in
+++ b/slurm.spec.in
@@ -12,12 +12,17 @@ Source: %{name}-%{version}-%{release}.tgz
 Requires: readline popt
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
 
-%define _with_elan  1
-%define _with_totalview 1
+#
+# Defaults are --with-elan --with-totalview
+#
+%{!?_with_elan: %{!?_without_elan: %define _with_elan --with-elan}}
+%{!?_with_totalview: %{!?_without_totalview: %define _with_totalview --with-totalview}}
+
+%{?_with_elan:BuildRequires: qsnetdevkit}
 
 %package devel
 Summary: Development package for SLURM.
-Group: System Environment/Base
+Group: Development/System
 Requires: slurm
 
 %package auth-none
@@ -59,18 +64,18 @@ SLURM authentication module for Chris Dunlap's Munge
 %setup -n %{name}-%{version}-%{release}
 
 %build
-%if %{_with_elan}
-	WITHELAN=--with-elan
-%endif
-%if %{_with_totalview}
-	WITHTV=--with-totalview
-%endif
-
 PFX_FIX=--program-prefix=%{?_program_prefix:%{_program_prefix}} 
-
-WITHCONF=--with-slurm-conf=/etc/slurm
-
-%configure --enable-debug $PFX_FIX $WITHCONF $WITHELAN $WITHTV
+WITHCONF=--sysconfdir=/etc/slurm
+
+# for now we build with debugging symbols
+CFLAGS="-g -Wall"
+%configure \
+    --enable-debug                       \
+    $PFX_FIX $WITHCONF $WITHELAN $WITHTV \
+    %{?_with_elan}                       \
+    %{?_without_elan}                    \
+    %{?_with_totalview}                  \
+    %{?_without_totalview}
 
 make
 
-- 
GitLab