Changeset 23115 for trunk/psLib/src/sys/psConfigure.c
- Timestamp:
- Mar 3, 2009, 1:00:45 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psConfigure.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psConfigure.c
r18953 r23115 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 name44 49 45 50 psString psLibVersion(void) 46 51 { 47 psString version = NULL; // Version, to return 48 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 49 return version; 52 #ifndef PSLIB_VERSION 53 #error "PSLIB_VERSION is not set" 54 #endif 55 #ifndef PSLIB_BRANCH 56 #error "PSLIB_BRANCH is not set" 57 #endif 58 return psStringCopy(PSLIB_BRANCH "@" PSLIB_VERSION); 59 } 60 61 psString psLibSource(void) 62 { 63 #ifndef PSLIB_SOURCE 64 #error "PSLIB_SOURCE is not set" 65 #endif 66 return psStringCopy(PSLIB_SOURCE); 50 67 } 51 68 52 69 psString psLibVersionLong(void) 53 70 { 54 psString version = psLibVersion(); // Version, to return 55 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 71 psString version = psLibVersion(); // Version, to return 72 psString source = psLibSource(); // Source 73 74 float cfitsioVersion; // CFITSIO version number 75 76 psStringPrepend(&version, "psLib "); 77 psStringAppend(&version, " from %s, built %s, %s with cfitsio (%.3f), gsl (%s), fftw (%s)", 78 source, __DATE__, __TIME__, fits_get_version(&cfitsioVersion), gsl_version, 79 fftwf_version); 80 psFree(source); 56 81 57 82 #ifdef HAVE_PSDB 58 psStringAppend(&version, " (cvs tag %s), %s, %s with psDB", tag, __DATE__, __TIME__); 83 psStringAppend(&version, ", mysql (%s)", mysql_get_client_info()); 84 #endif 85 86 #ifdef __OPTIMIZE__ 87 psStringAppend(&version, " optimised"); 59 88 #else 60 psStringAppend(&version, " (cvs tag %s), %s, %s without psDB", tag, __DATE__, __TIME__);89 psStringAppend(&version, " unoptimised"); 61 90 #endif 62 psFree(tag); 91 92 #ifdef PS_NO_TRACE 93 psStringAppend(&version, " without trace"); 94 #else 95 psStringAppend(&version, " with trace"); 96 #endif 97 63 98 return version; 64 } 99 }; 65 100 66 101 // Check the memory; intended for use on exit, but might be used elsewhere
Note:
See TracChangeset
for help on using the changeset viewer.
