[Kst] kdeextragear-2/kst

George Staikos staikos at kde.org
Sat Oct 30 16:54:36 CEST 2004


CVS commit by staikos: 

add --with-cdf= and --with-piolib= 


  M +36 -6     configure.in.in   1.35
  M +1 -1      kst/datasources/cdf/Makefile.am   1.3
  M +1 -1      kst/datasources/planck/Makefile.am   1.6


--- kdeextragear-2/kst/configure.in.in  #1.34:1.35
@@ -7,11 +7,26 @@
 
 # PIOLIB Test
-KDE_CHECK_HEADER(HL2_PIOLIB/PIOLib.h, AC_DEFINE(HAVE_PIOLIB_H, 1, [If we have piolib headers]) have_piolib_h=yes, , )
-
-KDE_CHECK_LIB(piolib, PIOGetObjectList, PIOLIBS="-lpiolib $PIOLIBS", , -lm -lpthread)
+ac_piolib_includes=""
+ac_piolib_libraries=""
+AC_ARG_WITH(piolib,
+    AC_HELP_STRING([--with-piolib=DIR],[where the root of PIOLib is installed ]),
+    [  ac_piolib_includes="-I$withval"
+       ac_piolib_libraries="-L$withval"
+    ])
+
+all_includes_save="$all_includes"
+all_includes="$all_includes $ac_piolib_includes"
+KDE_CHECK_HEADER(HL2_PIOLIB/PIOLib.h, AC_DEFINE(HAVE_PIOLIB_H, 1, [If we have piolib headers]) have_piolib_h=yes PIOINCLUDES="$ac_piolib_includes", , )
+all_includes="$all_includes_save"
+
+ldflags_save="$LDFLAGS"
+LDFLAGS="$LDFLAGS $ac_piolib_libraries"
+KDE_CHECK_LIB(piolib, PIOGetObjectList, PIOLIBS="$ac_piolib_libraries -lpiolib $PIOLIBS", , -lm -lpthread)
+LDFLAGS="$ldflags_save"
 
 if test $ac_cv_lib_piolib_PIOGetObjectList = yes; then
   if test $have_piolib_h = yes; then
     AC_SUBST(PIOLIBS)
+    AC_SUBST(PIOINCLUDES)
     AC_DEFINE(KST_HAVE_PLANCK, 1, [If we have the PLANCK I/O libraries.])
   fi
@@ -22,11 +37,26 @@
 
 # CDF Test
-KDE_CHECK_HEADER(cdf.h, AC_DEFINE(HAVE_CDF_H, 1, [If we have CDF headers]) have_cdf_h=yes, , )
-
-KDE_CHECK_LIB(cdf, CDFlib, CDFLIBS="-lcdf $CDFLIBS", , )
+ac_cdf_includes=""
+ac_cdf_libraries=""
+AC_ARG_WITH(cdf,
+    AC_HELP_STRING([--with-cdf=DIR],[where the root of CDF is installed ]),
+    [  ac_cdf_includes="-I$withval/src/include"
+       ac_cdf_libraries="-L$withval/src/lib"
+    ])
+
+all_includes_save="$all_includes"
+all_includes="$all_includes $ac_cdf_includes"
+KDE_CHECK_HEADER(cdf.h, AC_DEFINE(HAVE_CDF_H, 1, [If we have CDF headers]) have_cdf_h=yes CDFINCLUDES="$ac_cdf_includes", , )
+all_includes="$all_includes_save"
+
+ldflags_save="$LDFLAGS"
+LDFLAGS="$LDFLAGS $ac_cdf_libraries"
+KDE_CHECK_LIB(cdf, CDFlib, CDFLIBS="$ac_cdf_libraries -lcdf $CDFLIBS", , )
+LDFLAGS="$ldflags_save"
 
 if test $ac_cv_lib_cdf_CDFlib = yes; then
   if test $have_cdf_h = yes; then
     AC_SUBST(CDFLIBS)
+    AC_SUBST(CDFINCLUDES)
     AC_DEFINE(KST_HAVE_CDF, 1, [If we have the CDF libraries.])
   fi

--- kdeextragear-2/kst/kst/datasources/cdf/Makefile.am  #1.2:1.3
@@ -1,3 +1,3 @@
-INCLUDES=-I$(srcdir)/../.. $(all_includes)
+INCLUDES=-I$(srcdir)/../.. $(CDFINCLUDES) $(all_includes)
 
 kde_module_LTLIBRARIES=kstdata_cdf.la

--- kdeextragear-2/kst/kst/datasources/planck/Makefile.am  #1.5:1.6
@@ -1,3 +1,3 @@
-INCLUDES=-I$(srcdir)/../.. $(all_includes)
+INCLUDES=-I$(srcdir)/../.. $(PIOINCLUDES) $(all_includes)
 
 kde_module_LTLIBRARIES=kstdata_planck.la





More information about the Kst mailing list