KWSys: Improve SharedForward platform table

The SharedForward header contains a preprocessor table mapping from
platform to equivalents for ldd and LD_LIBRARY_PATH.  This commit fixes
the table preprocessor directives to guarantee at most one platform.
This generalizes the commit "Fix compilation of VTK on debian/sparc".
This commit is contained in:
Brad King 2009-12-16 14:25:46 -05:00
parent e800604f34
commit 56fe170043
1 changed files with 8 additions and 16 deletions

View File

@ -194,31 +194,27 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT
# define KWSYS_SHARED_FORWARD_LDD "ldd" # define KWSYS_SHARED_FORWARD_LDD "ldd"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
#endif
/* FreeBSD */ /* FreeBSD */
#if defined(__FreeBSD__) #elif defined(__FreeBSD__)
# define KWSYS_SHARED_FORWARD_LDD "ldd" # define KWSYS_SHARED_FORWARD_LDD "ldd"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
#endif
/* OSX */ /* OSX */
#if defined(__APPLE__) #elif defined(__APPLE__)
# define KWSYS_SHARED_FORWARD_LDD "otool", "-L" # define KWSYS_SHARED_FORWARD_LDD "otool", "-L"
# define KWSYS_SHARED_FORWARD_LDD_N 2 # define KWSYS_SHARED_FORWARD_LDD_N 2
# define KWSYS_SHARED_FORWARD_LDPATH "DYLD_LIBRARY_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "DYLD_LIBRARY_PATH"
#endif
/* AIX */ /* AIX */
#if defined(_AIX) #elif defined(_AIX)
# define KWSYS_SHARED_FORWARD_LDD "dump", "-H" # define KWSYS_SHARED_FORWARD_LDD "dump", "-H"
# define KWSYS_SHARED_FORWARD_LDD_N 2 # define KWSYS_SHARED_FORWARD_LDD_N 2
# define KWSYS_SHARED_FORWARD_LDPATH "LIBPATH" # define KWSYS_SHARED_FORWARD_LDPATH "LIBPATH"
#endif
/* SUN */ /* SUN */
#if defined(__sparc) && !defined(__linux) #elif defined(__sun)
# define KWSYS_SHARED_FORWARD_LDD "ldd" # define KWSYS_SHARED_FORWARD_LDD "ldd"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# include <sys/isa_defs.h> # include <sys/isa_defs.h>
@ -227,10 +223,9 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT
# elif defined(_LP64) # elif defined(_LP64)
# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH_64" # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH_64"
# endif # endif
#endif
/* HP-UX */ /* HP-UX */
#if defined(__hpux) #elif defined(__hpux)
# define KWSYS_SHARED_FORWARD_LDD "chatr" # define KWSYS_SHARED_FORWARD_LDD "chatr"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# if defined(__LP64__) # if defined(__LP64__)
@ -238,10 +233,9 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT
# else # else
# define KWSYS_SHARED_FORWARD_LDPATH "SHLIB_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "SHLIB_PATH"
# endif # endif
#endif
/* SGI MIPS */ /* SGI MIPS */
#if defined(__sgi) && defined(_MIPS_SIM) #elif defined(__sgi) && defined(_MIPS_SIM)
# define KWSYS_SHARED_FORWARD_LDD "ldd" # define KWSYS_SHARED_FORWARD_LDD "ldd"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# if _MIPS_SIM == _ABIO32 # if _MIPS_SIM == _ABIO32
@ -251,19 +245,17 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT
# elif _MIPS_SIM == _ABI64 # elif _MIPS_SIM == _ABI64
# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH"
# endif # endif
#endif
/* Windows */ /* Windows */
#if defined(_WIN32) #elif defined(_WIN32)
# if defined(__CYGWIN__) # if defined(__CYGWIN__)
# define KWSYS_SHARED_FORWARD_LDD "cygcheck" # define KWSYS_SHARED_FORWARD_LDD "cygcheck"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# endif # endif
# define KWSYS_SHARED_FORWARD_LDPATH "PATH" # define KWSYS_SHARED_FORWARD_LDPATH "PATH"
#endif
/* Guess on this unknown system. */ /* Guess on this unknown system. */
#if !defined(KWSYS_SHARED_FORWARD_LDPATH) #else
# define KWSYS_SHARED_FORWARD_LDD "ldd" # define KWSYS_SHARED_FORWARD_LDD "ldd"
# define KWSYS_SHARED_FORWARD_LDD_N 1 # define KWSYS_SHARED_FORWARD_LDD_N 1
# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH" # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"