- Timestamp:
- Mar 17, 2009, 12:08:50 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psLib/src/sys/psConfigure.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk merged eligible /branches/eam_branches/eam_branch_20090303 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/psLib/src/sys/psConfigure.c
r18953 r23352 12 12 * @author Ross Harman, MHPCC 13 13 * @author Robert DeSonia, MHPCC 14 * @author Paul Price, IfA 14 15 * 15 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2008-08-08 18:05:08 $ 17 * 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 16 * Copyright 2004-2009 Institute for Astronomy, University of Hawaii 19 17 */ 20 18 … … 26 24 #include <stdlib.h> 27 25 #include <string.h> 26 27 #include <fitsio.h> 28 #include <longnam.h> 29 #include <fftw3.h> 30 #include <gsl/gsl_version.h> 31 #ifdef HAVE_PSDB 32 #include <mysql.h> 33 #endif 28 34 29 35 #include "psAbort.h" … … 41 47 static FILE *memCheckFile = NULL; // File to which to write results of mem check 42 48 43 static const char *cvsTag = "$Name: not supported by cvs2svn $"; // CVS tag name 49 #ifndef PSLIB_VERSION 50 #error "PSLIB_VERSION is not set" 51 #endif 52 #ifndef PSLIB_BRANCH 53 #error "PSLIB_BRANCH is not set" 54 #endif 55 #ifndef PSLIB_SOURCE 56 #error "PSLIB_SOURCE is not set" 57 #endif 58 59 #define xstr(s) str(s) 60 #define str(s) #s 44 61 45 62 psString psLibVersion(void) 46 63 { 47 psString version = NULL; // Version, to return 48 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 49 return version; 64 char *value = NULL; 65 psStringAppend(&value, "%s@%s", xstr(PSLIB_BRANCH), xstr(PSLIB_VERSION)); 66 return value; 67 } 68 69 psString psLibSource(void) 70 { 71 return psStringCopy(xstr(PSLIB_SOURCE)); 72 } 73 74 psString psLibDependencies(void) 75 { 76 psString deps = NULL; // Dependencies, to return 77 float cfitsioVersion; // CFITSIO version number 78 psStringAppend(&deps, "cfitsio-%.3f gsl-%s %s", 79 fits_get_version(&cfitsioVersion), gsl_version, fftwf_version); 80 81 #ifdef HAVE_PSDB 82 psStringAppend(&deps, " mysql-%s", mysql_get_client_info()); 83 #endif 84 85 return deps; 50 86 } 51 87 52 88 psString psLibVersionLong(void) 53 89 { 54 psString version = psLibVersion(); // Version, to return 55 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 90 psString version = psLibVersion(); // Version, to return 91 psString source = psLibSource(); // Source 92 psString deps = psLibDependencies();// Dependencies 56 93 57 #ifdef HAVE_PSDB 58 psStringAppend(&version, " (cvs tag %s), %s, %s with psDB", tag, __DATE__, __TIME__); 94 psStringPrepend(&version, "psLib "); 95 psStringAppend(&version, " from %s, built %s, %s with %s", 96 source, __DATE__, __TIME__, deps); 97 psFree(source); 98 psFree(deps); 99 100 #ifdef __OPTIMIZE__ 101 psStringAppend(&version, " optimised"); 59 102 #else 60 psStringAppend(&version, " (cvs tag %s), %s, %s without psDB", tag, __DATE__, __TIME__);103 psStringAppend(&version, " unoptimised"); 61 104 #endif 62 psFree(tag); 105 106 #ifdef PS_NO_TRACE 107 psStringAppend(&version, " without trace"); 108 #else 109 psStringAppend(&version, " with trace"); 110 #endif 111 63 112 return version; 64 } 113 }; 65 114 66 115 // Check the memory; intended for use on exit, but might be used elsewhere
Note:
See TracChangeset
for help on using the changeset viewer.
