Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 28257)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 28258)
@@ -5,6 +5,11 @@
  */
 
+#ifdef HAVE_CONFIG_H
+   #include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
 #include "./GiaDeflectionCorex.h"
-
 #include "../../classes/classes.h"
 #include "../../shared/shared.h"
@@ -12,4 +17,9 @@
 #include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h"
 
+#ifdef _HAVE_AD_
+void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble* pdwidt, GiaDeflectionCoreArgs* arguments){
+	_error_("Not compiled with AD as this function requires Fortran");
+}
+#else
 /*External blocks: {{{*/
 struct blockp{
@@ -44,5 +54,5 @@
 void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble* pdwidt, GiaDeflectionCoreArgs* arguments){
 
-	/*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details {{{*/
+	/*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details*/
 	IssmDouble  ri                        = arguments->ri;                        //radial distance from center of disk to vertex i
 	IssmDouble  re                        = arguments->re;                        //radius of disk
@@ -62,6 +72,4 @@
 	IssmDouble  yts                       = arguments->yts;
 
-	/*}}}*/
-
 	/*Modify inputs to match naruse code: */
 	int Ntime=numtimes; // number of times with load history
@@ -69,5 +77,5 @@
 	int Ntimp=Ntime+1; // Ntime+1 : for evaluation time
 
-	/*Prepare block inputs for fortran distme and what0 routines of the naruse code: {{{*/
+	/*Prepare block inputs for fortran distme and what0 routines of the naruse code:*/
 	/*Now, let's set pset from the data that we got in input to GiaDeflectionCorex: */
 	blockp_.pset[0]=reCast<IssmPDouble>(lithosphere_thickness);
@@ -113,2 +121,3 @@
 
 }
+#endif
