Skip to content
Open
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
10 changes: 5 additions & 5 deletions .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ jobs:
fi

if [ "$USE_CMAKE" = "1" ]; then
curl -OL https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.2.tar.gz
tar -zxf v4.9.2.tar.gz
cd netcdf-c-4.9.2
curl -OL https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.3.tar.gz
tar -zxf v4.9.3.tar.gz
cd netcdf-c-4.9.3
./configure --disable-byterange --disable-libxml2 --disable-netcdf-4 --disable-dap --disable-doxygen --prefix=$HOME
make -j2
make install
Expand All @@ -119,7 +119,7 @@ jobs:
export PATH=$installdir/bin:$PATH
else
export LD_LIBRARY_PATH=$HOME/lib:${LD_LIBRARY_PATH}
./configure --buildlibs ${BUILD_FLAGS} ${COMPILER}
./configure -makeblas --buildlibs ${BUILD_FLAGS} ${COMPILER}
source cpptraj.sh
make -j2 install
fi
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
echo $LD_LIBRARY_PATH
ls $CONDA/lib
export MAKE_COMMAND="make -j2"
./configure --buildlibs -openmp -shared --with-zlib=$CONDA --with-bzlib=$CONDA --with-hdf5=$CONDA --with-netcdf=$CONDA --with-fftw3=$CONDA gnu
./configure -makeblas --buildlibs -openmp -shared --with-zlib=$CONDA --with-bzlib=$CONDA --with-hdf5=$CONDA --with-netcdf=$CONDA --with-fftw3=$CONDA gnu
source cpptraj.sh
make -j2 libcpptraj
- name: Install pytraj
Expand Down
16 changes: 13 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ UsageFull() {
echo " --nobuildlibs : Do not asking about building enabled libraries."
echo " -makenetcdf : Have cpptraj build its own NetCDF."
echo " -makeblas : Have cpptraj build its own LAPACK/BLAS."
echo " -makerl : Have cpptraj build its own readline."
echo " --libdir=<dir> : Look for libraries in <dir> (useful to point to e.g. a previous CPPTRAJ install."
echo " Libraries: netcdf pnetcdf zlib bzlib blas lapack arpack fftw3 readline sanderlib xdrfile tng openmm"
echo " Note: pnetcdf is needed for writing NetCDF trajectories with MPI."
Expand Down Expand Up @@ -134,8 +135,8 @@ COMPERR='cpptrajcfg.compile.err'
COMPOUT='cpptrajcfg.compile.out'

# ----- Variables for downloading libraries ------
NETCDF_SRCTAR='v4.9.2.tar.gz'
NETCDF_SRCDIR='netcdf-c-4.9.2'
NETCDF_SRCTAR='v4.9.3.tar.gz'
NETCDF_SRCDIR='netcdf-c-4.9.3'
NETCDF_URL="https://github.com/Unidata/netcdf-c/archive/refs/tags/$NETCDF_SRCTAR"
NETCDF_OPTS=" --disable-byterange --disable-libxml2 --disable-netcdf-4 --disable-dap --disable-nczarr $windows_hostflag --disable-shared --disable-doxygen"
NETCDF4_OPTS=" --disable-byterange --disable-libxml2 --disable-dap --disable-nczarr $windows_hostflag --disable-shared --disable-doxygen"
Expand Down Expand Up @@ -165,7 +166,7 @@ LAPACK_SRCDIR='lapack-3.9.0'
LAPACK_URL="https://github.com/Reference-LAPACK/lapack/archive/$LAPACK_SRCTAR"
LAPACK_OPTS=''

PNETCDF_SRCTAR='pnetcdf-1.12.2.tar.gz'
PNETCDF_SRCTAR='pnetcdf-1.14.1.tar.gz'
PNETCDF_SRCDIR=''
PNETCDF_URL="https://parallel-netcdf.github.io/Release/$PNETCDF_SRCTAR"
PNETCDF_OPTS='--disable-fortran --disable-cxx'
Expand Down Expand Up @@ -200,6 +201,7 @@ USE_AMBERLIB=0 # 1 = Use AMBERHOME to fill in NetCDF/BLAS/LAPACK/ARPACK as ne
BUILD_LIBS=0 # 1 = Means automatically say yes to building enabled libs when not present.
BUILD_MPI='' # If not empty, attempt to download and build specified mpi dist.
icpp=0 # Used to count cmake_prefix_paths
use_bundled_readline=0 # 1 = use bundled readline no matter what

USE_SINGLEENSEMBLE=0 # Enable support for single ensemble trajectories
USE_CPPTRAJDEBUG=0 # Enable internal cpptraj debug flags
Expand Down Expand Up @@ -1121,6 +1123,13 @@ EOF
}

