[SEToolkit-developer] autoconf and pathes
Brought to you by:
dmichelsen
|
From: Dagobert M. <da...@ba...> - 2008-01-14 17:35:31
|
Hi,
I am trying to resolve some autoconf-issues here but struggle
to get this right. There are lots of pathes hardcoded in the
sources like this from zoom.se:
#define ZOOM_ICON "%s/share/se/examples/data/zoom"
#define CPU_ICON "%s/share/se/examples/data/cpu"
#define DISK_ICON "%s/share/se/examples/data/disk"
#define MUTEX_ICON "%s/share/se/examples/data/mutex"
As I figured out this can be done by renaming this to zoom.se.in
and add this to AC_CONFIG_FILES at configure.ac. The variable is
called 'examplesdatadir' and is defined in Makefile.am, which is
unknown at configure-time. So I assume these pathes must be
defined in configure.ac. The following snippet was made after
some looking at how orca does this:
AC_ARG_WITH(se-include-dir,
[ --with-se-include-dir=3DDIR where the SE includes are stored =20=
[[pkgdatadir/include]]],
[ case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([*** You must supply an argument to the --with-=20=
se-include-dir option.])
;;
*) SE_INCLUDE_DIR=3D"$withval"
;;
esac
],
: ${SE_INCLUDE_DIR=3D$pkgdatadir/include}
)
VAR_DIR=3D`(
test "x$prefix" =3D xNONE && prefix=3D$ac_default_prefix
test "x$exec_prefix" =3D xNONE && exec_prefix=3D${prefix}
eval echo "$SE_INCLUDE_DIR"
)`
AC_SUBST(SE_INCLUDE_DIR)
Again, pkgdatadir is defined in the Makefile. Is there a way of doing =20=
this
without moving all the pathes to configure.ac?
Best regards
-- Dago
PS: If you have any test-cases ready I'd be happy to commit them.
--=20
Dagobert Michelsen (Leiter IT) Baltic Online Computer GmbH
Firmensitz: Alter Markt 1-2, 24103 Kiel, Telefon: +49 431 54003-0
Gesch=E4ftsf=FChrer: Erik Cickovskis, Amtsgericht Kiel, HRB 3756
"Of course computer servers don't need thrust, since they generally
don't go anywhere." -- Comment in TR on new HP server turbine fans
|