Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in configure when using dash as shell #2016

Merged
merged 4 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
env:
- *default_env
- CONFIGURE_OPTIONS="--enable-shared --with-petsc --with-slepc --with-sundials=$HOME/local"
- SCRIPT_FLAGS="-uim5t python"
- SCRIPT_FLAGS="-uim5t python -s dash"
- name: "OpenMP"
env:
- *default_env
Expand Down
8 changes: 6 additions & 2 deletions .travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MMS=0
TESTS=0
MAIN_TARGET=
UPDATE_SCRIPT=0
CONFIGURE_SHELL=

usage() {
echo "$0 options are: "
Expand All @@ -19,7 +20,7 @@ usage() {
}

#Handle input flags
while getopts "cuimt:5" arg;
while getopts "cuimt:5s:" arg;
do
case $arg in
c) ### Run the coverage-post job tasks
Expand All @@ -43,6 +44,9 @@ do
5) ### Run the update to version 5 script
UPDATE_SCRIPT=1
;;
s) ### Use specific shell to configure
CONFIGURE_SHELL="$OPTARG"
;;
*) ### Show usage message
usage
;;
Expand Down Expand Up @@ -71,7 +75,7 @@ echo "****************************************"
echo "Configuring with $CONFIGURE_OPTIONS"
echo "****************************************"
conf=0
time ./configure $CONFIGURE_OPTIONS MAKEFLAGS="$MAKEFLAGS" || conf=$?
time $CONFIGURE_SHELL ./configure $CONFIGURE_OPTIONS MAKEFLAGS="$MAKEFLAGS" || conf=$?
if test $conf -gt 0
then
RED_FG="\033[031m"
Expand Down
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6145,7 +6145,7 @@ if test "x$enable_shared" = "xyes"; then :
# PowerPC and SPARC.
# Therfore use -fPIC for now
CXXFLAGS="$CXXFLAGS -fPIC"
LIB_TO_BUILD+=' $(BOUT_LIB_PATH)/libbout++.so'
LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.so'
if test "x$enable_static" = "xauto"; then :

enable_static=no
Expand All @@ -6170,7 +6170,7 @@ fi

if test "x$enable_static" = "xyes"; then :

LIB_TO_BUILD+=' $(BOUT_LIB_PATH)/libbout++.a'
LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.a'
STATIC_EXTRA=':'
# In case we only build static, make sure shared libs are removed
if ! test "x$enable_shared" = "xyes"; then :
Expand All @@ -6183,7 +6183,7 @@ fi

if test "x$LIB_TO_BUILD" = x ; then :

as_fn_error $? "Need to enable at least on of static or shared!" "$LINENO" 5
as_fn_error $? "Need to enable at least one of static or shared!" "$LINENO" 5

fi

Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ AS_IF([test "x$enable_shared" = "xyes"], [
# PowerPC and SPARC.
# Therfore use -fPIC for now
CXXFLAGS="$CXXFLAGS -fPIC"
LIB_TO_BUILD+=' $(BOUT_LIB_PATH)/libbout++.so'
LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.so'
AS_IF([test "x$enable_static" = "xauto"], [
enable_static=no
])
Expand All @@ -414,7 +414,7 @@ AS_IF([test "x$enable_shared" = "xyes"], [
])

AS_IF([test "x$enable_static" = "xyes"], [
LIB_TO_BUILD+=' $(BOUT_LIB_PATH)/libbout++.a'
LIB_TO_BUILD="$LIB_TO_BUILD"' $(BOUT_LIB_PATH)/libbout++.a'
STATIC_EXTRA=':'
# In case we only build static, make sure shared libs are removed
AS_IF([! test "x$enable_shared" = "xyes"], [
Expand All @@ -423,7 +423,7 @@ AS_IF([test "x$enable_static" = "xyes"], [
])

AS_IF([test "x$LIB_TO_BUILD" = x ], [
AC_MSG_ERROR([Need to enable at least on of static or shared!])
AC_MSG_ERROR([Need to enable at least one of static or shared!])
])

#############################################################
Expand Down Expand Up @@ -1204,11 +1204,11 @@ AS_IF([test "$USE_NLS" = "yes"], [

EXTRA_LIBS="$EXTRA_LIBS $LIBINTL"

# Set variable substituted into bout-config
# Set variable substituted into bout-config
HAS_NLS="yes"
],[
AC_MSG_NOTICE([Language support with gettext not available])
])
])

#############################################################
# Sort out fmt
Expand Down