Use cmakedefine01 for more trivial defines
authorErik Lindahl <erik@kth.se>
Tue, 7 Jul 2015 09:45:31 +0000 (11:45 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 10 Jul 2015 17:32:51 +0000 (19:32 +0200)
This patch does the move for GMX_CXX11, HAVE_EXTRAE,
GMX_NO_RENAME, all the QMMM defines, GMX_X11, HAVE_POSIX_REGEX,
HAVE_CXX11_REGEX, HAVE_SIGUSR1, GMX_COOL_QUOTES, HAVE_PIPES,
HAVE_FEENABLEEXCEPT and HAVE_ZLIB.

Change-Id: I2c915c608d9fd16d584b605373c1151dcf3cc010

17 files changed:
src/config.h.cmakein
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxlib/checkpoint.cpp
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/gmxlib/sighandler.c
src/gromacs/math/utilities.c
src/gromacs/mdlib/qm_gamess.cpp
src/gromacs/mdlib/qm_gaussian.cpp
src/gromacs/mdlib/qm_mopac.cpp
src/gromacs/mdlib/qmmm.cpp
src/gromacs/selection/parser_internal.h
src/gromacs/utility/futil.cpp
src/gromacs/utility/gmxregex.cpp
src/gromacs/utility/scoped_cptr.h
src/gromacs/utility/uniqueptr.h
src/programs/mdrun/tests/rerun.cpp
src/programs/view/view.cpp

index 51f3fb0ec646243814a9a51a566639ec0a7012bd..1a03026317599d38606ea9aad795971d30edf017 100644 (file)
@@ -74,7 +74,7 @@
 #cmakedefine GMX_CYGWIN
 
 /** Define if we have sufficient C++11 support */
-#cmakedefine GMX_CXX11
+#cmakedefine01 GMX_CXX11
 
 /* GCC bug in AVX maskload/maskstore arguments - worked around internally */
 #cmakedefine GMX_SIMD_X86_AVX_GCC_MASKLOAD_BUG
 #cmakedefine GMX_USE_TNG
 
 /* Add support for tracing using Extrae */
-#cmakedefine HAVE_EXTRAE
+#cmakedefine01 HAVE_EXTRAE
 
 /* Use MPI (with mpicc) for parallelization */
 #cmakedefine GMX_LIB_MPI
 /* Maximum number of OpenMP threads supported */
 #define GMX_OPENMP_MAX_THREADS @GMX_OPENMP_MAX_THREADS@
 
-/* Use if can't rename checkpoints */
-#cmakedefine GMX_NO_RENAME
+/* Use if we cannot rename checkpoints */
+#cmakedefine01 GMX_NO_RENAME
 
 /* Use (modified) Gamess-UK for QM-MM calculations */
-#cmakedefine GMX_QMMM_GAMESS
+#cmakedefine01 GMX_QMMM_GAMESS
 
 /* Use (modified) Gaussian0x for QM-MM calculations */
-#cmakedefine GMX_QMMM_GAUSSIAN
+#cmakedefine01 GMX_QMMM_GAUSSIAN
 
 /* Use (modified) Mopac 7 for QM-MM calculations */
-#cmakedefine GMX_QMMM_MOPAC
+#cmakedefine01 GMX_QMMM_MOPAC
 
 /* Use ORCA for QM-MM calculations */
-#cmakedefine GMX_QMMM_ORCA
+#cmakedefine01 GMX_QMMM_ORCA
 
 /* Use the GROMACS software 1/sqrt(x) */
 #cmakedefine GMX_SOFTWARE_INVSQRT
 #cmakedefine HAVE_PTHREAD_SETAFFINITY
 
 /* Define for X-Windows */
-#cmakedefine GMX_X11
+#cmakedefine01 GMX_X11
 
 /* Enable x86 gcc inline assembly */
 #cmakedefine GMX_X86_GCC_INLINE_ASM
 #cmakedefine HAVE_SCHED_H
 
 /* Define to 1 if you have the POSIX <regex.h> header file. */
-#cmakedefine HAVE_POSIX_REGEX
+#cmakedefine01 HAVE_POSIX_REGEX
 
 /* Define to 1 if you have the C++11 <regex> header file. */
-#cmakedefine HAVE_CXX11_REGEX
+#cmakedefine01 HAVE_CXX11_REGEX
 
 /* Define to 1 if you have the sysconf() function */
 #cmakedefine HAVE_SYSCONF
 #cmakedefine01 GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
 
 /* Define if SIGUSR1 is present */
-#cmakedefine HAVE_SIGUSR1
+#cmakedefine01 HAVE_SIGUSR1
 
 /* Enable gromacs quotes */
-#cmakedefine GMX_COOL_QUOTES
+#cmakedefine01 GMX_COOL_QUOTES
 
 /* default name mangling maybe wrong on exotic plattforms */
 #define F77_FUNC(name,NAME) name ## _
 
 /* Define if we have pipes */
-#cmakedefine HAVE_PIPES
+#cmakedefine01 HAVE_PIPES
 
 /* Define if we have feenableexcept */
-#cmakedefine HAVE_FEENABLEEXCEPT
+#cmakedefine01 HAVE_FEENABLEEXCEPT
 
 /* Define if we have zlib */
-#cmakedefine HAVE_ZLIB
+#cmakedefine01 HAVE_ZLIB
 
 /*! \endcond */
 
index 43ce3e50b1c2d68eb5ef4e573309d120c19b4c29..3b6c2c161593d16fb8072d80eb26ed59fdfad059 100644 (file)
@@ -1896,7 +1896,7 @@ FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPipeOpen)
         {
             printf("Executing command '%s'\n", Buffer);
         }
