[Kst] extragear/graphics/kst

George Staikos staikos at kde.org
Tue Nov 1 21:59:18 CET 2005


SVN commit 476701 by staikos:

add --without-netcdf
BUG: 115167


 M  +18 -14    configure.in.in  


--- trunk/extragear/graphics/kst/configure.in.in #476700:476701
@@ -7,7 +7,7 @@
 AC_HEADER_TIME
 AC_CHECK_HEADERS(sys/time.h)
 
-KST_VERSION=1.2.0_devel
+KST_VERSION="1.2.0_devel"
 KST_LIBKST_VERSION=1:2:0
 
 AC_SUBST([KST_VERSION])
@@ -114,22 +114,26 @@
     [  ac_netcdf_includes="-I$withval/include"
        ac_netcdf_libraries="-L$withval/lib"
     ])
+AC_ARG_WITH(nonetcdf,
+    AC_HELP_STRING([--without-netcdf],[disable NetCDF support]),[build_netcdf=no],[build_netcdf=maybe])
 
-all_includes_save="$all_includes"
-all_includes="$all_includes $ac_netcdf_includes"
-KDE_CHECK_HEADER(netcdfcpp.h, AC_DEFINE(HAVE_NETCDFCPP_H, 1, [If we have NetCDF CPP headers]) have_netcdfcpp_h=yes NETCDFINCLUDES="$ac_netcdf_includes", , )
-all_includes="$all_includes_save"
+if test "$build_netcdf" = "maybe"; then
+  all_includes_save="$all_includes"
+  all_includes="$all_includes $ac_netcdf_includes"
+  KDE_CHECK_HEADER(netcdfcpp.h, AC_DEFINE(HAVE_NETCDFCPP_H, 1, [If we have NetCDF CPP headers]) have_netcdfcpp_h=yes NETCDFINCLUDES="$ac_netcdf_includes", , )
+  all_includes="$all_includes_save"
 
-ldflags_save="$LDFLAGS"
-LDFLAGS="$LDFLAGS $ac_netcdf_libraries"
-KDE_CHECK_LIB(netcdf, nc_open, NETCDFLIBS="$ac_netcdf_libraries -lnetcdf_c++ -lnetcdf $NETCDFLIBS", , )
-LDFLAGS="$ldflags_save"
+  ldflags_save="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $ac_netcdf_libraries"
+  KDE_CHECK_LIB(netcdf, nc_open, NETCDFLIBS="$ac_netcdf_libraries -lnetcdf_c++ -lnetcdf $NETCDFLIBS", , )
+  LDFLAGS="$ldflags_save"
 
-if test $ac_cv_lib_netcdf_nc_open = yes; then
-  if test $have_netcdfcpp_h = yes; then
-    AC_SUBST(NETCDFLIBS)
-    AC_SUBST(NETCDFINCLUDES)
-    AC_DEFINE(KST_HAVE_NETCDF, 1, [If we have the NetCDF libraries.])
+  if test $ac_cv_lib_netcdf_nc_open = yes; then
+    if test $have_netcdfcpp_h = yes; then
+      AC_SUBST(NETCDFLIBS)
+      AC_SUBST(NETCDFINCLUDES)
+      AC_DEFINE(KST_HAVE_NETCDF, 1, [If we have the NetCDF libraries.])
+    fi
   fi
 fi
 


More information about the Kst mailing list