|
From: Hai Z. <ha...@gm...> - 2006-04-25 07:41:18
|
For the sake of history...
---------- Forwarded message ----------
From: Hai Zaar <ha...@gm...>
Date: Mar 5, 2006 9:32 AM
Subject: Re: destdir
To: Peter Sperl <ps...@gm...>
On 3/5/06, Peter Sperl <ps...@gm...> wrote:
> Thanks! This sounds perfect.
>
> I have some questions.
>
> Why is the default sysconfdir /usr/etc/projectM? Why not
> $prefix/share/projectM or just /etc/projectM?
Autoconf defaults sysconfdir to $prefix/etc. Since default prefix is /usr..=
...
But config files are installed in $sysconfdir/projectM. So if you run
configure with --prefix=3D/usr and --sysconfdir=3D/etc, then all config
files will be in /etc/projectM, as you'd expect.
>
> I don't understand the problem with the autogen.sh script. I wrote it so
> that right after I checked out of CVS, I could just run autogen.sh instea=
d
> of typing in aclocal/autoreconf/automake/libtool/etc. I
> mean, it just calls all the autotools so that I don't have to do it
> manually. Is this bad? Is this typically what people use autogen.sh for o=
r
> should I rename this script something else like post_cvs_checkout.sh? If=
I
> make a small change to the configure.ac file, I do call autoreconf direct=
ly,
> the autogen.sh is just for post cvs setup. If this is still wrong, then =
of
> course I'll remove it, I'm just curious.
Well, instead of running autogen - just run autoreconf. If you change
configure.ac - run autoreconf, if you ammend any of Makefile.am - run
autoreconf, etc... You check out its man page - there is nothing
complicate there.
There is just no need to maintain autogen anymore - autoreconf does this jo=
b.
Rule of thumb - If you've changed anything about autotools - run autoreconf=
:)
>
> Thanks again for you help, and for answering my questions which are proba=
bly
> pretty naive.
Your welcome :) If you have any other questions - just shoot :)
>
> -Pete
>
>
> On 3/4/06, Hai Zaar < ha...@gm...> wrote:
> >
> Hi!
>
> After applying the patch:
> 1. libprojectM - configure now has to bes sounds like run as follows:
>
> ./configure --prefix=3D/usr --sysconfdir=3D/etc
> If you omit sysconfdir parameter, configuration will be installed
> to /usr/etc/projectM and
> not /etc/projectM as is generally expected.
> 2. autogen.sh is an old school - do _not_ use it. autoreconf command
> is intended to replace
> autogen scripts.
>
> Now, after applying patch and recompiling/installing libprojectM, lets
> see what to do with xmm-projectM:
> The patch updates xmm-projectM/configure.ac, so after running
> autoreconf && configure, look at the config.h file. You'll see some
> macros defined there. You are particularly interested in:
> PROJECTM_DATADIR
> PROJECTM_SYSCONFDIR
> Their values are picked up by configure from pkg-config database.
>
> So wherever you need to know config/presets file locations, you do
> something like this:
> 1. Include config.h file in the following way:
> #if HAVE_CONFIG_H
> #include <config.h>
> #endif
> 2. Now you have access to those macros, and the rest is trivial C
> coding, which I prefer to leave up to you. Instead of
> if ((in =3D fopen("/etc/projectM/config", "r")) !=3D 0)....
> you do:
> #define CONFIG_FILE "/config"
> char projectM_config[PATH_MAX];
> strcpy(projectM_config, PROJECTM_SYSCONFDIR);
> strcpy(projectM_config+strlen(PROJECTM_SYSCONFDIR),
> CONFIG_FILE);
> projectM_config[strlen(PROJECTM_SYSCONFDIR)+strlen(CONFIG_FILE)]=3D'\0';
> if ((in =3D fopen(projectM_config, "r")) !=3D 0) .....
>
>
> --
> Zaar
>
>
>
>
--
Zaar
--
Zaar
|