-#ifdef HAVE_PIPES
+#if HAVE_PIPES
         if ((pipe = popen(Buffer, "r")) == NULL)
         {
             gmx_fatal(FARGS, "Unable to open pipe to `%s'\n", Buffer);
@@ -1918,7 +1918,7 @@ FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPipeOpen)
 //! Close file or pipe
 void pdo_close_file(FILE *fp)
 {
-#ifdef HAVE_PIPES
+#if HAVE_PIPES
     pclose(fp);
 #else
     gmx_ffclose(fp);
index 75bbd5cef573b2a695a5cbd354cd4ed355d003f4..e38563f9c95446411ec6ea473492da16111252ca 100644 (file)
@@ -1487,7 +1487,7 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep,
         npmenodes = 0;
     }
 
-#ifndef GMX_NO_RENAME
+#if !GMX_NO_RENAME
     /* make the new temporary filename */
     snew(fntemp, strlen(fn)+5+STEPSTRSIZE);
     strcpy(fntemp, fn);
@@ -1642,7 +1642,7 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep,
 
     /* we don't move the checkpoint if the user specified they didn't want it,
        or if the fsyncs failed */
-#ifndef GMX_NO_RENAME
+#if !GMX_NO_RENAME
     if (!bNumberAndKeep && !ret)
     {
         if (gmx_fexist(fn))
index 726edde72b4568bc45318d14b5cd54a24ac41485..e663af5bb955bf14f57cbd28c8fd5fce871acb3d 100644 (file)
@@ -50,7 +50,7 @@
 #ifdef HAVE_LIBMKL
 #include <mkl.h>
 #endif
-#ifdef HAVE_EXTRAE
+#if HAVE_EXTRAE
 #include <extrae_user_events.h>
 #endif
 #include <boost/version.hpp>
@@ -78,7 +78,7 @@ static gmx_bool be_cool(void)
      * but we dont call this routine often, and it avoids using
      * a mutex for locking the variable...
      */
-#ifdef GMX_COOL_QUOTES
+#if GMX_COOL_QUOTES
     return (getenv("GMX_NO_QUOTES") == NULL);
 #else
     /*be uncool*/
@@ -738,7 +738,7 @@ static void gmx_print_version_info(FILE *fp)
 #else
     fprintf(fp, "RDTSCP usage:       disabled\n");
 #endif
-#ifdef GMX_CXX11
+#if GMX_CXX11
     fprintf(fp, "C++11 compilation:  enabled\n");
 #else
     fprintf(fp, "C++11 compilation:  disabled\n");
@@ -748,7 +748,7 @@ static void gmx_print_version_info(FILE *fp)
 #else
     fprintf(fp, "TNG support:        disabled\n");
 #endif
-#ifdef HAVE_EXTRAE
+#if HAVE_EXTRAE
     unsigned major, minor, revision;
     Extrae_get_version(&major, &minor, &revision);
     fprintf(fp, "Tracing support:    enabled. Using Extrae-%d.%d.%d\n", major, minor, revision);
index 75ff86caba063cd5da802bd6b82451637c34a5eb..d22fe2159be12204fbf0d8944ec4e391c3b8c857 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -100,7 +100,7 @@ static void signal_handler(int n)
                 abort();
             }
             break;
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
         case SIGUSR1:
             usr_condition = 1;
             break;
