Changeset 1692 in Sophya
- Timestamp:
- Oct 14, 2001, 11:15:01 PM (24 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/Makefile.in
r1689 r1692 100 100 101 101 %.d: $(srcdir)/%.cc 102 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \102 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 103 103 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 104 104 [ -s $@ ] || rm -f $@' 105 105 106 106 %.d: $(srcdir)/%.c 107 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \107 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 108 108 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 109 109 [ -s $@ ] || rm -f $@' -
trunk/ArchTOIPipe/Kernel/asciitoiwtr.cc
r1532 r1692 19 19 declareInput(name); 20 20 fwinputs.push_back(toi); 21 toi->addConsumer(this); 21 22 } 22 23 -
trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc
r1629 r1692 33 33 nCols++; 34 34 if (withFlag) nCols++; 35 toi->addConsumer(this); 35 36 } 36 37 … … 129 130 } 130 131 } 132 wontNeedBefore(sn); 131 133 fits_lock(); 132 134 // if ((sn%2000 == 0) || (sn<snb+5)) -
trunk/ArchTOIPipe/Kernel/toi.h
r1689 r1692 98 98 99 99 virtual void setProducer(TOIProcessor* prod); 100 public: // for toiprocessors redefining addInput. Change ? 100 101 virtual void addConsumer(TOIProcessor* prod); 102 protected: 101 103 friend class TOIProcessor; 102 104 -
trunk/ArchTOIPipe/Kernel/toisegment.cc
r1690 r1692 5 5 #endif 6 6 7 static pthread_mutex_t cout_mutex = PTHREAD_MUTEX_INITIALIZER; 8 static void cout_lock() {pthread_mutex_lock(&cout_mutex);} 9 static void cout_unlock() {pthread_mutex_unlock(&cout_mutex);} 10 #define LOG(_xxx_) \ 11 cout_lock(); \ 12 _xxx_; \ 13 cout_unlock(); 14 15 7 16 /******************************/ 8 17 /******* TOISegmented *********/ … … 21 30 TOISegmented::~TOISegmented() { 22 31 delete master; 32 } 33 34 35 void TOISegmented::addConsumer(TOIProcessor* p) { 36 TOI::addConsumer(p); 37 master->nConsumers = consumers.size(); 23 38 } 24 39 … … 82 97 } 83 98 84 void TOISegmented::doPutData(int i, double value, uint_8 flag =0) {99 void TOISegmented::doPutData(int i, double value, uint_8 flag) { 85 100 cout << "TOISegmented::doPutData unimplemented" << endl; 86 101 throw PError("TOISegmented::doPutData unimplemented"); … … 164 179 segmentSize = m->segmentSize; 165 180 firstNeeded = -1; 166 pthread_mutex_init(&mutex, NULL); 167 pthread_cond_init(&condv, NULL); 181 waiting = false; 168 182 } 169 183 170 184 TOISegmented::BufferView::~BufferView() { 171 pthread_mutex_destroy(&mutex); 172 pthread_cond_destroy(&condv); 173 } 174 175 double TOISegmented::BufferView::getData(int sn) { /* Single-thread */ 185 } 186 187 double TOISegmented::BufferView::getData(int sn) { /* Single-thread, reader thread*/ 176 188 ensure(sn); 177 189 int seg = (sn-sn0)/segmentSize; … … 179 191 } 180 192 181 uint_8 TOISegmented::BufferView::getFlag(int sn) { /* Single-thread */193 uint_8 TOISegmented::BufferView::getFlag(int sn) { /* Single-thread, reader thread */ 182 194 ensure(sn); 183 195 int seg = (sn-sn0)/segmentSize; … … 185 197 } 186 198 187 void TOISegmented::BufferView::ensure(int sn) { /* Single-thread */199 void TOISegmented::BufferView::ensure(int sn) { /* Single-thread, reader thread */ 188 200 if (sn < sn0) { 189 throw RangeCheckError("requested sample before first"); 190 } 191 192 if (sn >= sn0 + segmentSize*segments.size()) { 193 cout << "BufferView : read fault for " << sn << endl; 201 LOG(cout << "TOISegmented::BufferView::ensure requested sample before first" << endl); 202 LOG(cout << "sn " << sn << " sn0 " << sn0 << endl); 203 abort(); 204 } 205 206 if (sn0 < 0 || 207 sn >= sn0 + segmentSize*segments.size()) { 208 LOG(cout << "BufferView " << hex << this << dec << ": read fault for " << sn << endl) 194 209 sync(); 195 while (sn >= sn0 + segmentSize*segments.size()) {210 while (sn0<0 || sn >= sn0 + segmentSize*segments.size()) { 196 211 wait(); 197 cout << "BufferView : waiting for " << sn << endl;212 LOG(cout << "BufferView " << hex << this << dec << ": waiting for " << sn << endl) 198 213 sync(); 199 214 } 200 cout << "BufferView : resuming for " << sn << endl; 201 } 202 } 203 204 void TOISegmented::BufferView::sync() { /* Single-thread */ 215 LOG(cout << "BufferView " << hex << this << dec << ": resuming for " << sn 216 << " now data for " << sn0 << " - " << sn0 + segmentSize*segments.size() 217 << " in " << segments.size() << " segments " << endl) 218 } 219 } 220 221 void TOISegmented::BufferView::sync() { /* Single-thread, reader thread */ 205 222 master->updateView(this); // update me ! 206 223 } 207 224 208 void TOISegmented::BufferView::wait() { /* From reader thread */ 209 pthread_mutex_lock(&mutex); 210 master->addToWaitList(this); // needing wake-up call 211 pthread_cond_wait(&condv, &mutex); 212 pthread_mutex_unlock(&mutex); 213 } 214 215 void TOISegmented::BufferView::signal() { /* From masterview, writer thread */ 216 pthread_mutex_lock(&mutex); 217 pthread_cond_signal(&condv); // only one thread can be sleeping 218 master->removeFromWaitList(this); 219 pthread_mutex_unlock(&mutex); 220 } 225 void TOISegmented::BufferView::wait() { /* reader thread */ 226 pthread_mutex_lock(&(master->read_wait_mutex)); 227 waiting = true; 228 pthread_cond_wait(&(master->read_wait_condv), &(master->read_wait_mutex)); 229 waiting = false; 230 pthread_mutex_unlock(&(master->read_wait_mutex)); 231 } 232 221 233 222 234 void TOISegmented::BufferView::wontNeedBefore(int sn) { /* reader thread */ … … 236 248 segmentSize = bufsz; 237 249 sn0 = -1; 250 nConsumers = 0; 238 251 239 252 pthread_mutex_init(&views_mutex, NULL); 240 pthread_mutex_init(&write_mutex, NULL); 241 pthread_cond_init(&condv, NULL); 253 pthread_mutex_init(&read_wait_mutex, NULL); 254 pthread_cond_init(&write_wait_condv, NULL); 255 pthread_cond_init(&read_wait_condv, NULL); 242 256 pthread_key_create(&buffer_key, BufferDestroy); 243 257 … … 247 261 TOISegmented::MasterView::~MasterView() { 248 262 pthread_mutex_destroy(&views_mutex); 249 pthread_mutex_destroy(&write_mutex); 250 pthread_cond_destroy(&condv); 263 pthread_mutex_destroy(&read_wait_mutex); 264 pthread_cond_destroy(&write_wait_condv); 265 pthread_cond_destroy(&read_wait_condv); 251 266 pthread_key_delete(buffer_key); 252 267 … … 256 271 } 257 272 258 void TOISegmented::MasterView::putData(int sn, double data, uint_8 flags) { 259 if (sn0<0) sn0=sn; 273 void TOISegmented::MasterView::putData(int sn, double data, uint_8 flags) { /* writer thread */ 274 if (sn0<0) { 275 LOG(cout << "***MasterView::putData sn0<0" << endl) 276 sn0=sn; 277 } 260 278 // can fit in current segment ? 261 279 if (!(currentSegment != NULL && 262 280 sn >= currentSegment->sn0 && 263 281 sn < currentSegment->sn0 + currentSegment->bufferSize)) { 264 cout << "MasterView::putData, need extend for " << sn << endl;282 LOG(cout << "MasterView::putData, need extend for " << sn << endl) 265 283 nextSegment(); 266 284 } … … 268 286 } 269 287 270 double TOISegmented::MasterView::getData(int sn) { 271 return getView()->getData(sn); 272 } 273 274 uint_8 TOISegmented::MasterView::getFlag(int sn) { 288 double TOISegmented::MasterView::getData(int sn) { /* reader thread */ 289 return getView()->getData(sn); /* thread-specific */ 290 } 291 292 uint_8 TOISegmented::MasterView::getFlag(int sn) { /* reader thread */ 275 293 return getView()->getFlag(sn); 276 }277 278 void TOISegmented::MasterView::addToWaitList(BufferView* bv) { /* reader thread */279 // A view needs to wait for new data.280 281 282 pthread_mutex_lock(&views_mutex);283 waitingBuffers.insert(bv);284 pthread_mutex_unlock(&views_mutex);285 checkDeadLock();286 }287 288 void TOISegmented::MasterView::removeFromWaitList(BufferView* bv) { /* reader thread */289 pthread_mutex_lock(&views_mutex);290 waitingBuffers.erase(bv);291 pthread_mutex_unlock(&views_mutex);292 294 } 293 295 … … 295 297 BufferView* bv = (BufferView*) pthread_getspecific(buffer_key); 296 298 if (bv == NULL) { 297 cout << "creating new view" << endl;298 299 bv = createView(); 300 LOG(cout << "creating new view " << hex << bv << dec << endl) 299 301 pthread_setspecific(buffer_key, bv); 300 302 } … … 302 304 } 303 305 304 void TOISegmented::MasterView::signalWaitingViews() { /* any thread */ 305 pthread_mutex_lock(&views_mutex); 306 set<BufferView*> copyset = waitingBuffers; 307 pthread_mutex_unlock(&views_mutex); 308 309 for (set<BufferView*>::iterator i=copyset.begin(); 310 i != copyset.end(); i++) { 311 (*i)->signal(); 312 } 313 } 314 315 void TOISegmented::MasterView::signal() { /* reader thread */ 316 pthread_mutex_lock(&write_mutex); 317 pthread_cond_signal(&condv); // only one thread can be sleeping 318 pthread_mutex_unlock(&write_mutex); 306 void TOISegmented::MasterView::signalWaitingViews() { /* any thread */ /* views locked */ 307 pthread_mutex_lock(&read_wait_mutex); 308 pthread_cond_broadcast(&read_wait_condv); 309 pthread_mutex_unlock(&read_wait_mutex); 310 } 311 312 void TOISegmented::MasterView::signalWrite() { /* reader thread */ /* views locked */ 313 if (waitingOnWrite) { 314 LOG(cout << "MasterView : signal for wait on write" << endl) 315 pthread_cond_signal(&write_wait_condv); // only one thread can be sleeping 316 } 319 317 } 320 318 … … 326 324 // The current segment, if any, is now committed. A new 327 325 // blank buffer is allocated, if any. 328 329 cout << "MasterView::nextSegment " 330 << segments.size()+1 << "/" << maxSegments << endl; 326 pthread_mutex_lock(&views_mutex); 327 328 LOG(cout << "MasterView::nextSegment " 329 << segments.size()+1 << "/" << maxSegments << endl) 331 330 332 331 if (currentSegment != NULL) { 333 332 currentSegment->status = BufferSegment::COMMITTED; 334 pthread_mutex_lock(&views_mutex);335 333 segments.push_back(currentSegment); 336 pthread_mutex_unlock(&views_mutex);337 334 } 338 335 … … 344 341 currentSegment = new BufferSegment(segmentSize); 345 342 signalWaitingViews(); // they can ask to be updated !! 346 } 347 348 void TOISegmented::MasterView::waitForCleaning() { /* writer thread */ 349 cout << "MasterView : write wait for clean for " << sn0 << endl; 350 pthread_mutex_lock(&write_mutex);343 pthread_mutex_unlock(&views_mutex); 344 } 345 346 void TOISegmented::MasterView::waitForCleaning() { /* writer thread */ /* views locked */ 347 LOG(cout << "MasterView : write wait for clean for " << sn0 << endl) 351 348 waitingOnWrite = true; 352 349 checkDeadLock(); 353 pthread_cond_wait(&condv, &write_mutex); 354 pthread_mutex_unlock(&write_mutex); 355 cout << "MasterView : wait done" << endl; 350 pthread_cond_wait(&write_wait_condv, &views_mutex); 351 LOG(cout << "MasterView : wait done" << endl) 356 352 } 357 353 358 354 TOISegmented::BufferView* TOISegmented::MasterView::createView() { /* reader thread */ 359 355 BufferView* bv = new BufferView(this); 356 pthread_mutex_lock(&views_mutex); 360 357 allViews.insert(bv); 358 pthread_mutex_unlock(&views_mutex); 361 359 updateView(bv); 362 360 return bv; … … 379 377 // nous. 380 378 381 int firstNeeded = MAXINT; 382 for (set<BufferView*>::iterator i = allViews.begin(); 383 i != allViews.end(); i++) { 384 if ((*i)->firstNeeded < firstNeeded) firstNeeded = (*i)->firstNeeded; 385 } 386 387 cout << "firstNeeded = " << firstNeeded << endl; 388 389 vector<BufferSegment*>::iterator j = segments.begin(); 390 bool clean = false; 391 for (vector<BufferSegment*>::iterator i = segments.begin(); 392 i != segments.end(); i++) { 393 if (((*i)->sn0+(*i)->bufferSize <= firstNeeded) && ((*i)->getRefCount() == 0)) { 394 clean = true; 395 j = i; 396 } else {} 379 // A condition que tous les consumers se soient fait connaitre... 380 381 if (nConsumers == allViews.size()) { 382 int firstNeeded = MAXINT; 383 for (set<BufferView*>::iterator i = allViews.begin(); 384 i != allViews.end(); i++) { 385 if ((*i)->firstNeeded < firstNeeded) firstNeeded = (*i)->firstNeeded; 386 } 387 388 LOG(cout << "MasterView : firstNeeded = " << firstNeeded << endl); 389 390 vector<BufferSegment*>::iterator j = segments.begin(); 391 bool clean = false; 392 for (vector<BufferSegment*>::iterator i = segments.begin(); 393 i != segments.end(); i++) { 394 if (((*i)->sn0+(*i)->bufferSize <= firstNeeded) && ((*i)->getRefCount() == 0)) { 395 clean = true; 396 j = i; 397 } 398 } 397 399 if (clean) { 398 400 segments.erase(segments.begin(),j); 399 401 sn0 = (*segments.begin())->sn0; 400 } 401 } 402 LOG(cout << "MasterView : purged until " << sn0 << endl); 403 } 404 } else { 405 LOG(cout << "MasterView : not yet all consumer thread known "<< allViews.size() 406 << "/" << nConsumers << endl); 407 } 402 408 403 409 for (vector<BufferSegment*>::iterator i = segments.begin(); … … 416 422 } 417 423 418 if (bv->sn0 > oldBegin && waitingOnWrite) { 419 signal(); 420 } 421 422 cout << "sync " << sn0 << " - " << newEnd << endl; 423 424 if (bv->sn0 > oldBegin) { // nettoyage de fait, reveiller le writer thread si besoin 425 signalWrite(); 426 } 427 428 LOG(cout << "sync for " << hex << bv << dec << " : " 429 << oldBegin << " - " << oldEnd << " --> " 430 << bv->sn0 << " - " << newEnd << endl); 431 432 if (newEnd > oldEnd) { // Nouveautes, reveiller les reader threads si besoin 433 signalWaitingViews(); 434 } 424 435 pthread_mutex_unlock(&views_mutex); 425 426 if (newEnd > oldEnd) { 427 signalWaitingViews(); 428 } 429 } 430 431 void TOISegmented::MasterView::checkDeadLock() { 436 } 437 438 void TOISegmented::MasterView::checkDeadLock() { /* views locked */ 432 439 // There is a possible deadlock if no view can free old segments 433 440 // and we are waiting for write. … … 437 444 // while we are asleep 438 445 439 if (!waitingOnWrite) return; // no problem, there is an active writer 446 pthread_mutex_lock(&read_wait_mutex); 447 if (!waitingOnWrite) { 448 pthread_mutex_unlock(&read_wait_mutex); 449 return; // no problem, there is an active writer 450 } 440 451 441 452 // Is any sleeping view needing our first segment ? 442 453 443 pthread_mutex_lock(&views_mutex); 444 for (set<BufferView*>::iterator i=waitingBuffers.begin(); 445 i != waitingBuffers.end(); i++) { 446 if ((*i)->firstNeeded < sn0+segmentSize) { 454 for (set<BufferView*>::iterator i=allViews.begin(); 455 i != allViews.end(); i++) { 456 if ((*i)->waiting && (*i)->firstNeeded < sn0+segmentSize) { 447 457 cout << "**** DEADLOCK detected ****" << endl; 448 458 cout << "We are waiting on write (buffer is full)"<< endl; … … 452 462 } 453 463 } 454 pthread_mutex_unlock(& views_mutex);464 pthread_mutex_unlock(&read_wait_mutex); 455 465 } 456 466 -
trunk/ArchTOIPipe/Kernel/toisegment.h
r1690 r1692 27 27 virtual void wontNeedBefore(int i); 28 28 virtual void putDone(); 29 virtual void addConsumer(TOIProcessor*); 29 30 30 31 // Methodes ignorees car on reimplemente les methodes de base … … 109 110 110 111 protected: 111 void addToWaitList(BufferView* bv);112 void removeFromWaitList(BufferView* bv);113 114 112 115 113 friend class BufferView; 114 friend class TOISegmented; 116 115 void signalWaitingViews(); // views are waiting on read 117 void signal ();// we are waiting on write116 void signalWrite(); // we are waiting on write 118 117 void nextSegment(); 119 118 void waitForCleaning(); … … 127 126 int sn0; // First sn in first segment 128 127 vector<BufferSegment*> segments; // Committed segments 128 int nConsumers; 129 129 130 130 pthread_mutex_t views_mutex; // lock for master buffer list access 131 pthread_mutex_t write_mutex; // for write waiting 132 pthread_cond_t condv; // waiting for cleaning (on writer thread) 131 pthread_cond_t write_wait_condv; // waiting for cleaning (on writer thread) 133 132 pthread_key_t buffer_key; // thread-specific buffer view 134 133 static void BufferDestroy(void *); 135 134 135 pthread_mutex_t read_wait_mutex; 136 pthread_cond_t read_wait_condv; 137 136 138 bool waitingOnWrite; // wait on writer thread 137 139 138 set<BufferView*> waitingBuffers;139 140 set<BufferView*> allViews; 140 141 … … 158 159 void sync(); // recupere les nouveaux segments, resync avec master 159 160 void ensure(int sn); 160 void signal(); 161 162 bool waiting; 161 163 162 164 friend class MasterView; … … 166 168 int segmentSize; 167 169 int firstNeeded; 168 pthread_mutex_t mutex; // lock pour attente de segments169 pthread_cond_t condv; // attente de segments (en lecture)170 170 }; 171 171 -
trunk/ArchTOIPipe/ProcWSophya/Makefile.in
r1685 r1692 99 99 100 100 %.d: $(srcdir)/%.cc 101 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \101 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 102 102 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 103 103 [ -s $@ ] || rm -f $@' 104 104 105 105 %.d: $(srcdir)/%.c 106 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \106 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 107 107 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 108 108 [ -s $@ ] || rm -f $@' -
trunk/ArchTOIPipe/Processors/Makefile.in
r1685 r1692 99 99 100 100 %.d: $(srcdir)/%.cc 101 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \101 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 102 102 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 103 103 [ -s $@ ] || rm -f $@' 104 104 105 105 %.d: $(srcdir)/%.c 106 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \106 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 107 107 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 108 108 [ -s $@ ] || rm -f $@' -
trunk/ArchTOIPipe/TestPipes/Makefile.in
r1685 r1692 96 96 97 97 %.d: $(srcdir)/%.cc 98 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \98 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 99 99 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 100 100 [ -s $@ ] || rm -f $@' 101 101 102 102 %.d: $(srcdir)/%.c 103 $(SHELL) -ec ' gcc-MM $(CPPFLAGS) -I. $< \103 $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \ 104 104 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ 105 105 [ -s $@ ] || rm -f $@' -
trunk/ArchTOIPipe/configure
r1685 r1692 911 911 912 912 913 if test $GCC = "yes"; then 914 gcc=$CC 915 else 916 gcc=gcc 917 fi 918 919 913 920 echo $ac_n "checking size of short""... $ac_c" 1>&6 914 echo "configure:9 15: checking size of short" >&5921 echo "configure:922: checking size of short" >&5 915 922 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then 916 923 echo $ac_n "(cached) $ac_c" 1>&6 … … 920 927 else 921 928 cat > conftest.$ac_ext <<EOF 922 #line 9 23"configure"929 #line 930 "configure" 923 930 #include "confdefs.h" 924 931 #include <stdio.h> … … 931 938 } 932 939 EOF 933 if { (eval echo configure:9 34: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null940 if { (eval echo configure:941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 934 941 then 935 942 ac_cv_sizeof_short=`cat conftestval` … … 951 958 952 959 echo $ac_n "checking size of int""... $ac_c" 1>&6 953 echo "configure:9 54: checking size of int" >&5960 echo "configure:961: checking size of int" >&5 954 961 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then 955 962 echo $ac_n "(cached) $ac_c" 1>&6 … … 959 966 else 960 967 cat > conftest.$ac_ext <<EOF 961 #line 96 2"configure"968 #line 969 "configure" 962 969 #include "confdefs.h" 963 970 #include <stdio.h> … … 970 977 } 971 978 EOF 972 if { (eval echo configure:9 73: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null979 if { (eval echo configure:980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 973 980 then 974 981 ac_cv_sizeof_int=`cat conftestval` … … 990 997 991 998 echo $ac_n "checking size of long""... $ac_c" 1>&6 992 echo "configure: 993: checking size of long" >&5999 echo "configure:1000: checking size of long" >&5 993 1000 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then 994 1001 echo $ac_n "(cached) $ac_c" 1>&6 … … 998 1005 else 999 1006 cat > conftest.$ac_ext <<EOF 1000 #line 100 1"configure"1007 #line 1008 "configure" 1001 1008 #include "confdefs.h" 1002 1009 #include <stdio.h> … … 1009 1016 } 1010 1017 EOF 1011 if { (eval echo configure:101 2: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1018 if { (eval echo configure:1019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1012 1019 then 1013 1020 ac_cv_sizeof_long=`cat conftestval` … … 1029 1036 1030 1037 echo $ac_n "checking size of long long""... $ac_c" 1>&6 1031 echo "configure:103 2: checking size of long long" >&51038 echo "configure:1039: checking size of long long" >&5 1032 1039 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then 1033 1040 echo $ac_n "(cached) $ac_c" 1>&6 … … 1037 1044 else 1038 1045 cat > conftest.$ac_ext <<EOF 1039 #line 104 0"configure"1046 #line 1047 "configure" 1040 1047 #include "confdefs.h" 1041 1048 #include <stdio.h> … … 1048 1055 } 1049 1056 EOF 1050 if { (eval echo configure:105 1: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1057 if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1051 1058 then 1052 1059 ac_cv_sizeof_long_long=`cat conftestval` … … 1068 1075 1069 1076 echo $ac_n "checking size of float""... $ac_c" 1>&6 1070 echo "configure:107 1: checking size of float" >&51077 echo "configure:1078: checking size of float" >&5 1071 1078 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then 1072 1079 echo $ac_n "(cached) $ac_c" 1>&6 … … 1076 1083 else 1077 1084 cat > conftest.$ac_ext <<EOF 1078 #line 10 79"configure"1085 #line 1086 "configure" 1079 1086 #include "confdefs.h" 1080 1087 #include <stdio.h> … … 1087 1094 } 1088 1095 EOF 1089 if { (eval echo configure:109 0: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1096 if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1090 1097 then 1091 1098 ac_cv_sizeof_float=`cat conftestval` … … 1107 1114 1108 1115 echo $ac_n "checking size of double""... $ac_c" 1>&6 1109 echo "configure:111 0: checking size of double" >&51116 echo "configure:1117: checking size of double" >&5 1110 1117 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then 1111 1118 echo $ac_n "(cached) $ac_c" 1>&6 … … 1115 1122 else 1116 1123 cat > conftest.$ac_ext <<EOF 1117 #line 11 18"configure"1124 #line 1125 "configure" 1118 1125 #include "confdefs.h" 1119 1126 #include <stdio.h> … … 1126 1133 } 1127 1134 EOF 1128 if { (eval echo configure:11 29: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1135 if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1129 1136 then 1130 1137 ac_cv_sizeof_double=`cat conftestval` … … 1146 1153 1147 1154 echo $ac_n "checking size of long double""... $ac_c" 1>&6 1148 echo "configure:11 49: checking size of long double" >&51155 echo "configure:1156: checking size of long double" >&5 1149 1156 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then 1150 1157 echo $ac_n "(cached) $ac_c" 1>&6 … … 1154 1161 else 1155 1162 cat > conftest.$ac_ext <<EOF 1156 #line 11 57"configure"1163 #line 1164 "configure" 1157 1164 #include "confdefs.h" 1158 1165 #include <stdio.h> … … 1165 1172 } 1166 1173 EOF 1167 if { (eval echo configure:11 68: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1174 if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1168 1175 then 1169 1176 ac_cv_sizeof_long_double=`cat conftestval` … … 1187 1194 1188 1195 echo $ac_n "checking "for cfitsio lib"""... $ac_c" 1>&6 1189 echo "configure:119 0: checking "for cfitsio lib"" >&51196 echo "configure:1197: checking "for cfitsio lib"" >&5 1190 1197 MACHDIR=`uname`-$CXX 1191 1198 if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then … … 1212 1219 1213 1220 echo $ac_n "checking "for cfitsio includes"""... $ac_c" 1>&6 1214 echo "configure:12 15: checking "for cfitsio includes"" >&51221 echo "configure:1222: checking "for cfitsio includes"" >&5 1215 1222 if test -f $CFITSIODIR/fitsio.h; then 1216 1223 cfitsincdir='-I$(CFITSIODIR)' … … 1224 1231 1225 1232 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 1226 echo "configure:12 27: checking for sin in -lm" >&51233 echo "configure:1234: checking for sin in -lm" >&5 1227 1234 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` 1228 1235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1232 1239 LIBS="-lm $LIBS" 1233 1240 cat > conftest.$ac_ext <<EOF 1234 #line 12 35"configure"1241 #line 1242 "configure" 1235 1242 #include "confdefs.h" 1236 1243 /* Override any gcc2 internal prototype to avoid an error. */ … … 1243 1250 ; return 0; } 1244 1251 EOF 1245 if { (eval echo configure:12 46: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1252 if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1246 1253 rm -rf conftest* 1247 1254 eval "ac_cv_lib_$ac_lib_var=yes" … … 1272 1279 1273 1280 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1274 echo "configure:12 75: checking how to run the C preprocessor" >&51281 echo "configure:1282: checking how to run the C preprocessor" >&5 1275 1282 # On Suns, sometimes $CPP names a directory. 1276 1283 if test -n "$CPP" && test -d "$CPP"; then … … 1287 1294 # not just through cpp. 1288 1295 cat > conftest.$ac_ext <<EOF 1289 #line 129 0"configure"1296 #line 1297 "configure" 1290 1297 #include "confdefs.h" 1291 1298 #include <assert.h> … … 1293 1300 EOF 1294 1301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1295 { (eval echo configure:1 296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1302 { (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1296 1303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1297 1304 if test -z "$ac_err"; then … … 1304 1311 CPP="${CC-cc} -E -traditional-cpp" 1305 1312 cat > conftest.$ac_ext <<EOF 1306 #line 13 07"configure"1313 #line 1314 "configure" 1307 1314 #include "confdefs.h" 1308 1315 #include <assert.h> … … 1310 1317 EOF 1311 1318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1312 { (eval echo configure:13 13: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1319 { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1313 1320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1314 1321 if test -z "$ac_err"; then … … 1321 1328 CPP="${CC-cc} -nologo -E" 1322 1329 cat > conftest.$ac_ext <<EOF 1323 #line 13 24"configure"1330 #line 1331 "configure" 1324 1331 #include "confdefs.h" 1325 1332 #include <assert.h> … … 1327 1334 EOF 1328 1335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1329 { (eval echo configure:133 0: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1336 { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1330 1337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1331 1338 if test -z "$ac_err"; then … … 1352 1359 1353 1360 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 1354 echo "configure:13 55: checking for ANSI C header files" >&51361 echo "configure:1362: checking for ANSI C header files" >&5 1355 1362 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 1356 1363 echo $ac_n "(cached) $ac_c" 1>&6 1357 1364 else 1358 1365 cat > conftest.$ac_ext <<EOF 1359 #line 136 0"configure"1366 #line 1367 "configure" 1360 1367 #include "confdefs.h" 1361 1368 #include <stdlib.h> … … 1365 1372 EOF 1366 1373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1367 { (eval echo configure:13 68: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1374 { (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1368 1375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1369 1376 if test -z "$ac_err"; then … … 1382 1389 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 1383 1390 cat > conftest.$ac_ext <<EOF 1384 #line 13 85"configure"1391 #line 1392 "configure" 1385 1392 #include "confdefs.h" 1386 1393 #include <string.h> … … 1400 1407 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 1401 1408 cat > conftest.$ac_ext <<EOF 1402 #line 14 03"configure"1409 #line 1410 "configure" 1403 1410 #include "confdefs.h" 1404 1411 #include <stdlib.h> … … 1421 1428 else 1422 1429 cat > conftest.$ac_ext <<EOF 1423 #line 14 24"configure"1430 #line 1431 "configure" 1424 1431 #include "confdefs.h" 1425 1432 #include <ctype.h> … … 1432 1439 1433 1440 EOF 1434 if { (eval echo configure:14 35: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1441 if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1435 1442 then 1436 1443 : … … 1459 1466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1460 1467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1461 echo "configure:146 2: checking for $ac_hdr" >&51468 echo "configure:1469: checking for $ac_hdr" >&5 1462 1469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1463 1470 echo $ac_n "(cached) $ac_c" 1>&6 1464 1471 else 1465 1472 cat > conftest.$ac_ext <<EOF 1466 #line 14 67"configure"1473 #line 1474 "configure" 1467 1474 #include "confdefs.h" 1468 1475 #include <$ac_hdr> 1469 1476 EOF 1470 1477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1471 { (eval echo configure:147 2: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1478 { (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1472 1479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1473 1480 if test -z "$ac_err"; then … … 1636 1643 s%@CC@%$CC%g 1637 1644 s%@CXX@%$CXX%g 1645 s%@gcc@%$gcc%g 1638 1646 s%@cfitslibdir@%$cfitslibdir%g 1639 1647 s%@cfitsincdir@%$cfitsincdir%g -
trunk/ArchTOIPipe/configure.in
r1663 r1692 18 18 AC_PROG_CC 19 19 AC_PROG_CXX 20 21 if test $GCC = "yes"; then 22 gcc=$CC 23 else 24 gcc=gcc 25 fi 26 AC_SUBST(gcc) 20 27 21 28 AC_CHECK_SIZEOF(short) -
trunk/ArchTOIPipe/fan_copy
r1691 r1692 8 8 cp -p $f $d/$f 9 9 end 10 cp -p Makefile.in_$d $d/Makefile.in 10 11 end
Note:
See TracChangeset
for help on using the changeset viewer.