Commits

Ruslan Osmanov committed dd2c9c8

Cosmetic changes

Comments (0)

Files changed (2)

   if test "$PHP_EVENT_PTHREADS" != "no"; then
 	  AC_CHECK_LIB(event_pthreads, evthread_use_pthreads, [
 	    PHP_ADD_LIBRARY_WITH_PATH(event_pthreads, $EVENT_LIBDIR, EVENT_SHARED_LIBADD)
-      LDFLAGS="-levent_pthreads $LDFLAGS"
+      LDFLAGS="-lpthread -levent_pthreads $LDFLAGS"
       AC_DEFINE(HAVE_EVENT_PTHREADS_LIB, 1, [ ])
 	  ], [
       AC_MSG_ERROR([evthread_use_pthreads not found in event_pthreads library, or the library is not installed])
     php_event_ssl_data_index = SSL_get_ex_new_index(0, "PHP EventSslContext index", NULL, NULL, NULL);
 #endif /* HAVE_EVENT_OPENSSL_LIB */
 
-	/* Handle libevent's error logging more gracefully than it's default
-	 * logging to stderr, or calling abort()/exit() */
-	event_set_fatal_callback(fatal_error_cb);
-	event_set_log_callback(log_cb);
 #ifdef HAVE_EVENT_PTHREADS_LIB
 # ifdef WIN32
+# error "Windows is not supported right now"
 	evthread_use_windows_threads();
 # else
 	evthread_use_pthreads();
 # endif
 #endif
+
+	/* Handle libevent's error logging more gracefully than it's default
+	 * logging to stderr, or calling abort()/exit() */
+	event_set_fatal_callback(fatal_error_cb);
+	event_set_log_callback(log_cb);
+
 #ifdef PHP_EVENT_DEBUG
 	event_enable_debug_mode();
 # ifdef HAVE_EVENT_PTHREADS_LIB
 #else
 	php_info_print_table_row(2, "OpenSSL support", "disabled");
 #endif
+#ifdef HAVE_EVENT_PTHREADS_LIB
+	php_info_print_table_row(2, "Thread safety support", "enabled");
+#else
+	php_info_print_table_row(2, "Thread safety support", "disabled");
+#endif
 
 	php_info_print_table_row(2, "Version", PHP_EVENT_VERSION);
 	php_info_print_table_end();