-/*****************************************************************************
- * Global variables - they're needed for signal handling
- *****************************************************************************/
-#ifdef HAVE_SIGNAL_H
-static jmp_buf env;
-static int i_illegal;
-#if defined( __i386__ ) || defined( __x86_64__ )
-static const char *psz_capability;
+ if( pid == -1 )
+ return false; /* fail safe :-/ */
+
+ while( waitpid( pid, &status, 0 ) == -1 );
+
+ if( WIFEXITED( status ) && WEXITSTATUS( status ) == 0 )
+ return true;
+
+ fprintf( stderr, "warning: your CPU has %s instructions, but not your "
+ "operating system.\n", psz_capability );
+ fprintf( stderr, " some optimizations will be disabled unless "
+ "you upgrade your OS\n" );
+ return false;
+#else
+# warning FIXME!
+# define fork() (errno = ENOSYS, -1)
+ (void)pid;
+ (void)psz_capability;
+ return true;