To include the example_hooks module in your server, follow the steps below:
Run configure with --enable-example-hooks option.
Make the server (run "make").
To add another module of your own:
A. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
B. Modify the file.
C. Create modules/new_module/config.m4.
1. Add APACHE_MODPATH_INIT(new_module).
2. Copy APACHE_MODULE line with "example_hooks" from modules/examples/config.m4.
3. Replace the first argument "example_hooks" with myexample.
4. Replace the second argument with brief description of your module. It will be used in configure --help.
5. If your module needs additional C compiler flags, linker flags or libraries, add them to CFLAGS, LDFLAGS and LIBS accordingly. See other config.m4 files in modules directory for examples.
6. Add APACHE_MODPATH_FINISH.
D. Create module/new_module/Makefile.in. If your module doesn't need special build instructions, all you need to have in that file is include $(top_srcdir)/build/special.mk.
E. Run ./buildconf from the top-level directory.
F. Build the server with --enable-myexample