Skip to content

Commit

Permalink
Build system fixes supporting newer automake, such as found in ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
mplegendre committed Jun 22, 2018
1 parent 4bfef19 commit 49d9b5b
Show file tree
Hide file tree
Showing 52 changed files with 694 additions and 316 deletions.
2 changes: 1 addition & 1 deletion LIB_VERSION
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

#Return library version in the libtool current:revision:age format.

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -206,9 +206,9 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
Expand Down
8 changes: 8 additions & 0 deletions bootstrap.sh
Expand Up @@ -4,13 +4,15 @@ echo Bootstrap in spindle
autoheader
autoconf
aclocal
automake --add-missing
automake

echo Bootstrap in client
cd src/client
autoheader
autoconf
aclocal
automake --add-missing
automake
cd ../..

Expand All @@ -19,6 +21,7 @@ cd src/server
autoheader
autoconf
aclocal
automake --add-missing
automake
cd ../..

Expand All @@ -27,5 +30,10 @@ cd src/fe
autoheader
autoconf
aclocal
automake --add-missing
automake
cd ../..

automake
touch configure

104 changes: 100 additions & 4 deletions configure
Expand Up @@ -653,7 +653,6 @@ MPI_CFLAGS
MPICC
BLD_TESTSUITE_FALSE
BLD_TESTSUITE_TRUE
AM_CFLAGS
LMON_DYNAMIC_FALSE
LMON_DYNAMIC_TRUE
LMON_FALSE
Expand Down Expand Up @@ -686,6 +685,7 @@ SOCKETS_TRUE
PIPES_FALSE
PIPES_TRUE
TESTRM
AR_FLAGS
CXXCPP
CPP
OTOOL64
Expand Down Expand Up @@ -16200,6 +16200,87 @@ DEFAULT_PORT=21940
DEFAULT_LOC='$TMPDIR'
DEFAULT_NUM_COBO_PORTS=25

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wall" >&5
$as_echo_n "checking for -Wall... " >&6; }
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wall"
CXXFLAGS="$CXXLAGS -Wall"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int
main ()
{

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wno-unused-result" >&5
$as_echo_n "checking for -Wno-unused-result... " >&6; }
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wunused-result"
CXXFLAGS="$CXXFLAGS -Wunused-result"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int
main ()
{

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; CFLAGS="$OCFLAGS -Wno-unused-result"; CXXFLAGS="$OCXXFLAGS -Wno-unused-result"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wno-portability" >&5
$as_echo_n "checking for -Wno-portability... " >&6; }
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wportability"
CXXFLAGS="$CXXFLAGS -Wportability"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int
main ()
{

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; CFLAGS="$OCFLAGS -Wno-portability"; CXXFLAGS="$OCXXFLAGS -Wno-portability"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

AR_FLAGS=cr



# Check whether --with-default-port was given.
if test "${with_default_port+set}" = set; then :
Expand Down Expand Up @@ -16914,9 +16995,11 @@ else
fi


#Default flags
AM_CFLAGS=-Wall

#AC_ARG_WITH(testrm,
# [AS_HELP_STRING([--with-testrm=ARG],[Resource manager to use for tests (valid options are 'slurm' and 'flux')])],
# [TESTRM=${withval}],
# [TESTRM=unknown; AC_MSG_WARN([--with-testrm not specified. Spindle tests will not work])])
#AC_SUBST(TESTRM)

#MPI detection
# Check whether --enable-testsuite was given.
Expand Down Expand Up @@ -17649,6 +17732,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking automake compatibility" >&5
$as_echo_n "checking automake compatibility... " >&6; }
AUTOMAKE_LINE=`head -n 1 ${srcdir}/Makefile.in`
if test "${AUTOMAKE_LINE:0:40}" == "# Makefile.in generated by automake 1.15"; then
if test "x$enable_dependency_tracking" != "xno"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Incompatible automake version. This automake does not generate correct dependency information with Spindle. Please run with a different automake (by adding another automake to your PATH and running bootstrap.sh), or by configuring with the --disable-dependency-tracking option." "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
Expand Down
19 changes: 16 additions & 3 deletions configure.ac
Expand Up @@ -2,7 +2,7 @@ AC_INIT([spindle], m4_esyscmd([tr -d '\n' < VERSION]), m4_esyscmd([tr -d '\n' <
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([scripts])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
AM_PROG_AR
AC_PROG_CC
Expand All @@ -20,8 +20,11 @@ m4_include([m4/ax_tls.m4])
m4_include([m4/lmon.m4])
AX_TLS

#Default flags
AC_SUBST([AM_CFLAGS], [-Wall])
#AC_ARG_WITH(testrm,
# [AS_HELP_STRING([--with-testrm=ARG],[Resource manager to use for tests (valid options are 'slurm' and 'flux')])],
# [TESTRM=${withval}],
# [TESTRM=unknown; AC_MSG_WARN([--with-testrm not specified. Spindle tests will not work])])
#AC_SUBST(TESTRM)

#MPI detection
AC_ARG_ENABLE(testsuite,
Expand All @@ -48,6 +51,16 @@ AC_ARG_VAR([BE_CPP], [CPP for back end])
AC_ARG_VAR([BE_CXXCPP], [CXXCPP for back end])
AC_ARG_VAR([BE_host], [host to use for back end])

AC_MSG_CHECKING([automake compatibility])
AUTOMAKE_LINE=`head -n 1 ${srcdir}/Makefile.in`
if test "${AUTOMAKE_LINE:0:40}" == "# Makefile.in generated by automake 1.15"; then
if test "x$enable_dependency_tracking" != "xno"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Incompatible automake version. This automake does not generate correct dependency information with Spindle. Please run with a different automake (by adding another automake to your PATH and running bootstrap.sh), or by configuring with the --disable-dependency-tracking option.])
fi
fi
AC_MSG_RESULT([yes])

AC_OUTPUT

#Set BE_CC, BE_CXX and related flags
Expand Down
27 changes: 27 additions & 0 deletions configure.common.ac
Expand Up @@ -4,6 +4,33 @@ DEFAULT_PORT=21940
DEFAULT_LOC='$TMPDIR'
DEFAULT_NUM_COBO_PORTS=25

AC_MSG_CHECKING([for -Wall])
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wall"
CXXFLAGS="$CXXLAGS -Wall"
AC_TRY_COMPILE([], [], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no); CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS])

