Go to main content
Oracle® Developer Studio 12.6: GCC Compatibility Guide

Exit Print View

Updated: June 2017
 
 

Configure Scripts

Open source projects often use the autoconf package to create a script called configure that is used to detect platform-specific properties and set up correct macros and Makefiles to match the platform you are building on.

The Oracle Solaris system header files are designed to exclude Oracle Solaris extensions if the application requests any POSIX compilation modes using macros like _POSIX_SOURCE or __XPG7. You can perform the following task in order to request extensions to be added back to the system headers.

Add AC_USE_SYSTEM_EXTENSIONS flag to your configure.ac file, and rerun autoconf. This generates a configure script which will add the __EXTENSIONS__ macro when the configure script is run on Oracle Solaris. The system headers then enable extensions even in the conforming mode. Linux has a similar macro called _GNU_SOURCE.

For more information about the flag, see autoconf documentation.