Changes between Version 26 and Version 27 of pm-switch


Ignore:
Timestamp:
Jun 9, 2011 2:48:10 PM (9 years ago)
Author:
stefan
Comment:

add what need to be changed when moving config header files around

Legend:

Unmodified
Added
Removed
Modified
  • pm-switch

    v26 v27  
    417417}}}
    418418
    419 === {{{Root/Xyz/inc/config*}}} and {{{Root/Xyz/src/XyzConfig.h}}}
     419== Changes to configuration header files ==
     420
     421=== {{{Root/Xyz/inc/config*}}} and {{{Root/Xyz/src/XyzConfig.h}}} ===
    420422
    421423It is considered a bad thing to distribute configuration files in the way it has been done before.
    422 So far, {{{XyzConfig.h}}} had two sections. If the build was occurring on a system where the configure script could run, {{{XyzConfig.h}}} would include {{{<builddir>/inc/config_xyz.h}}} (the file generated by configure).
     424So far, {{{XyzConfig.h}}} had two sections. If the build was occurring on a system where the configure script could run, {{{XyzConfig.h}}} would include {{{config_xyz.h}}} (the file generated by configure).
    423425If configure wasn't present (e.g., MSVS), {{{XyzConfig.h}}} would fall through to the second half.
    424426This would include {{{configall_system.h}}} and then add whatever else was necessary.
     
    426428The new system uses two files generated by configure: {{{config.h}}}, which is what is used when building libXyz, and a smaller {{{config_xyz.h}}}, which is what a client uses when building against libXyz.
    427429{{{XyzConfig.h}}} no longer includes a second section for use by MSVS.
    428 Instead, this information is moved into {{{inc/config_xyz_default.h}}} and {{{inc/config_xyz.h}}}.
     430Instead, this information is moved into {{{config_xyz_default.h}}} and {{{config_xyz.h}}}.
    429431
    430432By changing the {{{configure.ac}}} statement from {{{AC_CONFIG_HEADER([config_xyz.h])}}} to {{{AC_CONFIG_HEADER([config.h config_xyz.h])}}}, the new file {{{config.h}}} takes the role of the previous {{{config_xyz.h}}}. It is created automatically by autoconf, which is run by {{{run_autotools}}}. The new {{{config_xyz.h}}} is for defining public symbols only. It's template file {{{config_xyz.h.in}}} has to be created by hand. See [wiki:pm-config-header here] for more information.
     433
     434To make it easier to update the MSVS projects, the configuration header files also move from the {{{inc}}} directory to the directory where {{{XyzConfig.h}}} resides. The change further requires to update the DEFAULT_INCLUDES statement in all Makefile.am files to point to {{{-I${topbuilddir}/src}}} instead of {{{-I${topbuilddir}/inc}}}, provided the {{{config.h}}} file is created in the {{{src}}} subdirectory by configure.
     435Further, the last flag in the Cflags line of {{{xyz-uninstalled.pc.in}}} need to be changed to {{{-I@ABSBUILDDIR@/src}}}.