Skip to content

Commit

Permalink
r.in.pdal: replace HAVE_PDAL_NOFILENAMEWRITER configure definition
Browse files Browse the repository at this point in the history
with a simple version check in the code to speed up configure process
  • Loading branch information
marisn committed Nov 28, 2024
1 parent ede9e99 commit 79ca955
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 46 deletions.
32 changes: 0 additions & 32 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10411,38 +10411,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
printf "%s\n" "#define HAVE_PDAL 1" >>confdefs.h


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use PDAL NoFilenameWriter" >&5
printf %s "checking whether to use PDAL NoFilenameWriter... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pdal/Writer.hpp>
class St:public pdal::NoFilenameWriter {};
int
main (void)
{
class NFWTest : public pdal::NoFilenameWriter {};
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :


printf "%s\n" "#define HAVE_PDAL_NOFILENAMEWRITER 1" >>confdefs.h

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext

LIBS=${ac_save_libs}
CFLAGS=${ac_save_cflags}
fi
Expand Down
10 changes: 0 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1092,16 +1092,6 @@ else

AC_DEFINE(HAVE_PDAL, 1, [Define to 1 if PDAL exists.])

AC_MSG_CHECKING(whether to use PDAL NoFilenameWriter)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pdal/Writer.hpp>
class St:public pdal::NoFilenameWriter {};]], [[
class NFWTest : public pdal::NoFilenameWriter {};
]])],
[
AC_DEFINE(HAVE_PDAL_NOFILENAMEWRITER, 1, [Define to 1 if PDAL NoFilenameWriter is present.])
AC_MSG_RESULT(yes)
],[AC_MSG_RESULT(no)])

LIBS=${ac_save_libs}
CFLAGS=${ac_save_cflags}
fi
Expand Down
3 changes: 0 additions & 3 deletions include/grass/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@
/* Define to 1 if PDAL exists. */
#undef HAVE_PDAL

/* Define to 1 if PDAL NoFilenameWriter is present. */
#undef HAVE_PDAL_NOFILENAMEWRITER

/* Define to 1 if glXCreateGLXPixmap exists. */
#undef HAVE_PIXMAPS

Expand Down
2 changes: 1 addition & 1 deletion raster/r.in.pdal/grassrasterwriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
#include <pdal/Writer.hpp>

/* Binning code wrapped as a PDAL Writer class */
#ifdef HAVE_PDAL_NOFILENAMEWRITER
#if PDAL_VERSION_MAJOR >= 2 && PDAL_VERSION_MINOR >= 7
class GrassRasterWriter : public pdal::NoFilenameWriter,
public pdal::Streamable {
#else
Expand Down

0 comments on commit 79ca955

Please sign in to comment.