- Fixed a whole bunch of dependencies on defines between files, examples and tests

diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
index 95cdc1b..db4511e 100644
--- a/programs/test/benchmark.c
+++ b/programs/test/benchmark.c
@@ -57,6 +57,13 @@
 
 unsigned char buf[BUFSIZE];
 
+#if !defined(POLARSSL_TIMING_C)
+int main( void )
+{
+    printf("POLARSSL_TIMING_C not defined.\n");
+    return( 0 );
+}
+#else
 int main( void )
 {
     int keysize;
@@ -75,7 +82,8 @@
 #if defined(POLARSSL_CAMELLIA_C)
     camellia_context camellia;
 #endif
-#if defined(POLARSSL_RSA_C)
+#if defined(POLARSSL_RSA_C) && defined(POLARSSL_BIGNUM_C) &&    \
+    defined(POLARSSL_GENPRIME)
     rsa_context rsa;
 #endif
 
@@ -263,7 +271,8 @@
     }
 #endif
 
-#if defined(POLARSSL_RSA_C)
+#if defined(POLARSSL_RSA_C) && defined(POLARSSL_BIGNUM_C) &&    \
+    defined(POLARSSL_GENPRIME)
     rsa_init( &rsa, RSA_PKCS_V15, 0 );
     rsa_gen_key( &rsa, myrand, NULL, 1024, 65537 );
 
@@ -361,3 +370,4 @@
 
     return( 0 );
 }
+#endif /* POLARSSL_TIMING_C */