Make CBC an option, step 3: individual ciphers
diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h
index 16721dd..27ba373 100644
--- a/include/polarssl/aes.h
+++ b/include/polarssl/aes.h
@@ -100,6 +100,7 @@
                     const unsigned char input[16],
                     unsigned char output[16] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          AES-CBC buffer encryption/decryption
  *                 Length should be a multiple of the block
@@ -120,6 +121,7 @@
                     unsigned char iv[16],
                     const unsigned char *input,
                     unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
 /**
  * \brief          AES-CFB128 buffer encryption/decryption.
diff --git a/include/polarssl/blowfish.h b/include/polarssl/blowfish.h
index a2cbd46..f8d79c5 100644
--- a/include/polarssl/blowfish.h
+++ b/include/polarssl/blowfish.h
@@ -92,6 +92,7 @@
                         const unsigned char input[BLOWFISH_BLOCKSIZE],
                         unsigned char output[BLOWFISH_BLOCKSIZE] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          Blowfish-CBC buffer encryption/decryption
  *                 Length should be a multiple of the block
@@ -112,7 +113,9 @@
                         unsigned char iv[BLOWFISH_BLOCKSIZE],
                         const unsigned char *input,
                         unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
+#if defined(POLARSSL_CIPHER_MODE_CFB)
 /**
  * \brief          Blowfish CFB buffer encryption/decryption.
  *
@@ -133,7 +136,9 @@
                           unsigned char iv[BLOWFISH_BLOCKSIZE],
                           const unsigned char *input,
                           unsigned char *output );
+#endif /*POLARSSL_CIPHER_MODE_CFB */
 
+#if defined(POLARSSL_CIPHER_MODE_CTR)
 /**
  * \brief               Blowfish-CTR buffer encryption/decryption
  *
@@ -159,6 +164,7 @@
                         unsigned char stream_block[BLOWFISH_BLOCKSIZE],
                         const unsigned char *input,
                         unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CTR */
 
 #ifdef __cplusplus
 }
diff --git a/include/polarssl/camellia.h b/include/polarssl/camellia.h
index 86e2125..4ce10dc 100644
--- a/include/polarssl/camellia.h
+++ b/include/polarssl/camellia.h
@@ -99,6 +99,7 @@
                     const unsigned char input[16],
                     unsigned char output[16] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          CAMELLIA-CBC buffer encryption/decryption
  *                 Length should be a multiple of the block
@@ -119,7 +120,9 @@
                     unsigned char iv[16],
                     const unsigned char *input,
                     unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
+#if defined(POLARSSL_CIPHER_MODE_CFB)
 /**
  * \brief          CAMELLIA-CFB128 buffer encryption/decryption
  *
@@ -144,7 +147,9 @@
                        unsigned char iv[16],
                        const unsigned char *input,
                        unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CFB */
 
+#if defined(POLARSSL_CIPHER_MODE_CTR)
 /**
  * \brief               CAMELLIA-CTR buffer encryption/decryption
  *
@@ -174,6 +179,7 @@
                        unsigned char stream_block[16],
                        const unsigned char *input,
                        unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CTR */
 
 #ifdef __cplusplus
 }
diff --git a/include/polarssl/config.h b/include/polarssl/config.h
index 8014837..f75d94d 100644
--- a/include/polarssl/config.h
+++ b/include/polarssl/config.h
@@ -633,6 +633,7 @@
  *
  * Requires: POLARSSL_AES_C
  *           POLARSSL_SHA256_C
+ *           POLARSSL_CIPHER_MODE_CBC
  *
  * Comment this macro to disable support for SSL session tickets
  */
@@ -1606,7 +1607,8 @@
 #endif
 
 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
-    ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) )
+    ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) ||            \
+      !defined(POLARSSL_CIPHER_MODE_CBC) )
 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
 #endif
 
diff --git a/include/polarssl/des.h b/include/polarssl/des.h
index 0dedf62..74d5acb 100644
--- a/include/polarssl/des.h
+++ b/include/polarssl/des.h
@@ -177,6 +177,7 @@
                     const unsigned char input[8],
                     unsigned char output[8] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          DES-CBC buffer encryption/decryption
  *
@@ -193,6 +194,7 @@
                     unsigned char iv[8],
                     const unsigned char *input,
                     unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
 /**
  * \brief          3DES-ECB block encryption/decryption
@@ -207,6 +209,7 @@
                      const unsigned char input[8],
                      unsigned char output[8] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          3DES-CBC buffer encryption/decryption
  *
@@ -225,6 +228,7 @@
                      unsigned char iv[8],
                      const unsigned char *input,
                      unsigned char *output );
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
 #ifdef __cplusplus
 }
diff --git a/include/polarssl/xtea.h b/include/polarssl/xtea.h
index 4b435ae..7521993 100644
--- a/include/polarssl/xtea.h
+++ b/include/polarssl/xtea.h
@@ -83,6 +83,7 @@
                     const unsigned char input[8],
                     unsigned char output[8] );
 
+#if defined(POLARSSL_CIPHER_MODE_CBC)
 /**
  * \brief          XTEA CBC cipher function
  *
@@ -102,6 +103,7 @@
                     unsigned char iv[8],
                     const unsigned char *input,
                     unsigned char *output);
+#endif /* POLARSSL_CIPHER_MODE_CBC */
 
 #ifdef __cplusplus
 }