|
From: <tim...@en...> - 2006-06-13 06:23:44
|
Daniel J Sebald wrote:
> I suppose the best thing is that based upon BINARY_DATA_FILE in=20
> ./configure, the file binary.c would or wouldn't be present in the=20
> list where bin_hook.c is. That is:
> gnuplot_SOURCES =3D alloc.c alloc.h ansichek.h axis.c axis.h bin_hook.c=
\
> breaders.c breaders.h bitmap.c bitmap.h color.c color.h command.c \...
>
> becomes
>
> gnuplot_SOURCES =3D alloc.c alloc.h ansichek.h axis.c axis.h binary.c \
> breaders.c breaders.h bitmap.c bitmap.h color.c color.h command.c \...
>
> or
>
> gnuplot_SOURCES =3D alloc.c alloc.h ansichek.h axis.c axis.h \
> breaders.c breaders.h bitmap.c bitmap.h color.c color.h command.c \...
>
> whichever is appropriate. I don't know how to do that in configure.
> =20
You add in configure.in, just after the "if test=20
"$enable_binary_data_file" =3D yes ... fi" code :
AM_CONDITIONAL(BUILD_BINARY_C, test "$enable_binary_data_file" =3D yes=
)
And in src/Makefile.am, you add :
if BUILD_BINARY_C
gnuplot_SOURCES +=3D binary.c
endif
=20
This is (one of) the standard way(s) to do conditional compilation=20
according to the autotools doc.
Timoth=E9e
|