# Public domain # ex:syn=bsdbuild # # Edacious configure script source. # # This is a BSDBuild configure source. The configure script is generated by the # mkconfigure(1) utility of BSDBuild (http://bsdbuild.hypertriton.com/). # package("Edacious") version("1.0") release("Sepulchral and Frog Like") register_section("Options specific to Edacious:") register("--enable-debug", "General debugging [default: no]") register("--enable-fpdebug", "Debug FP exceptions [default: no]") register("--enable-exprdebug", "Debug expression parsing [default: no]") register("--enable-warnings", "Enable compiler warnings [default: no]") register("--enable-edition", "Enable graphical editor [default: yes]") register("--with-agar[=PREFIX]", "Specify Agar location [default: auto]") hdefine(EDACIOUS_VERSION, "$VERSION") default_dir(DATADIR, "${PREFIX}/share/edacious") default_dir(MODULEDIR, "${LIBDIR}/edacious") default_dir(INCLDIR, "${PREFIX}/include/edacious") echo ' __ ------------------------------ ' echo ' / __|--+-+----+---+----+----+---+--| ' echo ' ___|_| | |_| |_ |_ |_ |_ |_ | ___ ' echo ' |---| \\ | / _ \ / _| | | / _ \ | | | ||| ' echo ' |===| |||| |_| || |_ | || |_| || |_| || === ' echo ' |___|_// ||_| |_| \ _| |_| \ _ / \___/ |____|' echo ' \ \ \_| | | | | | | | ' echo ' \__|__|-+---+----+---+----+------+---| ' echo ' ------------------------------ ' require(cc) check(sys_types) check(getopt) check(getpwuid) check(getuid) # Require Agar with VG, DEV and MATH extensions. require(agar, 1.6.0, ${prefix_agar}) require(agar-vg, 1.6.0, ${prefix_agar}) require(agar-dev, 1.6.0, ${prefix_agar}) require(agar-math, 1.6.0, ${prefix_agar}) # Import standard routines provided by Agar (without "AG"_ prefix). c_define(_USE_AGAR_STD) c_define(_USE_AGAR_CORE) c_define(_USE_AGAR_QUEUE) c_define(_USE_AGAR_GUI) c_define(_USE_AGAR_TYPES) # Import standard math functions (e.g., Sin()) provided by the # Agar-MATH library (without the "M_" prefix). c_define(_USE_AGAR_MATH) # Don't unwind nullability specifiers. c_define(_USE_AGAR_NULLABILITY) # C compiler options c_define(_ES_INTERNAL) c_define(_DEFAULT_SOURCE) c_define(_BSD_SOURCE) c_no_secure_warnings() if [ "${enable_warnings}" != "no" ]; then c_option(-Wall) c_option(-Werror) c_option(-Wmissing-prototypes) fi if [ "${enable_debug}" = "yes" ]; then c_define(ES_DEBUG) hdefine(ES_DEBUG, "yes") mdefine(CFLAGS, "${CFLAGS} -g") else hundef(ES_DEBUG) fi if [ "${enable_fpdebug}" = "yes" ]; then c_define(FP_DEBUG) hdefine(FP_DEBUG, "yes") else hundef(FP_DEBUG) fi if [ "${enable_exprdebug}" = "yes" ]; then c_define(EXPR_DEBUG) hdefine(EXPR_DEBUG, "yes") else hundef(EXPR_DEBUG) fi # Enable NLS if requested explicitely. if [ "${enable_nls}" = "yes" ]; then check(gettext, 0, ${prefix_gettext}) if [ "${HAVE_GETTEXT}" != "yes" ]; then echo "*" echo "* --enable-nls was given but gettext was not found." echo "*" exit 1 fi else hundef(HAVE_GETTEXT, GETTEXT_CFLAGS, GETTEXT_LIBS) fi # Set up configure script output. c_incprep($BLD/include/edacious) c_incdir($BLD/include) c_incdir($BLD/include/edacious) c_incdir_config($BLD/include/edacious/config) # Generate the "edacious-config" script. config_script(edacious-config, "-I${INCLDIR} ${GETTEXT_CFLAGS}", \ "-L${LIBDIR} -les_core ${GETTEXT_LIBS}")