@@ -141,7 +141,7 @@ void signal_handler_install(void)
         }
         gmx_signal(SIGINT);
     }
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
     if (getenv("GMX_NO_USR1") == NULL)
     {
         if (debug)
@@ -181,7 +181,7 @@ const char *gmx_get_signal_name(void)
 
 gmx_bool gmx_got_usr_signal(void)
 {
-#ifdef HAVE_SIGUSR1
+#if HAVE_SIGUSR1
     gmx_bool ret = (gmx_bool)usr_condition;
     usr_condition = 0;
     return ret;
index d50bae92932b6f22ad09c790532ded731eb64477..646ecfe2e12ad735a2818c89cb3e5a6ddfaff747 100644 (file)
@@ -857,7 +857,7 @@ int gmx_greatest_common_divisor(int p, int q)
 
 int gmx_feenableexcept()
 {
-#ifdef HAVE_FEENABLEEXCEPT
+#if HAVE_FEENABLEEXCEPT
     return feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
 #elif (defined(__i386__) || defined(__x86_64__)) && defined(__APPLE__)
     /* Author:  David N. Williams
index b7c729b29d34b8b7c9c896eda8e5ca5f9970e1ac..0921efd187df45913e5229f49a8733432e4f2cdb 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "config.h"
 
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
 
 #include <math.h>
 #include <stdio.h>
index 6f519c26b3f64f322f1d876215fa04b548e8f9ea..ab7e7c4c18b1436d3c7cf28878ab64dcd437356d 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "config.h"
 
-#ifdef GMX_QMMM_GAUSSIAN
+#if GMX_QMMM_GAUSSIAN
 
 #include <math.h>
 #include <stdio.h>
index 7496965bf09be4db5fcce49db1edc2266f4ff30f..16b2d38f03c9f1f5c0b9f4ba7115046faf3f906a 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "config.h"
 
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
 
 #include <math.h>
 #include <stdio.h>
index cf7f7b344082ac850676c7b20f2412245ac43d3d..d2aabba8caf2300c70168ba11c77166ce6601f59 100644 (file)
@@ -70,7 +70,7 @@
 /* declarations of the interfaces to the QM packages. The _SH indicate
  * the QM interfaces can be used for Surface Hopping simulations
  */
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
 /* GAMESS interface */
 
 void
@@ -80,7 +80,7 @@ real
 call_gamess(t_forcerec *fr,
             t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
 
-#elif defined GMX_QMMM_MOPAC
+#elif GMX_QMMM_MOPAC
 /* MOPAC interface */
 
 void
@@ -92,7 +92,7 @@ call_mopac(t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
 real
 call_mopac_SH(t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
 
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
 /* GAUSSIAN interface */
 
 void
@@ -104,7 +104,7 @@ call_gaussian_SH(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift
 real
 call_gaussian(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
 
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
 /* ORCA interface */
 
 void
@@ -162,7 +162,7 @@ real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec
 
     if (qm->QMmethod < eQMmethodRHF && !(mm->nrMMatoms))
     {
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
         if (qm->bSH)
         {
             QMener = call_mopac_SH(qm, mm, f, fshift);
@@ -180,7 +180,7 @@ real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec
         /* do an ab-initio calculation */
         if (qm->bSH && qm->QMmethod == eQMmethodCASSCF)
         {
-#ifdef GMX_QMMM_GAUSSIAN
+#if GMX_QMMM_GAUSSIAN
             QMener = call_gaussian_SH(fr, qm, mm, f, fshift);
 #else
             gmx_fatal(FARGS, "Ab-initio Surface-hopping only supported with Gaussian.");
@@ -188,11 +188,11 @@ real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec
         }
         else
         {
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
             QMener = call_gamess(fr, qm, mm, f, fshift);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
             QMener = call_gaussian(fr, qm, mm, f, fshift);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
             QMener = call_orca(fr, qm, mm, f, fshift);
 #else
             gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
@@ -208,7 +208,7 @@ void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gm
      */
     if (qm->QMmethod < eQMmethodRHF)
     {
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
         /* do a semi-empiprical calculation */
         init_mopac(qm);
 #else
@@ -218,11 +218,11 @@ void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gm
     else
     {
         /* do an ab-initio calculation */
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
         init_gamess(cr, qm, mm);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
         init_gaussian(qm);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
         init_orca(qm);
 #else
         gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
@@ -751,7 +751,7 @@ void init_QMMMrec(t_commrec  *cr,
          */
         if (qr->qm[0]->QMmethod < eQMmethodRHF)
         {
-#ifdef GMX_QMMM_MOPAC
+#if GMX_QMMM_MOPAC
             /* semi-empiprical 1-layer ONIOM calculation requested (mopac93) */
             init_mopac(qr->qm[0]);
 #else
@@ -761,11 +761,11 @@ void init_QMMMrec(t_commrec  *cr,
         else
         {
             /* ab initio calculation requested (gamess/gaussian/ORCA) */
-#ifdef GMX_QMMM_GAMESS
+#if GMX_QMMM_GAMESS
             init_gamess(cr, qr->qm[0], qr->mm);
-#elif defined GMX_QMMM_GAUSSIAN
+#elif GMX_QMMM_GAUSSIAN
             init_gaussian(qr->qm[0]);
-#elif defined GMX_QMMM_ORCA
+#elif GMX_QMMM_ORCA
             init_orca(qr->qm[0]);
 #else
             gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
index f00413346f22174394ca83a97e28b0645ac3aa38..379dc199387ff12c87b628cb49c6b327e0087cd0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -151,7 +151,7 @@ yyerror(YYLTYPE *location, yyscan_t scanner, char const *s)
     }
 //!\}
 
-#ifndef GMX_CXX11
+#if !GMX_CXX11
 //! No-op to enable use of same get()/set() implementation as with C++11.
 static gmx::SelectionParserValue &move(gmx::SelectionParserValue &src)
 {
@@ -170,7 +170,7 @@ static gmx::SelectionParserParameter &move(gmx::SelectionParserParameter &src)
  * \param[in] src  Semantic value to get the value from.
  * \returns   Retrieved value.
  * \throws    unspecified  Any exception thrown by the move constructor of
- *      ValueType (copy constructor if GMX_CXX11 is not set).
+ *      ValueType (copy constructor if GMX_CXX11 is 0).
  *
  * There should be no statements that may throw exceptions in actions before
  * this function has been called for all semantic values that have a C++ object
@@ -196,7 +196,7 @@ ValueType get(ValueType *src)
  * \param[in]  value Value to put into the semantic value.
  * \throws     std::bad_alloc if out of memory.
  * \throws     unspecified  Any exception thrown by the move constructor of
- *      ValueType (copy constructor if GMX_CXX11 is not set).
+ *      ValueType (copy constructor if GMX_CXX11 is 0).
  *
  * This should be the last statement before ::END_ACTION, except for a
  * possible ::CHECK_SEL.
index 55285b292be7a7478f34024929a35b9de2da0697..2ca5514005b934bce484410de85303e6402c4af7 100644 (file)
@@ -165,7 +165,7 @@ void push_ps(FILE *fp)
 #ifdef gmx_ffclose
 #undef gmx_ffclose
 #endif
-#if (!defined(HAVE_PIPES) && !defined(__native_client__))
+#if (!HAVE_PIPES && !defined(__native_client__))
 static FILE *popen(const char *nm, const char *mode)
 {
     gmx_impl("Sorry no pipes...");
@@ -179,7 +179,7 @@ static int pclose(FILE *fp)
 
     return 0;
 }
-#endif /* !defined(HAVE_PIPES) && !defined(__native_client__) */
+#endif /* !HAVE_PIPES && !defined(__native_client__) */
 #endif /* GMX_FAHCORE */
 
 int gmx_ffclose(FILE *fp)
index 1a9cd02901351b935df4d657d84fc68cd75b5297..4b3270eca7296f775c29dd7e26252c3e80646ffa 100644 (file)
 
 #include "config.h"
 
-#if defined(HAVE_POSIX_REGEX)
-#include <sys/types.h>
+#if HAVE_POSIX_REGEX
+#    include <sys/types.h>
 // old Mac needs sys/types.h before regex.h
-#include <regex.h>
-#define USE_POSIX_REGEX
-#elif defined(HAVE_CXX11_REGEX)
-#include <regex>
-#define USE_CXX11_REGEX
+#    include <regex.h>
+#elif HAVE_CXX11_REGEX
+#    include <regex>
 #endif
 
 #include "gromacs/utility/exceptions.h"
@@ -64,14 +62,14 @@ namespace gmx
 // static
 bool Regex::isSupported()
 {
-#if defined(USE_POSIX_REGEX) || defined(USE_CXX11_REGEX)
+#if HAVE_POSIX_REGEX || HAVE_CXX11_REGEX
     return true;
 #else
     return false;
 #endif
 }
 
-#if defined(USE_POSIX_REGEX)
+#if HAVE_POSIX_REGEX
 class Regex::Impl
 {
     public:
@@ -113,7 +111,7 @@ class Regex::Impl
 
         regex_t                 regex_;
 };
-#elif defined(USE_CXX11_REGEX)
+#elif HAVE_CXX11_REGEX
 class Regex::Impl
 {
     public:
index 1e7909ed31309803793c699d6582b10d2fa0d014..1b1e2bdf175e9cb7e26896dc6b2530096ca4d343 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -89,7 +89,7 @@ class scoped_cptr
         //! Returns the stored pointer.
         T *get() const { return ptr_; }
         //! Check for non-null pointer in boolean context.
-#ifdef GMX_CXX11
+#if GMX_CXX11
         explicit
 #endif
         operator bool () const { return ptr_ != 0; }
index 330f04b53832e8e090c33ce9762495bb5d44daf9..ad9c7fc2669d18d6422a69abe13ce2d3aefc0c64 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,7 @@
 
 #include "config.h"
 
-#ifdef GMX_CXX11   // C++11 Compiler
+#if GMX_CXX11      // C++11 Compiler
 #include <memory>  // IWYU pragma: export
 #include <utility> // IWYU pragma: export
 #else              // C++03 Compiler
@@ -78,7 +78,7 @@ namespace gmx
  * \brief The smart pointer type.
  * Work-around for the non-existence of template typedefs in C++03.
  */
-#ifdef GMX_CXX11 // C++11 Compiler
+#if GMX_CXX11 // C++11 Compiler
 using std::move;
 template<typename T>
 struct gmx_unique_ptr
index 1e11fd5ef456af6076a2e069af50d757b3128f2f..e19e7497a4db5d537cac0975451d3ca633070723 100644 (file)
@@ -82,7 +82,7 @@ TEST_P(MdrunRerun, WithDifferentInputFormats)
  * version. */
 const char *trajectoryFileNames[] = {
     "../../../gromacs/gmxana/legacytests/spc2-traj.trr",
-#if defined GMX_USE_TNG && defined HAVE_ZLIB
+#if defined GMX_USE_TNG && HAVE_ZLIB
     "../../../gromacs/gmxana/legacytests/spc2-traj.tng",
 #endif
     "../../../gromacs/gmxana/legacytests/spc2-traj.xtc",
index 7690b98ad78830bd2244e30b1d91baac8d59bf41..15d3f8ee51bd300661af3a61c0afeb57544115c1 100644 (file)
@@ -50,7 +50,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-#ifdef GMX_X11
+#if GMX_X11
 
 #include "gromacs/fileio/writeps.h"
 
@@ -405,7 +405,7 @@ int gmx_view(int argc, char *argv[])
     if (parse_common_args(&argc, argv, PCA_CAN_TIME, NFILE, fnm,
                           0, NULL, asize(desc), desc, asize(bugs), bugs, &oenv))
     {
-#ifndef GMX_X11
+#if !GMX_X11
         fprintf(stderr, "Compiled without X-Windows - can not run viewer.\n");
 #else
         t_x11 *x11;