From 82f0ec7eb0f8c4771276356ce96ea2a85ce7c824 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Mon, 21 Apr 2014 17:37:56 -0700 Subject: [PATCH] Revert 028dd57c47235f1ef66e0eb125ba8643a2be7e56 and b6bb83114e3ffe467d0ec79121ac567c3d5f978b Fixed better way by only using the MAJOR and MINOR without MACRO in the AC_INIT for version --- auxdir/slurm.m4 | 9 ---- configure | 119 ++++++++++++++++++----------------------- configure.ac | 12 ++--- src/common/proc_args.c | 2 +- 4 files changed, 58 insertions(+), 84 deletions(-) diff --git a/auxdir/slurm.m4 b/auxdir/slurm.m4 index 7fcda4b7cf9..b43f71d5a2f 100644 --- a/auxdir/slurm.m4 +++ b/auxdir/slurm.m4 @@ -234,20 +234,11 @@ AC_DEFINE_UNQUOTED(RELEASE, "$RELEASE", [Define the project's release.]) AC_DEFINE_UNQUOTED(SLURM_VERSION_STRING, "$SLURM_VERSION_STRING", [Define the project's version string.]) -dnl Overwrite PACKAGE_VERSION and PACKAGE_STRING from what AC_INIT made. -dnl Up till this point we didn't know the correct version -dnl -AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$SLURM_VERSION_STRING", [Define to the version of this package.]) -PACKAGE_STRING="`printf "slurm %s" $SLURM_VERSION_STRING`" -AC_DEFINE_UNQUOTED(PACKAGE_STRING, "$PACKAGE_STRING", [Define to the full name and version of this package.]) - AC_SUBST(SLURM_MAJOR) AC_SUBST(SLURM_MINOR) AC_SUBST(SLURM_MICRO) AC_SUBST(RELEASE) AC_SUBST(SLURM_VERSION_STRING) -AC_SUBST(PACKAGE_VERSION) -AC_SUBST(PACKAGE_STRING) ]) dnl AC_SLURM_VERSION diff --git a/configure b/configure index 2c7c0f49a04..e57fe49b139 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for slurm 0. +# Generated by GNU Autoconf 2.69 for slurm 14.03. # # Report bugs to <slurm-dev@schedmd.com>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='slurm' PACKAGE_TARNAME='slurm' -PACKAGE_VERSION='0' -PACKAGE_STRING='slurm 0' +PACKAGE_VERSION='14.03' +PACKAGE_STRING='slurm 14.03' PACKAGE_BUGREPORT='slurm-dev@schedmd.com' PACKAGE_URL='http://slurm.schedmd.com' @@ -1576,7 +1576,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures slurm 0 to adapt to many kinds of systems. +\`configure' configures slurm 14.03 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1647,7 +1647,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of slurm 0:";; + short | recursive ) echo "Configuration of slurm 14.03:";; esac cat <<\_ACEOF @@ -1835,7 +1835,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -slurm configure 0 +slurm configure 14.03 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2371,7 +2371,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by slurm $as_me 0, which was +It was created by slurm $as_me 14.03, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3002,20 +3002,6 @@ _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$SLURM_VERSION_STRING" -_ACEOF - -PACKAGE_STRING="`printf "slurm %s" $SLURM_VERSION_STRING`" - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - - - - @@ -3509,7 +3495,7 @@ fi # Define the identity of the package. PACKAGE='slurm' - VERSION='0' + VERSION='14.03' # Some tools Automake needs. @@ -22282,49 +22268,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for support of printf(\"%s\", NULL)" >&5 -$as_echo_n "checking for support of printf(\"%s\", NULL)... " >&6; } - if test "$cross_compiling" = yes; then : - printf_null_ok=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include <stdio.h> - #include <stdlib.h> - int main() { char tmp[8]; char *n=NULL; snprintf(tmp,8,"%s",n); exit(0); } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - printf_null_ok=yes -else - printf_null_ok=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - case "$host" in - *solaris*) have_solaris=yes ;; - *) have_solaris=no ;; - esac - - if test "$printf_null_ok" = "no" -a "$have_solaris" = "yes" -a -d /usr/lib64/0@0.so.1; then - as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib64/0@0.so.1" "$LINENO" 5 - elif test "$printf_null_ok" = "no" -a "$have_solaris" = "yes" -a -d /usr/lib/0@0.so.1; then - as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1" "$LINENO" 5 - elif test "$printf_null_ok" = "no" -a "$have_solaris" = "yes"; then - as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119" "$LINENO" 5 - elif test "$printf_null_ok" = "no"; then - as_fn_error $? "printf(\"%s\", NULL) results in abort" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether debugging is enabled" >&5 $as_echo_n "checking whether debugging is enabled... " >&6; } # Check whether --enable-debug was given. @@ -23001,6 +22944,48 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for support of printf(\"%s\", NULL)" >&5 +$as_echo_n "checking for support of printf(\"%s\", NULL)... " >&6; } + if test "$cross_compiling" = yes; then : + printf_null_ok=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <stdio.h> + #include <stdlib.h> + int main() { char tmp[8]; char *n=NULL; snprintf(tmp,8,"%s",n); exit(0); } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + printf_null_ok=yes +else + printf_null_ok=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + case "$host" in + *solaris*) have_solaris=yes ;; + *) have_solaris=no ;; + esac + + if test "$printf_null_ok" = "no" -a "$have_solaris" = "yes" -a -d /usr/lib64/0@0.so.1; then + as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib64/0@0.so.1" "$LINENO" 5 + elif test "$printf_null_ok" = "no" -a "$have_solaris" = "yes" -a -d /usr/lib/0@0.so.1; then + as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1" "$LINENO" 5 + elif test "$printf_null_ok" = "no" -a "$have_solaris" = "yes"; then + as_fn_error $? "printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119" "$LINENO" 5 + elif test "$printf_null_ok" = "no"; then + as_fn_error $? "printf(\"%s\", NULL) results in abort" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether to include readline suport" >&5 $as_echo_n "checking for whether to include readline suport... " >&6; } @@ -24287,7 +24272,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by slurm $as_me 0, which was +This file was extended by slurm $as_me 14.03, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24354,7 +24339,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -slurm config.status 0 +slurm config.status 14.03 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1481a54bf0c..9feb286ee2c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ dnl dnl Here we send in 0 as the version. dnl We overwrite PACKAGE_VERSION and PACKAGE_STRING in X_AC_SLURM_VERSION below dnl -AC_INIT(slurm, 0, [slurm-dev@schedmd.com], [], [http://slurm.schedmd.com]) +AC_INIT(slurm, m4_esyscmd([perl -ne 'print,exit if s/^\s*VERSION:\s*(\d*.\d*).\S*/\1/i' ./META | sed 's/^v//' | tr '-' '_' | tr -d '\n']), [slurm-dev@schedmd.com], [], [http://slurm.schedmd.com]) AC_PREREQ(2.59) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_AUX_DIR([auxdir]) @@ -296,12 +296,6 @@ dnl check for how to emulate setproctitle dnl X_AC_SETPROCTITLE -dnl check if we can use standard printf functions -dnl Has to happen before X_AC_DEBUG just incase --enable-developer is used. -dnl -X_AC_PRINTF_NULL - - dnl check for debug compilation, must follow X_AC_CRAY dnl X_AC_DEBUG @@ -341,6 +335,10 @@ X_AC_MAN2HTML AM_CONDITIONAL(HAVE_MAN2HTML, test "x$ac_have_man2html" = "xyes") AC_SUBST(HAVE_MAN2HTML) +dnl check if we can use standard printf functions +dnl +X_AC_PRINTF_NULL + dnl Check for whether to include readline support dnl X_AC_READLINE diff --git a/src/common/proc_args.c b/src/common/proc_args.c index f040cf9d550..58397281c07 100644 --- a/src/common/proc_args.c +++ b/src/common/proc_args.c @@ -85,7 +85,7 @@ /* print this version of SLURM */ void print_slurm_version(void) { - printf("%s\n", PACKAGE_STRING); + printf("%s %s\n", PACKAGE_NAME, SLURM_VERSION_STRING); } /* print the available gres options */ -- GitLab