TestReadline() {
if [ $use_bundled_readline -eq 1 ] ; then
echo " Will build bundled readline."
LIB_STAT[$LREADLINE]='bundled'
LIB_FLAG[$LREADLINE]='readline/libreadline.a'
LIB_INCL[$LREADLINE]='-I.'
return 0
fi
cat > testp.cpp <<EOF
#include <cstdio>
#include <readline/readline.h>
Expand Down Expand Up @@ -2844,6 +2853,7 @@ while [ ! -z "$1" ] ; do
'-noc++11' ) C11_SUPPORT='no' ;;
'-windows' ) PLATFORM='windows' ;;
'-pubfft' ) LIB_STAT[$LFFTW3]='off' ;;
'-makerl' ) use_bundled_readline=1 ;;
# Cpptraj options
'-nolfs' ) LFS='' ;;
'-single-ensemble' ) USE_SINGLEENSEMBLE=1 ;;
Expand Down
2 changes: 1 addition & 1 deletion src/readline/histlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

#ifndef member
# ifndef strchr
extern char *strchr ();
extern char *strchr (const char*, int);
# endif
#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
#endif
Expand Down
18 changes: 5 additions & 13 deletions src/readline/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

/* This typedef is equivalent to the one for Function; it allows us
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
typedef RETSIGTYPE SigHandler ();
typedef RETSIGTYPE SigHandler (int);

#if defined (HAVE_POSIX_SIGNALS)
typedef struct sigaction sighandler_cxt;
Expand Down Expand Up @@ -113,8 +113,7 @@ static sighandler_cxt old_winch;
/* Readline signal handler functions. */

