You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Ray Morris <su...@bettercgi.com> on 2007/08/03 23:40:21 UTC
apxs wrong filename in LoadModule
My main .c module file does a #include on
another C source file. apxs uses the wrong
file name when it adds the LoadModule line.
I have tried several things to solve it, such
as moving the declaration of module MODULE_VAR_EXPORT
from one file to another, but to no avail. Does
anyone have any experience with this? Relevant
code follows.
$ cat mod_throttlebox.c:
#include "httpd.h"
#ifdef AP_SERVER_BASEREVISION
#define APACHE2
#else
#define APACHE1
#endif
#ifdef APACHE2
#include "mod_throttlebox20.c"
#else
#include "mod_throttlebox13.c"
#endif
$ cat mod_throttlebox13.c
#include "http_core.h"
#include "http_config.h"
#include "http_log.h"
#include "http_request.h"
...
module MODULE_VAR_EXPORT throttlebox_module;
...
module MODULE_VAR_EXPORT throttlebox_module =
{
STANDARD_MODULE_STUFF,
NULL,
...
apxs automatically adds the line:
LoadModule mod_throttlebox13.c
but I think it should be the file that apxs is
actually run on, like this:
LoadModule mod_throttlebox.c
Any ideas?
--
Ray B. Morris
support@bettercgi.com
Re: apxs wrong filename in LoadModule
Posted by Graham Dumpleton <gr...@gmail.com>.
The manual page for 'apxs' says:
-n name This explicitly sets the module name for the -i (install)
and -g (template generation) option. Use this to explicitly
specify the module name. For option -g this is required,
for option -i the apxs tool tries to determine the name
from the source or (as a fallback) at least by guessing it
from the filename.
Perhaps try using this option. See apxs manual page for more details.
Graham
On 04/08/07, Ray Morris <su...@bettercgi.com> wrote:
> My main .c module file does a #include on
> another C source file. apxs uses the wrong
> file name when it adds the LoadModule line.
> I have tried several things to solve it, such
> as moving the declaration of module MODULE_VAR_EXPORT
> from one file to another, but to no avail. Does
> anyone have any experience with this? Relevant
> code follows.
>
> $ cat mod_throttlebox.c:
> #include "httpd.h"
>
> #ifdef AP_SERVER_BASEREVISION
> #define APACHE2
> #else
> #define APACHE1
> #endif
>
> #ifdef APACHE2
> #include "mod_throttlebox20.c"
> #else
> #include "mod_throttlebox13.c"
> #endif
>
>
>
> $ cat mod_throttlebox13.c
>
> #include "http_core.h"
> #include "http_config.h"
> #include "http_log.h"
> #include "http_request.h"
> ...
> module MODULE_VAR_EXPORT throttlebox_module;
>
> ...
> module MODULE_VAR_EXPORT throttlebox_module =
> {
> STANDARD_MODULE_STUFF,
> NULL,
> ...
>
>
> apxs automatically adds the line:
> LoadModule mod_throttlebox13.c
>
> but I think it should be the file that apxs is
> actually run on, like this:
> LoadModule mod_throttlebox.c
>
> Any ideas?
> --
> Ray B. Morris
> support@bettercgi.com
>
>