AC_MSG_CHECKING([for -Wno-unused-result])
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wunused-result"
CXXFLAGS="$CXXFLAGS -Wunused-result"
AC_TRY_COMPILE([], [],
[AC_MSG_RESULT(yes); CFLAGS="$OCFLAGS -Wno-unused-result"; CXXFLAGS="$OCXXFLAGS -Wno-unused-result"],
[AC_MSG_RESULT(no); CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS])

AC_MSG_CHECKING([for -Wno-portability])
OCFLAGS=$CFLAGS
OCXXFLAGS=$CXXFLAGS
CFLAGS="$CFLAGS -Wportability"
CXXFLAGS="$CXXFLAGS -Wportability"
AC_TRY_COMPILE([], [],
[AC_MSG_RESULT(yes); CFLAGS="$OCFLAGS -Wno-portability"; CXXFLAGS="$OCXXFLAGS -Wno-portability"],
[AC_MSG_RESULT(no); CFLAGS=$OCFLAGS; CXXFLAGS=$OCXXFLAGS])

AC_SUBST([AR_FLAGS], [cr])

AC_ARG_WITH(default-port,
[AS_HELP_STRING([--with-default-port=NUM],[TCP/IP Port for Spindle server communication])],
[SPINDLE_PORT=${withval}],
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.in
Expand Up @@ -147,9 +147,9 @@ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
Expand Down
1 change: 1 addition & 0 deletions src/client/Makefile.in
Expand Up @@ -212,6 +212,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
Expand Down
1 change: 1 addition & 0 deletions src/client/auditclient/Makefile.in
Expand Up @@ -250,6 +250,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
Expand Down
2 changes: 1 addition & 1 deletion src/client/beboot/Makefile.am
Expand Up @@ -2,7 +2,7 @@ pkglibexec_PROGRAMS = spindle_bootstrap

spindle_bootstrap_LDFLAGS = -all-static $(AM_LDFLAGS)
spindle_bootstrap_CPPFLAGS = $(AM_CPPFLAGS) -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -I$(top_srcdir)/../include -I$(top_srcdir)/../logging -I$(top_srcdir)/client_comlib -I$(top_srcdir)/client
spindle_bootstrap_LDADD = $(top_builddir)/logging/libspindlelogc.la
spindle_bootstrap_LDADD = $(top_builddir)/logging/libspindleclogc.la
spindle_bootstrap_SOURCES = spindle_bootstrap.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/client/exec_util.c

if PIPES
Expand Down
5 changes: 3 additions & 2 deletions src/client/beboot/Makefile.in
Expand Up @@ -109,7 +109,7 @@ am_spindle_bootstrap_OBJECTS = \
spindle_bootstrap-exec_util.$(OBJEXT)
spindle_bootstrap_OBJECTS = $(am_spindle_bootstrap_OBJECTS)
spindle_bootstrap_DEPENDENCIES = \
$(top_builddir)/logging/libspindlelogc.la $(am__append_1) \
$(top_builddir)/logging/libspindleclogc.la $(am__append_1) \
$(am__append_2)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
Expand Down Expand Up @@ -184,6 +184,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
Expand Down Expand Up @@ -302,7 +303,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
spindle_bootstrap_LDFLAGS = -all-static $(AM_LDFLAGS)
spindle_bootstrap_CPPFLAGS = $(AM_CPPFLAGS) -DLIBEXECDIR=\"$(pkglibexecdir)\" -DPROGLIBDIR=\"$(pkglibdir)\" -I$(top_srcdir)/../include -I$(top_srcdir)/../logging -I$(top_srcdir)/client_comlib -I$(top_srcdir)/client
spindle_bootstrap_LDADD = $(top_builddir)/logging/libspindlelogc.la \
spindle_bootstrap_LDADD = $(top_builddir)/logging/libspindleclogc.la \
$(am__append_1) $(am__append_2)
spindle_bootstrap_SOURCES = spindle_bootstrap.c $(top_srcdir)/../utils/parseloc.c $(top_srcdir)/../utils/spindle_mkdir.c $(top_srcdir)/client/exec_util.c
all: all-am
Expand Down
13 changes: 6 additions & 7 deletions src/client/biter/Makefile.am
@@ -1,19 +1,18 @@
noinst_LTLIBRARIES = libbiterc.la libsheep.la

BS=$(top_srcdir)/../biter

libbiterc_la_SOURCES = $(BS)/biterc.c $(BS)/client_queue.c $(BS)/demultiplex.c
libbiterc_la_SOURCES = $(top_srcdir)/../biter/biterc.c $(top_srcdir)/../biter/client_queue.c $(top_srcdir)/../biter/demultiplex.c
libbiterc_la_CFLAGS = -DCLIENT
libbiterc_la_LIBADD = libsheep.la

libsheep_la_SOURCES = $(BS)/sheep.c $(BS)/shmutil.c $(BS)/shm_wrappers.c
libsheep_la_SOURCES = $(top_srcdir)/../biter/sheep.c $(top_srcdir)/../biter/shmutil.c $(top_srcdir)/../biter/shm_wrappers.c

AM_CPPFLAGS = -I$(BS) -I$(top_srcdir)/../logging
AM_CPPFLAGS = -I$(top_srcdir)/../biter -I$(top_srcdir)/../logging
AM_CFLAGS = -fvisibility=hidden

if BGQ_BLD
AM_CPPFLAGS += -I/bgsys/drivers/ppcfloor/comm/lib/gnu -I/bgsys/drivers/ppcfloor -I/bgsys/drivers/ppcfloor/comm/sys/include -I/bgsys/drivers/ppcfloor/spi/include -I/bgsys/drivers/ppcfloor/spi/include/kernel/cnk
libbiterc_la_SOURCES += $(BS)/bgq_ids.c
libbiterc_la_SOURCES += $(top_srcdir)/../biter/bgq_ids.c
endif
if LINUX_BLD
libbiterc_la_SOURCES += $(BS)/linux_ids.c
libbiterc_la_SOURCES += $(top_srcdir)/../biter/linux_ids.c
endif

0 comments on commit 49d9b5b

Please sign in to comment.