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/* Define to 1 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 to 1 if Xlib's xcb is available */\n}
print_ternary ?libs/gui/xcb/presents {#define HAS_XCB 1} {/*#undef HAS_XCB */}

print {\n\n/* Define to 1 if Xlib's xrender is available */\n}
print_ternary ?libs/gui/xrender/presents {#define HAS_XRENDER 1} {/*#undef HAS_RENDER */}

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

print {\n\n/* Define to 1 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 [@

#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@

@]