static RETSIGTYPE
rl_signal_handler (sig)
int sig;
rl_signal_handler (int sig)
{
#if defined (HAVE_POSIX_SIGNALS)
sigset_t set;
Expand Down Expand Up @@ -197,8 +196,7 @@ rl_signal_handler (sig)

#if defined (SIGWINCH)
static RETSIGTYPE
rl_sigwinch_handler (sig)
int sig;
rl_sigwinch_handler (int sig)
{
SigHandler *oh;

Expand Down Expand Up @@ -242,10 +240,7 @@ rl_sigaction (sig, nh, oh)
information in OHANDLER. Return the old signal handler, like
signal(). */
static SigHandler *
rl_set_sighandler (sig, handler, ohandler)
int sig;
SigHandler *handler;
sighandler_cxt *ohandler;
rl_set_sighandler (int sig, SigHandler* handler, sighandler_cxt* ohandler)
{
sighandler_cxt old_handler;
#if defined (HAVE_POSIX_SIGNALS)
Expand All @@ -270,10 +265,7 @@ rl_set_sighandler (sig, handler, ohandler)
}

static void
rl_maybe_set_sighandler (sig, handler, ohandler)
int sig;
SigHandler *handler;
sighandler_cxt *ohandler;
rl_maybe_set_sighandler (int sig, SigHandler* handler, sighandler_cxt* ohandler)
{
sighandler_cxt dummy;
SigHandler *oh;
Expand Down
38 changes: 12 additions & 26 deletions src/readline/termcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ xrealloc (ptr, size)
for tgetnum, tgetflag and tgetstr to find. */
static char *term_entry;

static char *tgetst1 ();
static char* tgetst1 (char* ptr, char** area);

/* Search entry BP for capability CAP.
Return a pointer to the capability (in BP) if found,
Expand Down Expand Up @@ -208,9 +208,7 @@ static char esctab[]
or NULL if PTR is NULL. */

static char *
tgetst1 (ptr, area)
char *ptr;
char **area;
tgetst1 (char* ptr, char** area)
{
register char *p, *r;
register int c;
Expand Down Expand Up @@ -314,10 +312,7 @@ static int speeds[] =
#endif /* not emacs */

void
tputs (str, nlines, outfun)
register char *str;
int nlines;
register int (*outfun) ();
tputs (register char* str, int nlines, register int (*outfun)(char))
{
register int padcount = 0;
register int speed;
Expand Down Expand Up @@ -389,10 +384,10 @@ struct termcap_buffer

/* Forward declarations of static functions. */

static int scan_file ();
static char *gobble_line ();
static int compare_contin ();
static int name_match ();
static int scan_file (char* str, int fd, register struct termcap_buffer* bufp);
static char *gobble_line (int fd, register struct termcap_buffer* bufp, char* append_end);
static int compare_contin (register char* str1, register char* str2);
static int name_match(char* line, char* name);

#ifdef VMS

Expand Down Expand Up @@ -446,8 +441,7 @@ valid_filename_p (fn)
in it, and some other value otherwise. */

int
tgetent (bp, name)
char *bp, *name;
tgetent (char* bp, char* name)
{
register char *termcap_name;
register int fd;
Expand Down Expand Up @@ -611,10 +605,7 @@ tgetent (bp, name)
or 0 if no entry is found in the file. */

static int
scan_file (str, fd, bufp)
char *str;
int fd;
register struct termcap_buffer *bufp;
scan_file (char* str, int fd, register struct termcap_buffer* bufp)
{
register char *end;

Expand Down Expand Up @@ -651,8 +642,7 @@ scan_file (str, fd, bufp)
by termcap entry LINE. */

static int
name_match (line, name)
char *line, *name;
name_match (char* line, char* name)
{
register char *tem;

Expand All @@ -667,8 +657,7 @@ name_match (line, name)
}

static int
compare_contin (str1, str2)
register char *str1, *str2;
compare_contin (register char* str1, register char* str2)
{
register int c1, c2;
while (1)
Expand Down Expand Up @@ -708,10 +697,7 @@ compare_contin (str1, str2)
thing as one line. The caller decides when a line is continued. */

static char *
gobble_line (fd, bufp, append_end)
int fd;
register struct termcap_buffer *bufp;
char *append_end;
gobble_line (int fd, register struct termcap_buffer* bufp, char* append_end)
{
register char *end;
register int nread;
Expand Down
17 changes: 4 additions & 13 deletions src/readline/tparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,11 @@ xrealloc (ptr, size)

The fourth and following args to tparam serve as the parameter values. */

static char *tparam1 ();
static char* tparam1 (char* string, char* outstring, int len, char* up, char* left, register int* argp);

/* VARARGS 2 */
char *
tparam (string, outstring, len, arg0, arg1, arg2, arg3)
char *string;
char *outstring;
int len;
int arg0, arg1, arg2, arg3;
static char *
tparam (char* string, char* outstring, int len, int arg0, int arg1, int arg2, int arg3)
{
int arg[4];

Expand Down Expand Up @@ -130,12 +126,7 @@ tgoto (cm, hpos, vpos)
}

static char *
tparam1 (string, outstring, len, up, left, argp)
char *string;
char *outstring;
int len;
char *up, *left;
register int *argp;
tparam1 (char* string, char* outstring, int len, char* up, char* left, register int* argp)
{
register int c;
register char *p = string;
Expand Down
Loading