bombasticbob / X11workbenchProject

The X11 Work Bench, an IDE for working on X11 applications, with a simple C language toolkit that should be familiar and easy to use for old school GUI programmers (currently pre-alpha state)
Other
3 stars 0 forks source link

'compile options' header needs to be installed #9

Closed bombasticbob closed 8 years ago

bombasticbob commented 8 years ago

when the libraries are compiled and installed, programs that use them need to know what options were compiled into the static libraries, since this might change how the header files work.

To make sure this happens properly, the compiled options generated by 'autoheader' need to be installed along with the other header files. This also needs to be properly tested with various configurations.

Additionally, any options that are defined need to be marked as 'X11 toolkit specific' so that they dont' conflict with end-user's option naming.

bombasticbob commented 8 years ago

include directory will now have a simplfied header containing only those options that need to be correctly set in the header files, as determined at install time. The built libraries would need these options defined or they won't link properly.

header file: include/X11workbench/X11workbenchToolkit_install_config.h

will be included by 'platform_helper.h' for non-'PROJECT' builds. When building X11workbench and related 'PROJECT' things, the configure-generated output file will be included by 'platform_helper.h'. This is mostly because the X11workbench program itself needs ALL of the definitions.

currently only these 4 definitions are affected:

HAVE_NANOSLEEP QSORT_R_BSD QSORT_R_GNUC X11WORKBENCH_TOOLKIT_HAVE_XPM

The first 3 might cause naming conflicts (or not, depending). most likely a re-definition using the same '#define' as before (without an '#undef') is not a problem. however, defining BOTH the 'QSORT_R_GNUC' and 'QSORT_R_BSD' might create some problems. A properly written configure script, however, would not do this