Changeset 3273 in orxonox.OLD for orxonox/branches/updater
- Timestamp:
- Dec 24, 2004, 9:43:22 PM (20 years ago)
- Location:
- orxonox/branches/updater
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/config.h.in
r3264 r3273 49 49 /* Define to 1 if you have the <png.h> header file. */ 50 50 #undef HAVE_PNG_H 51 52 /* Define to 1 if you have the <pthread.h> header file. */ 53 #undef HAVE_PTHREAD_H 51 54 52 55 /* Define to 1 if you have the <SDL/SDL.h> header file. */ -
orxonox/branches/updater/configure
r3272 r3273 6969 6969 6970 6970 6971 checking for pthread libs 6971 ##checking for pthread 6972 6973 for ac_header in pthread.h 6974 do 6975 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6976 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6977 echo "$as_me:$LINENO: checking for $ac_header" >&5 6978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6979 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6980 echo $ECHO_N "(cached) $ECHO_C" >&6 6981 fi 6982 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6983 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6984 else 6985 # Is the header compilable? 6986 echo "$as_me:$LINENO: checking $ac_header usability" >&5 6987 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 6988 cat >conftest.$ac_ext <<_ACEOF 6989 /* confdefs.h. */ 6990 _ACEOF 6991 cat confdefs.h >>conftest.$ac_ext 6992 cat >>conftest.$ac_ext <<_ACEOF 6993 /* end confdefs.h. */ 6994 $ac_includes_default 6995 #include <$ac_header> 6996 _ACEOF 6997 rm -f conftest.$ac_objext 6998 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6999 (eval $ac_compile) 2>conftest.er1 7000 ac_status=$? 7001 grep -v '^ *+' conftest.er1 >conftest.err 7002 rm -f conftest.er1 7003 cat conftest.err >&5 7004 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7005 (exit $ac_status); } && 7006 { ac_try='test -z "$ac_c_werror_flag" 7007 || test ! -s conftest.err' 7008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7009 (eval $ac_try) 2>&5 7010 ac_status=$? 7011 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7012 (exit $ac_status); }; } && 7013 { ac_try='test -s conftest.$ac_objext' 7014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7015 (eval $ac_try) 2>&5 7016 ac_status=$? 7017 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7018 (exit $ac_status); }; }; then 7019 ac_header_compiler=yes 7020 else 7021 echo "$as_me: failed program was:" >&5 7022 sed 's/^/| /' conftest.$ac_ext >&5 7023 7024 ac_header_compiler=no 7025 fi 7026 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7027 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7028 echo "${ECHO_T}$ac_header_compiler" >&6 7029 7030 # Is the header present? 7031 echo "$as_me:$LINENO: checking $ac_header presence" >&5 7032 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 7033 cat >conftest.$ac_ext <<_ACEOF 7034 /* confdefs.h. */ 7035 _ACEOF 7036 cat confdefs.h >>conftest.$ac_ext 7037 cat >>conftest.$ac_ext <<_ACEOF 7038 /* end confdefs.h. */ 7039 #include <$ac_header> 7040 _ACEOF 7041 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 7042 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 7043 ac_status=$? 7044 grep -v '^ *+' conftest.er1 >conftest.err 7045 rm -f conftest.er1 7046 cat conftest.err >&5 7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7048 (exit $ac_status); } >/dev/null; then 7049 if test -s conftest.err; then 7050 ac_cpp_err=$ac_c_preproc_warn_flag 7051 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 7052 else 7053 ac_cpp_err= 7054 fi 7055 else 7056 ac_cpp_err=yes 7057 fi 7058 if test -z "$ac_cpp_err"; then 7059 ac_header_preproc=yes 7060 else 7061 echo "$as_me: failed program was:" >&5 7062 sed 's/^/| /' conftest.$ac_ext >&5 7063 7064 ac_header_preproc=no 7065 fi 7066 rm -f conftest.err conftest.$ac_ext 7067 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7068 echo "${ECHO_T}$ac_header_preproc" >&6 7069 7070 # So? What about this header? 7071 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7072 yes:no: ) 7073 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 7074 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 7075 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 7076 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 7077 ac_header_preproc=yes 7078 ;; 7079 no:yes:* ) 7080 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 7081 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 7082 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 7083 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 7084 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 7085 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 7086 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 7087 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 7088 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 7089 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 7090 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 7091 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 7092 ( 7093 cat <<\_ASBOX 7094 ## ---------------------------------------------- ## 7095 ## Report this to orxonox-dev at mail.datacore.ch ## 7096 ## ---------------------------------------------- ## 7097 _ASBOX 7098 ) | 7099 sed "s/^/$as_me: WARNING: /" >&2 7100 ;; 7101 esac 7102 echo "$as_me:$LINENO: checking for $ac_header" >&5 7103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7104 if eval "test \"\${$as_ac_Header+set}\" = set"; then 7105 echo $ECHO_N "(cached) $ECHO_C" >&6 7106 else 7107 eval "$as_ac_Header=\$ac_header_preproc" 7108 fi 7109 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7111 7112 fi 7113 if test `eval echo '${'$as_ac_Header'}'` = yes; then 7114 cat >>confdefs.h <<_ACEOF 7115 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7116 _ACEOF 7117 pthreadHeader="yes" 7118 else 7119 pthreadHeader="no" 7120 fi 7121 7122 done 7123 6972 7124 echo "$as_me:$LINENO: checking for main in -lpthread" >&5 6973 7125 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6 -
orxonox/branches/updater/configure.ac
r3272 r3273 403 403 404 404 405 checking for pthread libs 405 ##checking for pthread 406 AC_CHECK_HEADERS([pthread.h], pthreadHeader="yes", pthreadHeader="no") 406 407 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes) 407 408 if test "$FOUND_pthread" = "yes" ; then -
orxonox/branches/updater/src/Makefile.in
r3271 r3273 282 282 esac; \ 283 283 done; \ 284 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/Makefile'; \284 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 285 285 cd $(top_srcdir) && \ 286 $(AUTOMAKE) -- foreignsrc/Makefile286 $(AUTOMAKE) --gnu src/Makefile 287 287 .PRECIOUS: Makefile 288 288 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/updater/src/console/Makefile.in
r3271 r3273 201 201 esac; \ 202 202 done; \ 203 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/console/Makefile'; \203 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/console/Makefile'; \ 204 204 cd $(top_srcdir) && \ 205 $(AUTOMAKE) -- foreignsrc/console/Makefile205 $(AUTOMAKE) --gnu src/console/Makefile 206 206 .PRECIOUS: Makefile 207 207 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/updater/src/gui/Makefile.in
r3271 r3273 232 232 esac; \ 233 233 done; \ 234 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/gui/Makefile'; \234 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gui/Makefile'; \ 235 235 cd $(top_srcdir) && \ 236 $(AUTOMAKE) -- foreignsrc/gui/Makefile236 $(AUTOMAKE) --gnu src/gui/Makefile 237 237 .PRECIOUS: Makefile 238 238 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3272 r3273 200 200 } 201 201 202 #ifdef HAVE_CURL 202 203 CURL* OrxonoxGuiUpdate::curlHandle = NULL; 204 #endif /* HAVE_CURL */ 205 206 #ifdef HAVE_PTHREAD_H 203 207 pthread_t* OrxonoxGuiUpdate::downloadThreadID = new pthread_t; 208 #endif /* HAVE_PTHREAD_H */ 204 209 bool OrxonoxGuiUpdate::isDownloading = false; 205 210 … … 217 222 strcpy (fileOnDisk, info->localRoot); 218 223 strcat (fileOnDisk, info->fileName); 219 pthread_t test; 224 220 225 if(curlHandle) 221 226 { … … 234 239 { 235 240 //! \todo check if threads really were created. 241 #ifdef HAVE_PTHREAD_H 236 242 pthread_create(downloadThreadID, NULL, downloadThread, info); 243 #else 244 downloadThread(info); 245 #endif /* HAVE_PTHREAD_H */ 246 237 247 // else 238 248 // PRINTF(1)("thread already in use\n"); … … 252 262 if (curlHandle) 253 263 curl_easy_cleanup(curlHandle); 254 264 #ifdef HAVE_PTHREAD_H 255 265 pthread_join(*downloadThreadID, NULL); 266 #endif /* HAVE_PTHREAD_H */ 256 267 PRINTF(3)("Closing the downloaded file.\n"); 257 268 fclose(info->fileHandle); -
orxonox/branches/updater/src/gui/orxonox_gui_update.h
r3272 r3273 14 14 #include <curl/easy.h> 15 15 #endif /* HAVE_CURL */ 16 #ifdef HAVE_PTHREAD_H 16 17 #include <pthread.h> 18 #endif /* HAVE_PTHREAD_H */ 17 19 using namespace std; 18 20 … … 64 66 static gint cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar); 65 67 #endif /* HAVE_GTK2 */ 68 #ifdef HAVE_PTHREAD_H 66 69 static pthread_t* downloadThreadID; 70 #endif /* HAVE_PTHREAD_H */ 67 71 static bool isDownloading; 68 72 -
orxonox/branches/updater/src/importer/Makefile.in
r3271 r3273 208 208 esac; \ 209 209 done; \ 210 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/importer/Makefile'; \210 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/importer/Makefile'; \ 211 211 cd $(top_srcdir) && \ 212 $(AUTOMAKE) -- foreignsrc/importer/Makefile212 $(AUTOMAKE) --gnu src/importer/Makefile 213 213 .PRECIOUS: Makefile 214 214 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset
for help on using the changeset viewer.