put /tmpasm/IFS {\n}
put /local/xschem/includes [@
#define _XOPEN_SOURCE
@?libs/gui/cairo/includes@
@?libs/gui/xrender/includes@
@?libs/gui/xcb/includes@
@?libs/gui/xcb_render/includes@
@?libs/gui/xgetxcbconnection/includes@
@libs/gui/xpm/includes@
@libs/script/tk/includes@
@libs/script/tcl/includes@
@]

uniq /local/xschem/includes
put /tmpasm/IFS { \t\r\n}


print [@/*************************************************************/
/* Generated by scconfig - DO NOT EDIT - will be overwritten */
/* Source: config.h.in; to regenerate run ./configure        */
/*************************************************************/@]

print {\n\n/* Uncomment following line to work around some GPU problems in graphic operations */\n}
print {/* with tiled fill pattern. Restore of damaged content will use XCopyArea() */\n}
print {/* #define FIX_BROKEN_TILED_FILL 1 */}

print {\n\n/* Define this var if libjpeg is available and is to be used */\n}
print_ternary ?libs/sul/libjpeg/presents {#define HAS_LIBJPEG 1} {/*#undef HAS_LIBJPEG */}

print {\n\n/* Define this var if cairo is available and is to be used */\n}
print_ternary ?libs/gui/cairo/presents {#define HAS_CAIRO 1} {/*#undef HAS_CAIRO */}

print {\n\n/* Define this var if Xlib's xcb is available */\n}
print_ternary ?libs/gui/xcb/presents {#define HAS_XCB 1} {/*#undef HAS_XCB */}

print {\n\n/* Define this var if dup2(2) is available */\n}
print_ternary ?libs/io/dup2/presents {#define HAS_DUP2 1} {/*#undef HAS_DUP2 */}

print {\n\n/* Define this var if popen(3) is available */\n}
print_ternary ?libs/io/popen/presents {#define HAS_POPEN 1} {/*#undef HAS_POPEN */}

print {\n\n/* Define this var if popen(3) is not available but fork(2) and pipe(2) are available */\n}
print_ternary ?libs/io/pipe/presents {#define HAS_PIPE 1} {/*#undef HAS_PIPE */}

print [@

/* typedef @sys/types/size/4_u_int@ xuint32_t; */
/* typedef @sys/types/size/4_s_int@ xint32_t; */
#define PREFIX               "@/local/xschem/prefix@"
#define XSCHEM_LIBRARY_PATH  "@/local/xschem/xschem-lib-path@"
#define USER_CONF_DIR        "@/local/xschem/user-conf-dir@"
#define XSCHEM_SHAREDIR      PREFIX "/share/xschem"

/* Extra includes required by the detected libs (may be empty): */

@/local/xschem/includes@

@]
