Changes between Version 25 and Version 26 of pm-switch

May 8, 2011 8:26:54 AM (10 years ago)

add info on config header files


  • pm-switch

    v25 v26  
    2323 * {{{Root/Xyz/examples/}}}
    2424 * {{{Root/Externals}}}
     25 * {{{Root/Xyz/src/XyzConfig.h}}}
     26 * {{{Root/Xyz/inc/config_xyz.h}}}
    2527the following files need to be created:
    2628 * {{{Root/Xyz/}}}
    126128  Other uses of the macros {{{AC_COIN_HAS_USER_LIBRARY}}} should be renamed to {{{AC_COIN_CHECK_USER_LIBRARY}}}.
    127129 1. The list of files to be created by the configure script (listed as arguments to the {{{AC_CONFIG_FILES}}} command must now include {{{xyz.pc}}} and {{{xyz-uninstalled.pc}}} (see below for a description of the corresponding .in files).
     130 1. The list of configuration header files to be created is changed to {{{AC_CONFIG_HEADER([config.h config_xyz.h])}}}, see below for more information.
    129132=== {{{Root/Xyz/}}} ===
    413416        $(CC) $(CFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
     419=== {{{Root/Xyz/inc/config*}}} and {{{Root/Xyz/src/XyzConfig.h}}}
     421It is considered a bad thing to distribute configuration files in the way it has been done before.
     422So 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).
     423If configure wasn't present (e.g., MSVS), {{{XyzConfig.h}}} would fall through to the second half.
     424This would include {{{configall_system.h}}} and then add whatever else was necessary.
     426The 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.
     427{{{XyzConfig.h}}} no longer includes a second section for use by MSVS.
     428Instead, this information is moved into {{{inc/config_xyz_default.h}}} and {{{inc/config_xyz.h}}}.
     430By changing the {{{}}} 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 {{{}}} has to be created by hand. See [wiki:pm-config-header here] for more information.