static void gettext_configure (void) { static const char *functions = "ngettext dgettext bind_textdomain_codeset"; if (jb_check_functions(functions, NULL)) jb_variable_set_package_flags("gettext", NULL, "-DENABLE_NLS", NULL, NULL); else if (jb_check_functions(functions, "intl")) jb_variable_set_package_flags("gettext", NULL, "-DENABLE_NLS", NULL, "-lintl"); else jb_error("gettext found neither in libc nor in libintl"); jb_require_program("msgfmt"); }
void jb_package_configure (void) { if (lm_glibc_check()) { /* * We need -std=c99 for lround(), ... * We need _BSD_SOURCE (which requires -lbsd-compat) for struct icmp, ... * We need _POSIX_C_SOURCE for struct addrinfo, clock_gettime(), ... */ jb_variable_set_string("glibc-cflags", "-std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L"); jb_variable_set_string("glibc-cppflags", ""); // jb_variable_set_string("glibc-ldflags", "-lbsd-compat"); jb_variable_set_string("glibc-ldflags", ""); } else { jb_variable_set_string("glibc-cflags", ""); jb_variable_set_string("glibc-cppflags", ""); jb_variable_set_string("glibc-ldflags", ""); } if (jb_check_functions("clock_gettime", "rt")) jb_variable_set_string("clock-gettime-ldflags", "-lrt"); else if (jb_check_functions("clock_gettime", NULL)) jb_variable_set_string("clock-gettime-ldflags", ""); else jb_error("clock_gettime() found neither in librt nor in libc"); jb_check_reentrant_dns_resolver(); jb_require_packages("GNOME", "gnome", "gthread-2.0 gtk+-3.0 libpanelapplet-4.0 gmodule-2.0"); if (jb_variable_get_bool("geoip")) { if (lm_geoip_check()) { if (! lm_gdk_pixbuf_loader_check("art/flags/fr.svg", "image/svg+xml")) jb_warning("GTK+ cannot load image/svg+xml images, country flags will not be displayed"); } else { jb_warning("disabling option \"geoip\" since GeoIP was not found"); jb_variable_set_bool("geoip", FALSE); } } report_invalid_prefix(); }