build: remove autotools files
This commit is contained in:
5949
Makefile.am
5949
Makefile.am
File diff suppressed because it is too large
Load Diff
@@ -1,221 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# examples/C/glib
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
examples_C_glib_cppflags = \
|
|
||||||
-I$(top_srcdir)/src/libnm-core-public \
|
|
||||||
-I$(top_builddir)/src/libnm-core-public \
|
|
||||||
-I$(top_srcdir)/src/libnm-client-public \
|
|
||||||
-I$(top_builddir)/src/libnm-client-public \
|
|
||||||
$(GLIB_CFLAGS)
|
|
||||||
|
|
||||||
examples_C_glib_cppflags_gdbus = $(examples_C_glib_cppflags)
|
|
||||||
examples_C_glib_cppflags_libnm = $(examples_C_glib_cppflags)
|
|
||||||
|
|
||||||
check_programs_norun += \
|
|
||||||
examples/C/glib/add-connection-gdbus \
|
|
||||||
examples/C/glib/add-connection-libnm \
|
|
||||||
examples/C/glib/get-active-connections-gdbus \
|
|
||||||
examples/C/glib/get-ap-info-libnm \
|
|
||||||
examples/C/glib/list-connections-gdbus \
|
|
||||||
examples/C/glib/list-connections-libnm \
|
|
||||||
examples/C/glib/monitor-nm-running-gdbus \
|
|
||||||
examples/C/glib/monitor-nm-state-gdbus \
|
|
||||||
examples/C/glib/vpn-import-libnm \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
examples_C_glib_add_connection_gdbus_CPPFLAGS = $(examples_C_glib_cppflags_gdbus)
|
|
||||||
examples_C_glib_add_connection_gdbus_LDADD = \
|
|
||||||
$(GLIB_LIBS) \
|
|
||||||
$(UUID_LIBS)
|
|
||||||
$(examples_C_glib_add_connection_gdbus_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
examples_C_glib_add_connection_libnm_CPPFLAGS = $(examples_C_glib_cppflags_libnm)
|
|
||||||
examples_C_glib_add_connection_libnm_LDADD = \
|
|
||||||
src/libnm-client-impl/libnm.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
$(examples_C_glib_add_connection_libnm_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
examples_C_glib_get_active_connections_gdbus_CPPFLAGS = $(examples_C_glib_cppflags_gdbus)
|
|
||||||
examples_C_glib_get_active_connections_gdbus_LDADD = \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
$(examples_C_glib_get_active_connections_gdbus_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
examples_C_glib_get_ap_info_libnm_CPPFLAGS = $(examples_C_glib_cppflags_libnm)
|
|
||||||
examples_C_glib_get_ap_info_libnm_LDADD = \
|
|
||||||
src/libnm-client-impl/libnm.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
$(examples_C_glib_get_ap_info_libnm_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
examples_C_glib_list_connections_gdbus_CPPFLAGS = $(examples_C_glib_cppflags_gdbus)
|
|
||||||
examples_C_glib_list_connections_gdbus_LDADD = \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
examples_C_glib_list_connections_libnm_CPPFLAGS = $(examples_C_glib_cppflags_libnm)
|
|
||||||
examples_C_glib_list_connections_libnm_LDADD = \
|
|
||||||
src/libnm-client-impl/libnm.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
$(examples_C_glib_list_connections_libnm_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
examples_C_glib_monitor_nm_running_gdbus_CPPFLAGS = $(examples_C_glib_cppflags_gdbus)
|
|
||||||
examples_C_glib_monitor_nm_running_gdbus_LDADD = \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
examples_C_glib_monitor_nm_state_gdbus_CPPFLAGS = $(examples_C_glib_cppflags_gdbus)
|
|
||||||
examples_C_glib_monitor_nm_state_gdbus_LDADD = \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
examples_C_glib_vpn_import_libnm_CPPFLAGS = $(examples_C_glib_cppflags_libnm)
|
|
||||||
examples_C_glib_vpn_import_libnm_LDADD = \
|
|
||||||
src/libnm-client-impl/libnm.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
$(examples_C_glib_vpn_import_libnm_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_libnm_client_public_mkenums_h)
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
|
||||||
examples/C/glib/meson.build
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# examples/C/qt
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
if WITH_QT
|
|
||||||
|
|
||||||
examples_C_qt_cppflags = \
|
|
||||||
-I$(top_builddir)/src/libnm-core-public \
|
|
||||||
-I$(top_srcdir)/src/libnm-core-public \
|
|
||||||
-I$(top_builddir)/libnm \
|
|
||||||
-I$(top_srcdir)/libnm \
|
|
||||||
-I$(builddir)/examples/C/qt \
|
|
||||||
$(DBUS_CFLAGS) \
|
|
||||||
$(QT_CFLAGS)
|
|
||||||
|
|
||||||
check_programs_norun += \
|
|
||||||
examples/C/qt/add-connection-wired \
|
|
||||||
examples/C/qt/list-connections \
|
|
||||||
examples/C/qt/change-ipv4-addresses \
|
|
||||||
examples/C/qt/monitor-nm-running
|
|
||||||
|
|
||||||
examples_C_qt_add_connection_wired_SOURCES = examples/C/qt/add-connection-wired.cpp
|
|
||||||
examples_C_qt_add_connection_wired_CPPFLAGS = $(examples_C_qt_cppflags)
|
|
||||||
examples_C_qt_add_connection_wired_LDADD = \
|
|
||||||
$(DBUS_LIBS) \
|
|
||||||
$(QT_LIBS)
|
|
||||||
|
|
||||||
examples_C_qt_list_connections_SOURCES = examples/C/qt/list-connections.cpp
|
|
||||||
examples_C_qt_list_connections_CPPFLAGS = $(examples_C_qt_cppflags)
|
|
||||||
examples_C_qt_list_connections_LDADD = \
|
|
||||||
$(DBUS_LIBS) \
|
|
||||||
$(QT_LIBS)
|
|
||||||
|
|
||||||
examples_C_qt_change_ipv4_addresses_SOURCES = examples/C/qt/change-ipv4-addresses.cpp
|
|
||||||
examples_C_qt_change_ipv4_addresses_CPPFLAGS = $(examples_C_qt_cppflags)
|
|
||||||
examples_C_qt_change_ipv4_addresses_LDADD = \
|
|
||||||
$(DBUS_LIBS) \
|
|
||||||
$(QT_LIBS)
|
|
||||||
|
|
||||||
examples_C_qt_monitor_nm_running_SOURCES = examples/C/qt/monitor-nm-running.cpp
|
|
||||||
examples_C_qt_monitor_nm_running_CPPFLAGS = $(examples_C_qt_cppflags)
|
|
||||||
examples_C_qt_monitor_nm_running_LDADD = \
|
|
||||||
$(DBUS_LIBS) \
|
|
||||||
$(QT_LIBS)
|
|
||||||
|
|
||||||
examples/C/qt/monitor-nm-running.moc: examples/C/qt/monitor-nm-running.cpp
|
|
||||||
$(AM_V_GEN) $(MOC) -i $< -o $@
|
|
||||||
|
|
||||||
$(examples_C_qt_monitor_nm_running_OBJECTS): examples/C/qt/monitor-nm-running.moc
|
|
||||||
|
|
||||||
CLEANFILES += \
|
|
||||||
examples/C/qt/monitor-nm-running.moc
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
|
||||||
examples/C/qt/add-connection-wired.cpp \
|
|
||||||
examples/C/qt/list-connections.cpp \
|
|
||||||
examples/C/qt/change-ipv4-addresses.cpp \
|
|
||||||
examples/C/qt/monitor-nm-running.cpp \
|
|
||||||
examples/C/qt/meson.build
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# examples
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
|
||||||
examples/dispatcher/10-ifcfg-rh-routes.sh \
|
|
||||||
examples/dispatcher/70-wifi-wired-exclusive.sh \
|
|
||||||
\
|
|
||||||
examples/js/get_ips.js \
|
|
||||||
\
|
|
||||||
examples/lua/lgi/add-connection.lua \
|
|
||||||
examples/lua/lgi/change-vpn-username.lua \
|
|
||||||
examples/lua/lgi/deactivate-all.lua \
|
|
||||||
examples/lua/lgi/get-basic-nm-info.lua \
|
|
||||||
examples/lua/lgi/get-ips.lua \
|
|
||||||
examples/lua/lgi/list-connections.lua \
|
|
||||||
examples/lua/lgi/list-devices.lua \
|
|
||||||
examples/lua/lgi/show-wifi-networks.lua \
|
|
||||||
\
|
|
||||||
examples/nm-conf.d/30-anon.conf \
|
|
||||||
examples/nm-conf.d/31-mac-addr-change.conf \
|
|
||||||
\
|
|
||||||
examples/python/dbus/add-connection-compat.py \
|
|
||||||
examples/python/dbus/add-connection.py \
|
|
||||||
examples/python/dbus/add-wifi-eap-connection.py \
|
|
||||||
examples/python/dbus/add-wifi-psk-connection.py \
|
|
||||||
examples/python/dbus/add-wifi-sae-connection.py \
|
|
||||||
examples/python/dbus/checkpoint.py \
|
|
||||||
examples/python/dbus/create-bond.py \
|
|
||||||
examples/python/dbus/disconnect-device.py \
|
|
||||||
examples/python/dbus/get-active-connection-uuids.py \
|
|
||||||
examples/python/dbus/is-wwan-default.py \
|
|
||||||
examples/python/dbus/list-connections.py \
|
|
||||||
examples/python/dbus/list-devices.py \
|
|
||||||
examples/python/dbus/nm-state.py \
|
|
||||||
examples/python/dbus/show-bssids.py \
|
|
||||||
examples/python/dbus/update-ip4-method.py \
|
|
||||||
examples/python/dbus/update-secrets.py \
|
|
||||||
examples/python/dbus/vpn.py \
|
|
||||||
examples/python/dbus/wifi-active-ap.py\
|
|
||||||
examples/python/dbus/wifi-hotspot.py \
|
|
||||||
\
|
|
||||||
examples/python/gi/README \
|
|
||||||
examples/python/gi/add_connection.py \
|
|
||||||
examples/python/gi/checkpoint.py \
|
|
||||||
examples/python/gi/deactivate-all.py \
|
|
||||||
examples/python/gi/device-reapply.py \
|
|
||||||
examples/python/gi/device-state-ip4config.py \
|
|
||||||
examples/python/gi/dns.py \
|
|
||||||
examples/python/gi/firewall-zone.py \
|
|
||||||
examples/python/gi/get-active-connections.py \
|
|
||||||
examples/python/gi/get-devices.py \
|
|
||||||
examples/python/gi/get-interface-flags.py \
|
|
||||||
examples/python/gi/get-lldp-neighbors.py \
|
|
||||||
examples/python/gi/get_ips.py \
|
|
||||||
examples/python/gi/gmaincontext.py \
|
|
||||||
examples/python/gi/list-connections.py \
|
|
||||||
examples/python/gi/nm-add-connection2.py \
|
|
||||||
examples/python/gi/nm-connection-update-stable-id.py \
|
|
||||||
examples/python/gi/nm-keyfile.py \
|
|
||||||
examples/python/gi/nm-up-many.py \
|
|
||||||
examples/python/gi/nm-update2.py \
|
|
||||||
examples/python/gi/nm-wg-set \
|
|
||||||
examples/python/gi/ovs-external-ids.py \
|
|
||||||
examples/python/gi/setting-user-data.py \
|
|
||||||
examples/python/gi/show-wifi-networks.py \
|
|
||||||
examples/python/gi/update-ip4-method.py \
|
|
||||||
examples/python/gi/vpn-import.py \
|
|
||||||
examples/python/gi/wifi-p2p.py \
|
|
||||||
\
|
|
||||||
examples/python/python-networkmanager/README \
|
|
||||||
\
|
|
||||||
examples/ruby/add-connection.rb \
|
|
||||||
examples/ruby/get-basic-nm-info.rb \
|
|
||||||
examples/ruby/list-devices.rb \
|
|
||||||
\
|
|
||||||
examples/shell/active-wifi.sh \
|
|
||||||
examples/shell/disconnect-device.sh \
|
|
||||||
examples/shell/get-hostname.sh \
|
|
||||||
examples/shell/list-devices.sh \
|
|
||||||
examples/shell/nm-logging.sh \
|
|
||||||
\
|
|
||||||
$(NULL)
|
|
168
Makefile.glib
168
Makefile.glib
@@ -1,168 +0,0 @@
|
|||||||
#
|
|
||||||
# Work-in-progress...
|
|
||||||
# See https://bugzilla.gnome.org/show_bug.cgi?id=654395
|
|
||||||
|
|
||||||
_GLIB_CLEANFILES =
|
|
||||||
_GLIB_DISTCLEANFILES =
|
|
||||||
|
|
||||||
_GLIB_V_GEN = $(_glib_v_gen_$(V))
|
|
||||||
_glib_v_gen_ = $(_glib_v_gen_$(AM_DEFAULT_VERBOSITY))
|
|
||||||
_glib_v_gen_0 = @echo " GEN " $(subst .stamp,,$@);
|
|
||||||
|
|
||||||
|
|
||||||
### glib-genmarshal
|
|
||||||
|
|
||||||
_GLIB_MARSHAL_GENERATED = $(subst .h,,$(filter %marshal.h,$(GLIB_GENERATED)))
|
|
||||||
|
|
||||||
_glib_marshal_prefix = $(subst marshal,,$(subst _marshal,,$(subst -,_,$(notdir $(1)))))_marshal
|
|
||||||
_glib_marshal_sources_var = $(subst -,_,$(notdir $(1)))_sources
|
|
||||||
_glib_marshal_sources = $(filter-out %.h,$(filter-out $(GLIB_GENERATED),$($(_glib_marshal_sources_var))))
|
|
||||||
|
|
||||||
define _glib_make_genmarshal_rules
|
|
||||||
$(if $(_glib_marshal_sources),,$(error Need to define $(_glib_marshal_sources_var) for $(1).[ch]))
|
|
||||||
|
|
||||||
$(1).list.stamp: $(_glib_marshal_sources) Makefile
|
|
||||||
$$(_GLIB_V_GEN) LC_ALL=C sed -ne 's/.*_$(_glib_marshal_prefix)_\([_A-Z]*\).*/\1/p' $$(filter-out Makefile, $$^) | sort -u | sed -e 's/__/:/' -e 's/_/,/g' > $(1).list.tmp && \
|
|
||||||
(cmp -s $(1).list.tmp $(1).list || cp $(1).list.tmp $(1).list) && \
|
|
||||||
rm -f $(1).list.tmp && \
|
|
||||||
echo timestamp > $$@
|
|
||||||
|
|
||||||
$(1).list: $(1).list.stamp
|
|
||||||
@true
|
|
||||||
|
|
||||||
$(1).h: $(1).list
|
|
||||||
$$(_GLIB_V_GEN) $$(GLIB_GENMARSHAL) \
|
|
||||||
--prefix=_$(_glib_marshal_prefix) --header \
|
|
||||||
$$(GLIB_GENMARSHAL_H_FLAGS) \
|
|
||||||
$$($(_glib_marshal_prefix)_GENMARSHAL_H_FLAGS) \
|
|
||||||
$$< > $$@.tmp && \
|
|
||||||
mv $$@.tmp $$@
|
|
||||||
|
|
||||||
$(1).c: $(1).list
|
|
||||||
$$(_GLIB_V_GEN) (echo "#include \"$$(subst .c,.h,$$(@F))\""; $$(GLIB_GENMARSHAL) \
|
|
||||||
--prefix=_$(_glib_marshal_prefix) --body \
|
|
||||||
$$(GLIB_GENMARSHAL_C_FLAGS) \
|
|
||||||
$$($(_glib_marshal_prefix)_GENMARSHAL_C_FLAGS) \
|
|
||||||
$$< ) > $$@.tmp && \
|
|
||||||
mv $$@.tmp $$@
|
|
||||||
|
|
||||||
_GLIB_CLEANFILES += $(1).list.stamp $(1).list
|
|
||||||
_GLIB_DISTCLEANFILES += $(1).h $(1).c
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach f,$(_GLIB_MARSHAL_GENERATED),$(eval $(call _glib_make_genmarshal_rules,$f)))
|
|
||||||
|
|
||||||
|
|
||||||
### glib-mkenums
|
|
||||||
|
|
||||||
_GLIB_ENUM_TYPES_GENERATED = $(subst .h,,$(filter %enum-types.h %enumtypes.h,$(GLIB_GENERATED)))
|
|
||||||
|
|
||||||
_glib_enum_types_prefix = $(subst -,_,$(notdir $(1)))
|
|
||||||
_glib_enum_types_guard = __$(shell LC_ALL=C echo $(_glib_enum_types_prefix) | tr 'a-z' 'A-Z')_H__
|
|
||||||
_glib_enum_types_sources_var = $(_glib_enum_types_prefix)_sources
|
|
||||||
_glib_enum_types_sources = $(filter-out $(GLIB_GENERATED),$($(_glib_enum_types_sources_var)))
|
|
||||||
_glib_enum_types_h_sources = $(filter %.h,$(_glib_enum_types_sources))
|
|
||||||
|
|
||||||
define _glib_make_mkenums_rules
|
|
||||||
$(if $(_glib_enum_types_sources),,$(error Need to define $(_glib_enum_types_sources_var) for $(1).[ch]))
|
|
||||||
|
|
||||||
$(1).h.stamp: $(_glib_enum_types_h_sources) Makefile
|
|
||||||
$$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
|
|
||||||
--fhead "/* Generated by glib-mkenums. Do not edit */\n\n#ifndef $(_glib_enum_types_guard)\n#define $(_glib_enum_types_guard)\n\n" \
|
|
||||||
$$(GLIB_MKENUMS_H_FLAGS) \
|
|
||||||
$$($(_glib_enum_types_prefix)_MKENUMS_H_FLAGS) \
|
|
||||||
--fhead "#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
|
|
||||||
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \
|
|
||||||
--ftail "G_END_DECLS\n\n#endif /* $(_glib_enum_types_guard) */" \
|
|
||||||
$$(filter-out Makefile, $$^) > $(1).h.tmp && \
|
|
||||||
(cmp -s $(1).h.tmp $(1).h || cp $(1).h.tmp $(1).h) && \
|
|
||||||
rm -f $(1).h.tmp && \
|
|
||||||
echo timestamp > $$@
|
|
||||||
|
|
||||||
$(1).h: $(1).h.stamp
|
|
||||||
@true
|
|
||||||
|
|
||||||
$(1).c.stamp: $(_glib_enum_types_h_sources) Makefile
|
|
||||||
$$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
|
|
||||||
--fhead "/* Generated by glib-mkenums. Do not edit */\n\n#include \"config.h\"\n\n#include \"$(notdir $(1)).h\"\n" \
|
|
||||||
$$(GLIB_MKENUMS_C_FLAGS) \
|
|
||||||
$$($(_glib_enum_types_prefix)_MKENUMS_C_FLAGS) \
|
|
||||||
--fhead "$$(foreach f,$$(filter-out Makefile,$$(^F)),\n#include \"$$(f)\")\n\n" \
|
|
||||||
--vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n\n if (g_once_init_enter (&g_define_type_id__volatile))\n {\n static const G@Type@Value values[] = {\n" \
|
|
||||||
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },\n" \
|
|
||||||
--vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id =\n g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n\n return g_define_type_id__volatile;\n}\n" \
|
|
||||||
$$(filter-out Makefile, $$^) > $(1).c.tmp && \
|
|
||||||
(cmp -s $(1).c.tmp $(1).c || cp $(1).c.tmp $(1).c) && \
|
|
||||||
rm -f $(1).c.tmp && \
|
|
||||||
echo timestamp > $$@
|
|
||||||
|
|
||||||
$(1).c: $(1).c.stamp
|
|
||||||
@true
|
|
||||||
|
|
||||||
_GLIB_CLEANFILES += $(1).h.stamp $(1).c.stamp
|
|
||||||
_GLIB_DISTCLEANFILES += $(1).h $(1).c $(1).h.stamp $(1).c.stamp
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach f,$(_GLIB_ENUM_TYPES_GENERATED),$(eval $(call _glib_make_mkenums_rules,$f)))
|
|
||||||
|
|
||||||
|
|
||||||
### glib-compile-schemas
|
|
||||||
|
|
||||||
_GLIB_ENUMS_XML_GENERATED = $(filter %.enums.xml,$(GLIB_GENERATED))
|
|
||||||
_GLIB_GSETTINGS_SCHEMA_FILES = $(filter %.gschema.xml,$(gsettingsschema_DATA))
|
|
||||||
_GLIB_GSETTINGS_VALID_FILES = $(subst .xml,.valid,$(_GLIB_GSETTINGS_SCHEMA_FILES))
|
|
||||||
|
|
||||||
_glib_enums_xml_prefix = $(subst .,_,$(notdir $(1)))
|
|
||||||
_glib_enums_xml_sources_var = $(_glib_enums_xml_prefix)_sources
|
|
||||||
_glib_enums_xml_sources = $(filter-out $(GLIB_GENERATED),$($(_glib_enums_xml_sources_var)))
|
|
||||||
_glib_enums_xml_namespace = $(subst .enums.xml,,$(notdir $(1)))
|
|
||||||
|
|
||||||
define _glib_make_enums_xml_rule
|
|
||||||
$(if $(_glib_enums_xml_sources),,$(error Need to define $(_glib_enums_xml_sources_var) for $(1)))
|
|
||||||
|
|
||||||
$(1): $(_glib_enums_xml_sources) Makefile
|
|
||||||
$$(_GLIB_V_GEN) $$(GLIB_MKENUMS) --comments '<!-- @comment@ -->' --fhead "<schemalist>" --vhead " <@type@ id='$(_glib_enums_xml_namespace).@EnumName@'>" --vprod " <value nick='@valuenick@' value='@valuenum@'/>" --vtail " </@type@>" --ftail "</schemalist>" $$(filter-out Makefile, $$^) > $$@.tmp && mv $$@.tmp $$@
|
|
||||||
endef
|
|
||||||
|
|
||||||
_GLIB_V_CHECK = $(_glib_v_check_$(V))
|
|
||||||
_glib_v_check_ = $(_glib_v_check_$(AM_DEFAULT_VERBOSITY))
|
|
||||||
_glib_v_check_0 = @echo " CHECK " $(subst .valid,.xml,$@);
|
|
||||||
|
|
||||||
define _glib_make_schema_validate_rule
|
|
||||||
$(subst .xml,.valid,$(1)): $(_GLIB_ENUMS_XML_GENERATED) $(1)
|
|
||||||
$$(_GLIB_V_CHECK) $$(GLIB_COMPILE_SCHEMAS) --strict --dry-run $$(addprefix --schema-file=,$$^) && touch $$@
|
|
||||||
endef
|
|
||||||
|
|
||||||
define _glib_make_schema_rules
|
|
||||||
all-am: $(_GLIB_GSETTINGS_VALID_FILES)
|
|
||||||
|
|
||||||
install-data-am: glib-install-schemas-hook
|
|
||||||
|
|
||||||
glib-install-schemas-hook: install-gsettingsschemaDATA
|
|
||||||
@test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || (echo $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir))
|
|
||||||
|
|
||||||
uninstall-am: glib-uninstall-schemas-hook
|
|
||||||
|
|
||||||
glib-uninstall-schemas-hook: uninstall-gsettingsschemaDATA
|
|
||||||
@test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || (echo $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir))
|
|
||||||
|
|
||||||
.PHONY: glib-install-schemas-hook glib-uninstall-schemas-hook
|
|
||||||
endef
|
|
||||||
|
|
||||||
_GLIB_CLEANFILES += $(_GLIB_ENUMS_XML_GENERATED) $(_GLIB_GSETTINGS_VALID_FILES)
|
|
||||||
|
|
||||||
$(foreach f,$(_GLIB_ENUMS_XML_GENERATED),$(eval $(call _glib_make_enums_xml_rule,$f)))
|
|
||||||
$(foreach f,$(_GLIB_GSETTINGS_SCHEMA_FILES),$(eval $(call _glib_make_schema_validate_rule,$f)))
|
|
||||||
$(if $(_GLIB_GSETTINGS_SCHEMA_FILES),$(eval $(_glib_make_schema_rules)))
|
|
||||||
|
|
||||||
|
|
||||||
### Cleanup
|
|
||||||
.PHONY: clean-glib distclean-glib
|
|
||||||
|
|
||||||
clean-am: clean-glib
|
|
||||||
clean-glib:
|
|
||||||
$(if $(strip $(_GLIB_CLEANFILES)),-rm -f $(_GLIB_CLEANFILES))
|
|
||||||
|
|
||||||
distclean-am: distclean-glib
|
|
||||||
distclean-glib:
|
|
||||||
$(if $(strip $(_GLIB_DISTCLEANFILES)),-rm -f $(_GLIB_DISTCLEANFILES))
|
|
@@ -1,62 +0,0 @@
|
|||||||
# Makefile for Vala API Generator (vapigen)
|
|
||||||
# Written by Evan Nemerson
|
|
||||||
#
|
|
||||||
# The author disclaims copyright to this source code. In place of
|
|
||||||
# a legal notice, here is a blessing:
|
|
||||||
#
|
|
||||||
# May you do good and not evil.
|
|
||||||
# May you find forgiveness for yourself and forgive others.
|
|
||||||
# May you share freely, never taking more than you give.
|
|
||||||
#
|
|
||||||
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
|
|
||||||
#
|
|
||||||
# Variables:
|
|
||||||
#
|
|
||||||
# VAPIGEN_FILES
|
|
||||||
#
|
|
||||||
# VAPIs to create
|
|
||||||
#
|
|
||||||
# *_DEPS / VAPIGEN_DEPS
|
|
||||||
#
|
|
||||||
# The dependencies. Generally the pkg-config names.
|
|
||||||
#
|
|
||||||
# *_METADATADIRS / VAPIGEN_METADATADIRS
|
|
||||||
#
|
|
||||||
# Directory containing the metadata.
|
|
||||||
#
|
|
||||||
# *_VAPIDIRS / VAPIGEN_VAPIDIRS
|
|
||||||
#
|
|
||||||
# Additional location(s) to search for VAPI dependencies.
|
|
||||||
#
|
|
||||||
# *_GIRDIRS / VAPIGEN_GIRDIRS
|
|
||||||
#
|
|
||||||
# Additional location(s) to search for GIR dependencies.
|
|
||||||
#
|
|
||||||
# *_FILES
|
|
||||||
#
|
|
||||||
# The files which should be used to generate the VAPI.
|
|
||||||
|
|
||||||
_vapigen_silent_prefix = $(_vapigen_silent_prefix_$(V))
|
|
||||||
_vapigen_silent_prefix_ = $(_vapigen_silent_prefix_$(AM_DEFAULT_VERBOSITY))
|
|
||||||
_vapigen_silent_prefix_0 = @echo " VAPIGEN $(1)";
|
|
||||||
_vapigen_silent_opts = $(_vapigen_silent_opts_$(V))
|
|
||||||
_vapigen_silent_opts_ = $(_vapigen_silent_opts_$(AM_DEFAULT_VERBOSITY))
|
|
||||||
_vapigen_silent_opts_0 = --quiet
|
|
||||||
|
|
||||||
_vapi_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
|
|
||||||
|
|
||||||
define vapigen
|
|
||||||
$(1): $$($(_vapi_name)_GIR)
|
|
||||||
$(_vapigen_silent_prefix) \
|
|
||||||
G_DEBUG='' \
|
|
||||||
$(VAPIGEN) $(_vapigen_silent_opts) \
|
|
||||||
--library $(1:.vapi=) \
|
|
||||||
$(foreach _vapi_metadatadir_name,$(if $($(_vapi_name)_METADATADIRS),$($(_vapi_name)_METADATADIRS),$(VAPIGEN_METADATADIRS)),--metadatadir $(_vapi_metadatadir_name)) \
|
|
||||||
$(foreach _vapi_dir_name,$(if $($(_vapi_name)_VAPIDIRS),$($(_vapi_name)_VAPIDIRS),$(VAPIGEN_VAPIDIRS)),--vapidir $(_vapi_dir_name)) \
|
|
||||||
$(foreach _vapi_gir_dir,$(if $($(_vapi_name)_GIRDIRS),$($(_vapi_name)_GIRDIRS),$(VAPIGEN_GIRDIRS)),--girdir $(_vapi_gir_dir)) \
|
|
||||||
$(foreach _vapi_dep_name,$(if $($(_vapi_name)_DEPS),$($(_vapi_name)_DEPS),$(VAPIGEN_DEPS)),--pkg $(_vapi_dep_name)) \
|
|
||||||
$$($(_vapi_name)_FILES) && \
|
|
||||||
touch $(1)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach vapi,$(VAPIGEN_VAPIS),$(eval $(call vapigen,$(vapi))))
|
|
31
autogen.sh
31
autogen.sh
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Run this to generate all the initial makefiles, etc.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
srcdir=`dirname $0`
|
|
||||||
if test -z "$srcdir"; then
|
|
||||||
srcdir=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
olddir=`pwd`
|
|
||||||
|
|
||||||
REQUIRED_AUTOMAKE_VERSION=1.9
|
|
||||||
PKG_NAME=NetworkManager
|
|
||||||
|
|
||||||
(test -f $srcdir/configure.ac \
|
|
||||||
&& test -f $srcdir/src/core/main.c) || {
|
|
||||||
printf "**Error**: Directory "\`$srcdir\'" does not look like the" >&2
|
|
||||||
echo " top-level $PKG_NAME directory" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
cd $srcdir
|
|
||||||
|
|
||||||
gtkdocize
|
|
||||||
autoreconf --verbose --force --install
|
|
||||||
|
|
||||||
cd $olddir
|
|
||||||
if test -z "$NOCONFIGURE"; then
|
|
||||||
exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection "$@"
|
|
||||||
fi
|
|
@@ -1,27 +0,0 @@
|
|||||||
# With autotools, it is not easily possible to generate these defines
|
|
||||||
# from configure.ac.
|
|
||||||
#
|
|
||||||
# See https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
|
|
||||||
#
|
|
||||||
# With meson-only, they could just be set via config.h.meson
|
|
||||||
config-extra.h: config-extra.h.mk config.h config.status
|
|
||||||
$(AM_V_GEN) \
|
|
||||||
echo "/* Generated by Makefile.am */" >$@ && \
|
|
||||||
echo "#define BINDIR \"$(bindir)\"" >>$@ && \
|
|
||||||
echo "#define DATADIR \"$(datadir)\"" >>$@ && \
|
|
||||||
echo "#define LIBEXECDIR \"$(libexecdir)\"" >>$@ && \
|
|
||||||
echo "#define LOCALSTATEDIR \"$(localstatedir)\"" >>$@ && \
|
|
||||||
echo "#define NMCONFDIR \"$(nmconfdir)\"" >>$@ && \
|
|
||||||
echo "#define NMLIBDIR \"$(nmlibdir)\"" >>$@ && \
|
|
||||||
echo "#define NMLOCALEDIR \"$(nmlocaledir)\"" >>$@ && \
|
|
||||||
echo "#define NMPLUGINDIR \"$(plugindir)\"" >>$@ && \
|
|
||||||
echo "#define NMRUNDIR \"$(nmrundir)\"" >>$@ && \
|
|
||||||
echo "#define NMSTATEDIR \"$(nmstatedir)\"" >>$@ && \
|
|
||||||
echo "#define NMVPNDIR \"$(pkglibdir)\"" >>$@ && \
|
|
||||||
echo "#define NM_BUILD_BUILDDIR \"$(abs_builddir)\"" >>$@ && \
|
|
||||||
echo "#define NM_BUILD_SRCDIR \"$(abs_srcdir)\"" >>$@ && \
|
|
||||||
echo "#define PPPD_PLUGIN_DIR \"$(PPPD_PLUGIN_DIR)\"" >>$@ && \
|
|
||||||
echo "#define PREFIX \"$(prefix)\"" >>$@ && \
|
|
||||||
echo "#define RUNSTATEDIR \"$(runstatedir)\"" >>$@ && \
|
|
||||||
echo "#define SYSCONFDIR \"$(sysconfdir)\"" >>$@ && \
|
|
||||||
true
|
|
1503
configure.ac
1503
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -1,140 +0,0 @@
|
|||||||
AUTOMAKE_OPTIONS = 1.7
|
|
||||||
|
|
||||||
XSLTPROC = xsltproc --xinclude --nonet
|
|
||||||
XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml)
|
|
||||||
GENERATED_FILES =
|
|
||||||
|
|
||||||
if BUILD_DOCS
|
|
||||||
GENERATED_FILES += settings-spec.xml
|
|
||||||
endif
|
|
||||||
|
|
||||||
# The name of the module.
|
|
||||||
DOC_MODULE=NetworkManager
|
|
||||||
|
|
||||||
# The top-level SGML file.
|
|
||||||
DOC_MAIN_SGML_FILE=network-manager-docs.xml
|
|
||||||
|
|
||||||
DOC_SOURCE_DIR=$(srcdir)
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-mkdb
|
|
||||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-mktmpl
|
|
||||||
MKTMPL_OPTIONS=
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-mkhtml
|
|
||||||
MKHTML_OPTIONS=--path="$(abs_srcdir)"
|
|
||||||
|
|
||||||
# Files to be included in $(DOC_MAIN_SGML_FILE)
|
|
||||||
content_files = \
|
|
||||||
$(GENERATED_FILES) \
|
|
||||||
dbus-org.freedesktop.NetworkManager.AccessPoint.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.AgentManager.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Connection.Active.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.DHCP4Config.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.DHCP6Config.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Adsl.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Bluetooth.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Bond.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Bridge.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Dummy.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Generic.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Hsr.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.IPTunnel.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Infiniband.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Loopback.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Macsec.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Macvlan.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Modem.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.OlpcMesh.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Statistics.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Team.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Tun.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Veth.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Vlan.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Vxlan.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.WireGuard.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Wired.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.Wireless.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Device.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.DnsManager.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.IP4Config.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.IP6Config.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.PPP.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.SecretAgent.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Settings.Connection.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.Settings.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.VPN.Connection.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.VPN.Plugin.xml \
|
|
||||||
dbus-org.freedesktop.NetworkManager.xml \
|
|
||||||
$(top_builddir)/src/libnm-core-public/nm-dbus-types.xml \
|
|
||||||
$(top_builddir)/src/libnm-core-public/nm-vpn-dbus-types.xml \
|
|
||||||
$(top_builddir)/man/nmcli.xml \
|
|
||||||
$(top_builddir)/man/nmtui.xml \
|
|
||||||
$(top_builddir)/man/nm-online.xml \
|
|
||||||
$(top_builddir)/man/nm-initrd-generator.xml \
|
|
||||||
$(top_builddir)/man/NetworkManager.xml \
|
|
||||||
$(top_builddir)/man/NetworkManager-dispatcher.xml \
|
|
||||||
$(top_builddir)/man/NetworkManager.conf.xml \
|
|
||||||
$(top_builddir)/man/NetworkManager-wait-online.service.xml \
|
|
||||||
$(top_builddir)/man/nmcli-examples.xml \
|
|
||||||
$(top_builddir)/man/nm-settings-dbus.xml \
|
|
||||||
$(top_builddir)/man/nm-settings-keyfile.xml \
|
|
||||||
$(top_builddir)/man/nm-settings-nmcli.xml \
|
|
||||||
version.xml \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
|
|
||||||
if WITH_OPENVSWITCH
|
|
||||||
content_files += $(top_builddir)/man/nm-openvswitch.xml
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_NM_CLOUD_SETUP
|
|
||||||
content_files += $(top_builddir)/man/nm-cloud-setup.xml
|
|
||||||
endif
|
|
||||||
|
|
||||||
if CONFIG_PLUGIN_IFCFG_RH
|
|
||||||
content_files += $(top_builddir)/man/nm-settings-ifcfg-rh.xml
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(top_srcdir)/gtk-doc.make
|
|
||||||
|
|
||||||
# workaround setup-build.stamp from gtk-doc.make, which copies
|
|
||||||
# the file as read-only. That breaks later build steps, as the
|
|
||||||
# file can no longer be written. Instead, copy the file with `cp -f`
|
|
||||||
# only.
|
|
||||||
setup-build.stamp:
|
|
||||||
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
|
|
||||||
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
|
|
||||||
if test "x$$files" != "x" ; then \
|
|
||||||
for file in $$files ; do \
|
|
||||||
destdir=`dirname $(abs_builddir)/$$file`; \
|
|
||||||
test -d "$$destdir" || mkdir -p "$$destdir"; \
|
|
||||||
test -f $(abs_srcdir)/$$file && \
|
|
||||||
( cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file ; \
|
|
||||||
chmod u+w $(abs_builddir)/$$file ) || true; \
|
|
||||||
done; \
|
|
||||||
fi; \
|
|
||||||
fi
|
|
||||||
$(AM_V_at)touch setup-build.stamp
|
|
||||||
|
|
||||||
settings-spec.xml: settings-spec.xsl $(top_builddir)/man/nm-settings-docs-dbus.xml
|
|
||||||
$(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
|
||||||
version.xml.in \
|
|
||||||
settings-spec.xsl \
|
|
||||||
meson.build \
|
|
||||||
$(GENERATED_FILES) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
CLEANFILES += \
|
|
||||||
html/* \
|
|
||||||
tmpl/* \
|
|
||||||
xml/* \
|
|
||||||
NetworkManager-overrides.txt \
|
|
||||||
NetworkManager-sections.txt \
|
|
||||||
NetworkManager.actions \
|
|
||||||
settings-spec.xml \
|
|
||||||
$(NULL)
|
|
@@ -1,117 +0,0 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
|
||||||
AUTOMAKE_OPTIONS = 1.6
|
|
||||||
|
|
||||||
check_local =
|
|
||||||
|
|
||||||
# The name of the module
|
|
||||||
DOC_MODULE=libnm
|
|
||||||
|
|
||||||
# The top-level SGML file.
|
|
||||||
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
|
|
||||||
|
|
||||||
# The directory containing the source code. Relative to $(srcdir).
|
|
||||||
# gtk-doc will search all .c & .h files beneath here for inline comments
|
|
||||||
# documenting functions and macros.
|
|
||||||
DOC_SOURCE_DIR= \
|
|
||||||
$(top_builddir)/src/libnm-core-public \
|
|
||||||
$(top_srcdir)/src/libnm-core-public \
|
|
||||||
$(top_builddir)/src/libnm-core-impl \
|
|
||||||
$(top_srcdir)/src/libnm-core-impl \
|
|
||||||
$(top_srcdir)/src/libnm-client-public \
|
|
||||||
$(top_builddir)/src/libnm-client-public \
|
|
||||||
$(top_srcdir)/src/libnm-client-impl \
|
|
||||||
$(top_builddir)/src/libnm-client-impl \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-scan.
|
|
||||||
SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators='NM_AVAILABLE_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+_FOR\(\)'
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-mkdb.
|
|
||||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
|
||||||
|
|
||||||
# Extra options to supply to gtkdoc-fixref.
|
|
||||||
FIXXREF_OPTIONS=
|
|
||||||
|
|
||||||
# Used for dependencies.
|
|
||||||
HFILE_GLOB=$(top_srcdir)/src/libnm-core-public/*.h $(top_srcdir)/src/libnm-client-public/*.h
|
|
||||||
CFILE_GLOB=$(top_srcdir)/src/libnm-core-impl/*.c $(top_srcdir)/src/libnm-client-impl/*.c
|
|
||||||
|
|
||||||
# Header files to ignore when scanning.
|
|
||||||
IGNORE_HFILES= \
|
|
||||||
nm-dbus-helpers.h \
|
|
||||||
nm-default-libnm.h \
|
|
||||||
nm-device-private.h \
|
|
||||||
nm-dhcp4-config.h \
|
|
||||||
nm-dhcp6-config.h \
|
|
||||||
nm-dns-manager.h \
|
|
||||||
nm-ip4-config.h \
|
|
||||||
nm-ip6-config.h \
|
|
||||||
nm-libnm-utils.h \
|
|
||||||
nm-object-private.h \
|
|
||||||
nm-remote-connection-private.h \
|
|
||||||
\
|
|
||||||
nm-connection-private.h \
|
|
||||||
nm-default-libnm-core.h \
|
|
||||||
nm-setting-private.h \
|
|
||||||
nm-team-utils.h \
|
|
||||||
nm-utils-private.h \
|
|
||||||
\
|
|
||||||
nm-core-tests-enum-types.h \
|
|
||||||
test-general-enums.h \
|
|
||||||
\
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
# Images to copy into HTML directory.
|
|
||||||
HTML_IMAGES = libnm.png
|
|
||||||
|
|
||||||
# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
|
|
||||||
content_files = version.xml
|
|
||||||
|
|
||||||
# Other files to distribute.
|
|
||||||
extra_files = libnm.png
|
|
||||||
|
|
||||||
|
|
||||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
|
||||||
# if $(DOC_MODULE).types is non-empty.
|
|
||||||
GTKDOC_CFLAGS = \
|
|
||||||
-I$(top_builddir)/src/libnm-core-public \
|
|
||||||
-I$(top_srcdir)/src/libnm-core-public \
|
|
||||||
-I$(top_srcdir)/src/libnm-client-public \
|
|
||||||
-I$(top_builddir)/src/libnm-client-public \
|
|
||||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
|
||||||
$(GLIB_CFLAGS) \
|
|
||||||
$(SANITIZER_EXEC_CFLAGS)
|
|
||||||
|
|
||||||
GTKDOC_LIBS = \
|
|
||||||
$(top_builddir)/src/libnm-client-impl/libnm.la \
|
|
||||||
$(GLIB_LIBS) \
|
|
||||||
$(SANITIZER_EXEC_LDFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
# include common portion ...
|
|
||||||
include $(top_srcdir)/gtk-doc.make
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
|
||||||
version.xml.in \
|
|
||||||
meson.build \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
CLEANFILES += \
|
|
||||||
html/* \
|
|
||||||
tmpl/* \
|
|
||||||
xml/* \
|
|
||||||
libnm-overrides.txt \
|
|
||||||
libnm-sections.txt \
|
|
||||||
libnm.actions \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
if GTK_DOC_BUILD_HTML
|
|
||||||
check-local-gtk-doc-patch:
|
|
||||||
@if grep -q -F '<a href="libnm-nm-setting-user.html">nm-setting-user</a>' "$(top_builddir)/docs/libnm/html/index.html"; then \
|
|
||||||
echo "WARNING: The generated documentation has issues. Patch your gtk-doc (see https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2). Let this check fail with NMTST_CHECK_GTK_DOC=1"; \
|
|
||||||
test "$$NMTST_CHECK_GTK_DOC" != 1; \
|
|
||||||
fi
|
|
||||||
check_local += check-local-gtk-doc-patch
|
|
||||||
endif
|
|
||||||
|
|
||||||
check-local: $(check_local)
|
|
290
m4/attributes.m4
290
m4/attributes.m4
@@ -1,290 +0,0 @@
|
|||||||
dnl Macros to check the presence of generic (non-typed) symbols.
|
|
||||||
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
|
|
||||||
dnl Copyright (c) 2006-2008 xine project
|
|
||||||
dnl Copyright (c) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
|
|
||||||
dnl
|
|
||||||
dnl This program is free software; you can redistribute it and/or modify
|
|
||||||
dnl it under the terms of the GNU General Public License as published by
|
|
||||||
dnl the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
dnl any later version.
|
|
||||||
dnl
|
|
||||||
dnl This program is distributed in the hope that it will be useful,
|
|
||||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
dnl GNU General Public License for more details.
|
|
||||||
dnl
|
|
||||||
dnl You should have received a copy of the GNU General Public License
|
|
||||||
dnl along with this program.
|
|
||||||
dnl
|
|
||||||
dnl As a special exception, the copyright owners of the
|
|
||||||
dnl macro gives unlimited permission to copy, distribute and modify the
|
|
||||||
dnl configure scripts that are the output of Autoconf when processing the
|
|
||||||
dnl Macro. You need not follow the terms of the GNU General Public
|
|
||||||
dnl License when using or distributing such scripts, even though portions
|
|
||||||
dnl of the text of the Macro appear in them. The GNU General Public
|
|
||||||
dnl License (GPL) does govern all other use of the material that
|
|
||||||
dnl constitutes the Autoconf Macro.
|
|
||||||
dnl
|
|
||||||
dnl This special exception to the GPL applies to versions of the
|
|
||||||
dnl Autoconf Macro released by this project. When you make and
|
|
||||||
dnl distribute a modified version of the Autoconf Macro, you may extend
|
|
||||||
dnl this special exception to the GPL to apply to your modified version as
|
|
||||||
dnl well.
|
|
||||||
|
|
||||||
dnl Check if FLAG in ENV-VAR is supported by compiler and append it
|
|
||||||
dnl to WHERE-TO-APPEND variable. Note that we invert -Wno-* checks to
|
|
||||||
dnl -W* as gcc cannot test for negated warnings. If a C snippet is passed,
|
|
||||||
dnl use it, otherwise use a simple main() definition that just returns 0.
|
|
||||||
dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG], [C-SNIPPET])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_CHECK_FLAG_APPEND], [
|
|
||||||
AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
|
|
||||||
AS_TR_SH([cc_cv_$2_$3]),
|
|
||||||
[eval "AS_TR_SH([cc_save_$2])='${$2}'"
|
|
||||||
eval "AS_TR_SH([$2])='${cc_save_$2} -Werror `echo "$3" | sed 's/^-Wno-/-W/'`'"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE(ifelse([$4], [],
|
|
||||||
[int main(void) { return 0; } ],
|
|
||||||
[$4]))],
|
|
||||||
[eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
|
|
||||||
[eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
|
|
||||||
eval "AS_TR_SH([$2])='$cc_save_$2'"])
|
|
||||||
|
|
||||||
AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes],
|
|
||||||
[eval "$1='${$1} $3'"])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2], [C-SNIPPET])
|
|
||||||
AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
|
|
||||||
for flag in [$3]; do
|
|
||||||
CC_CHECK_FLAG_APPEND([$1], [$2], $flag, [$4])
|
|
||||||
done
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check if the flag is supported by linker (cacheable)
|
|
||||||
dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_CHECK_LDFLAGS], [
|
|
||||||
AC_CACHE_CHECK([if $CC supports $1 flag],
|
|
||||||
AS_TR_SH([cc_cv_ldflags_$1]),
|
|
||||||
[ac_save_LDFLAGS="$LDFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $1"
|
|
||||||
AC_LINK_IFELSE([int main() { return 1; }],
|
|
||||||
[eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
|
|
||||||
[eval "AS_TR_SH([cc_cv_ldflags_$1])="])
|
|
||||||
LDFLAGS="$ac_save_LDFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
|
|
||||||
[$2], [$3])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
|
|
||||||
dnl the current linker to avoid undefined references in a shared object.
|
|
||||||
AC_DEFUN([CC_NOUNDEFINED], [
|
|
||||||
dnl We check $host for which systems to enable this for.
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
||||||
|
|
||||||
case $host in
|
|
||||||
dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
|
|
||||||
dnl are requested, as different implementations are present; to avoid problems
|
|
||||||
dnl use -Wl,-z,defs only for those platform not behaving this way.
|
|
||||||
*-freebsd* | *-openbsd*) ;;
|
|
||||||
*)
|
|
||||||
dnl First of all check for the --no-undefined variant of GNU ld. This allows
|
|
||||||
dnl for a much more readable command line, so that people can understand what
|
|
||||||
dnl it does without going to look for what the heck -z defs does.
|
|
||||||
for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
|
|
||||||
CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
|
|
||||||
break
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_SUBST([LDFLAGS_NOUNDEFINED])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check for a -Werror flag or equivalent. -Werror is the GCC
|
|
||||||
dnl and ICC flag that tells the compiler to treat all the warnings
|
|
||||||
dnl as fatal. We usually need this option to make sure that some
|
|
||||||
dnl constructs (like attributes) are not simply ignored.
|
|
||||||
dnl
|
|
||||||
dnl Other compilers don't support -Werror per se, but they support
|
|
||||||
dnl an equivalent flag:
|
|
||||||
dnl - Sun Studio compiler supports -errwarn=%all
|
|
||||||
AC_DEFUN([CC_CHECK_WERROR], [
|
|
||||||
AC_CACHE_CHECK(
|
|
||||||
[for $CC way to treat warnings as errors],
|
|
||||||
[cc_cv_werror],
|
|
||||||
[CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
|
|
||||||
[CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_CHECK_ATTRIBUTE], [
|
|
||||||
AC_REQUIRE([CC_CHECK_WERROR])
|
|
||||||
AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
|
|
||||||
AS_TR_SH([cc_cv_attribute_$1]),
|
|
||||||
[ac_save_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $cc_cv_werror"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
|
|
||||||
[eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
|
|
||||||
[eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
|
|
||||||
[AC_DEFINE(
|
|
||||||
AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
|
|
||||||
[Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
|
|
||||||
)
|
|
||||||
$4],
|
|
||||||
[$5])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[constructor],,
|
|
||||||
[void __attribute__((constructor)) ctor() { int a; }],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[format], [format(printf, n, n)],
|
|
||||||
[void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[format_arg], [format_arg(printf)],
|
|
||||||
[char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[visibility_$1], [visibility("$1")],
|
|
||||||
[void __attribute__((visibility("$1"))) $1_function() { }],
|
|
||||||
[$2], [$3])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[nonnull], [nonnull()],
|
|
||||||
[void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[unused], ,
|
|
||||||
[void some_function(void *foo, __attribute__((unused)) void *bar);],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[sentinel], ,
|
|
||||||
[void some_function(void *foo, ...) __attribute__((sentinel));],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[deprecated], ,
|
|
||||||
[void some_function(void *foo, ...) __attribute__((deprecated));],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[alias], [weak, alias],
|
|
||||||
[void other_function(void *foo) { }
|
|
||||||
void some_function(void *foo) __attribute__((weak, alias("other_function")));],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[malloc], ,
|
|
||||||
[void * __attribute__((malloc)) my_alloc(int n);],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_PACKED], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[packed], ,
|
|
||||||
[struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_CONST], [
|
|
||||||
CC_CHECK_ATTRIBUTE(
|
|
||||||
[const], ,
|
|
||||||
[int __attribute__((const)) twopow(int n) { return 1 << n; } ],
|
|
||||||
[$1], [$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_FLAG_VISIBILITY], [
|
|
||||||
AC_REQUIRE([CC_CHECK_WERROR])
|
|
||||||
AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
|
|
||||||
[cc_cv_flag_visibility],
|
|
||||||
[cc_flag_visibility_save_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $cc_cv_werror"
|
|
||||||
CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
|
|
||||||
cc_cv_flag_visibility='yes',
|
|
||||||
cc_cv_flag_visibility='no')
|
|
||||||
CFLAGS="$cc_flag_visibility_save_CFLAGS"])
|
|
||||||
|
|
||||||
AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
|
|
||||||
[AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
|
|
||||||
[Define this if the compiler supports the -fvisibility flag])
|
|
||||||
$1],
|
|
||||||
[$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_FUNC_EXPECT], [
|
|
||||||
AC_REQUIRE([CC_CHECK_WERROR])
|
|
||||||
AC_CACHE_CHECK([if compiler has __builtin_expect function],
|
|
||||||
[cc_cv_func_expect],
|
|
||||||
[ac_save_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $cc_cv_werror"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
|
||||||
[int some_function() {
|
|
||||||
int a = 3;
|
|
||||||
return (int)__builtin_expect(a, 3);
|
|
||||||
}])],
|
|
||||||
[cc_cv_func_expect=yes],
|
|
||||||
[cc_cv_func_expect=no])
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test "x$cc_cv_func_expect" = "xyes"],
|
|
||||||
[AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
|
|
||||||
[Define this if the compiler supports __builtin_expect() function])
|
|
||||||
$1],
|
|
||||||
[$2])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
|
|
||||||
AC_REQUIRE([CC_CHECK_WERROR])
|
|
||||||
AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
|
|
||||||
[cc_cv_attribute_aligned],
|
|
||||||
[ac_save_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $cc_cv_werror"
|
|
||||||
for cc_attribute_align_try in 64 32 16 8 4 2; do
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
|
||||||
int main() {
|
|
||||||
static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
|
|
||||||
return c;
|
|
||||||
}])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
|
|
||||||
done
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "x$cc_cv_attribute_aligned" != "x"; then
|
|
||||||
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
|
|
||||||
[Define the highest alignment supported])
|
|
||||||
fi
|
|
||||||
])
|
|
@@ -1,158 +0,0 @@
|
|||||||
# ===========================================================================
|
|
||||||
# https://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_LIB_READLINE
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Searches for a readline compatible library. If found, defines
|
|
||||||
# `HAVE_LIBREADLINE'. If the found library has the `add_history' function,
|
|
||||||
# sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the
|
|
||||||
# necessary include files and sets `HAVE_READLINE_H' or
|
|
||||||
# `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
|
|
||||||
# 'HAVE_HISTORY_H' if the corresponding include files exists.
|
|
||||||
#
|
|
||||||
# The libraries that may be readline compatible are `libedit',
|
|
||||||
# `libeditline' and `libreadline'. Sometimes we need to link a termcap
|
|
||||||
# library for readline to work, this macro tests these cases too by trying
|
|
||||||
# to link with `libtermcap', `libcurses' or `libncurses' before giving up.
|
|
||||||
#
|
|
||||||
# Here is an example of how to use the information provided by this macro
|
|
||||||
# to perform the necessary includes or declarations in a C file:
|
|
||||||
#
|
|
||||||
# #ifdef HAVE_LIBREADLINE
|
|
||||||
# # if defined(HAVE_READLINE_READLINE_H)
|
|
||||||
# # include <readline/readline.h>
|
|
||||||
# # elif defined(HAVE_READLINE_H)
|
|
||||||
# # include <readline.h>
|
|
||||||
# # else /* !defined(HAVE_READLINE_H) */
|
|
||||||
# extern char *readline ();
|
|
||||||
# # endif /* !defined(HAVE_READLINE_H) */
|
|
||||||
# char *cmdline = NULL;
|
|
||||||
# #else /* !defined(HAVE_READLINE_READLINE_H) */
|
|
||||||
# /* no readline */
|
|
||||||
# #endif /* HAVE_LIBREADLINE */
|
|
||||||
#
|
|
||||||
# #ifdef HAVE_READLINE_HISTORY
|
|
||||||
# # if defined(HAVE_READLINE_HISTORY_H)
|
|
||||||
# # include <readline/history.h>
|
|
||||||
# # elif defined(HAVE_HISTORY_H)
|
|
||||||
# # include <history.h>
|
|
||||||
# # else /* !defined(HAVE_HISTORY_H) */
|
|
||||||
# extern void add_history ();
|
|
||||||
# extern int write_history ();
|
|
||||||
# extern int read_history ();
|
|
||||||
# # endif /* defined(HAVE_READLINE_HISTORY_H) */
|
|
||||||
# /* no history */
|
|
||||||
# #endif /* HAVE_READLINE_HISTORY */
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Ville Laurikari <vl@iki.fi>
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice
|
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
|
||||||
# warranty.
|
|
||||||
|
|
||||||
#serial 8
|
|
||||||
|
|
||||||
AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
|
|
||||||
AC_DEFUN([AX_LIB_READLINE], [
|
|
||||||
|
|
||||||
AC_ARG_WITH(readline,
|
|
||||||
AS_HELP_STRING([--with-readline=auto|libreadline|libedit|none], [Using libreadline (auto) or libedit]),
|
|
||||||
[],
|
|
||||||
[with_readline=auto])
|
|
||||||
|
|
||||||
if test "$with_readline" != "none"; then
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for a readline compatible library],
|
|
||||||
ax_cv_lib_readline, [
|
|
||||||
ORIG_LIBS="$LIBS"
|
|
||||||
|
|
||||||
if test "$with_readline" = "libreadline"; then
|
|
||||||
search_readlines="readline"
|
|
||||||
elif test "$with_readline" = "libedit"; then
|
|
||||||
search_readlines="edit"
|
|
||||||
elif test "$with_readline" = "auto"; then
|
|
||||||
search_readlines="readline edit"
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([invalid --with-readline option. Valid options are --with-readline=auto|libreadline|libedit|none])
|
|
||||||
fi
|
|
||||||
|
|
||||||
for readline_lib in $search_readlines; do
|
|
||||||
# prefer ncurses since we use it for nmtui too
|
|
||||||
for termcap_lib in "" termcap curses ncurses; do
|
|
||||||
if test -z "$termcap_lib"; then
|
|
||||||
TRY_LIB="-l$readline_lib"
|
|
||||||
else
|
|
||||||
TRY_LIB="-l$readline_lib -l$termcap_lib"
|
|
||||||
fi
|
|
||||||
LIBS="$ORIG_LIBS $TRY_LIB"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [readline])], [ax_cv_lib_readline="$TRY_LIB"])
|
|
||||||
if test -n "$ax_cv_lib_readline"; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -n "$ax_cv_lib_readline"; then
|
|
||||||
if test "$with_readline" = auto; then
|
|
||||||
if test "$readline_lib" = readline; then
|
|
||||||
with_readline=libreadline
|
|
||||||
else
|
|
||||||
with_readline=libedit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$ax_cv_lib_readline"; then
|
|
||||||
if test "$with_readline" != auto; then
|
|
||||||
AC_MSG_ERROR([libreadline not found for --with-readline=$with_readline"])
|
|
||||||
fi
|
|
||||||
with_readline=none
|
|
||||||
ax_cv_lib_readline="no"
|
|
||||||
fi
|
|
||||||
LIBS="$ORIG_LIBS"
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$ax_cv_lib_readline" != "no"; then
|
|
||||||
READLINE_LIBS="$ax_cv_lib_readline"
|
|
||||||
AC_SUBST(READLINE_LIBS)
|
|
||||||
AC_DEFINE(HAVE_LIBREADLINE, 1,
|
|
||||||
[Define if you have a readline compatible library])
|
|
||||||
|
|
||||||
if test "$with_readline" = "libedit"; then
|
|
||||||
AC_DEFINE(HAVE_EDITLINE_READLINE, 1,
|
|
||||||
[Explicitly set to 1 when libedit shall be used])
|
|
||||||
else
|
|
||||||
AC_DEFINE(HAVE_EDITLINE_READLINE, 0,
|
|
||||||
[By default the libreadline is used as readline library])
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
ORIG_LIBS="$LIBS"
|
|
||||||
LIBS="$ORIG_LIBS $ax_cv_lib_readline"
|
|
||||||
AC_CACHE_CHECK([whether readline supports history],
|
|
||||||
ax_cv_lib_readline_history, [
|
|
||||||
ax_cv_lib_readline_history="no"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [history_set_history_state])],
|
|
||||||
[ax_cv_lib_readline_history="yes"])
|
|
||||||
])
|
|
||||||
LIBS=$ORIG_LIBS
|
|
||||||
|
|
||||||
if test "$ax_cv_lib_readline_history" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_READLINE_HISTORY, 1,
|
|
||||||
[Define if your readline library has \`history_set_history_state'])
|
|
||||||
AC_CHECK_HEADERS(readline/history.h histedit.h)
|
|
||||||
else
|
|
||||||
AC_DEFINE(HAVE_READLINE_HISTORY, 0,
|
|
||||||
[Explicitly set to 0 when libreadline shall not be used])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
])dnl
|
|
522
m4/ax_pthread.m4
522
m4/ax_pthread.m4
@@ -1,522 +0,0 @@
|
|||||||
# ===========================================================================
|
|
||||||
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# This macro figures out how to build C programs using POSIX threads. It
|
|
||||||
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
|
||||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
|
||||||
# flags that are needed. (The user can also force certain compiler
|
|
||||||
# flags/libs to be tested by setting these environment variables.)
|
|
||||||
#
|
|
||||||
# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
|
|
||||||
# needed for multi-threaded programs (defaults to the value of CC
|
|
||||||
# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
|
|
||||||
# special cc_r/CC_r compiler alias.)
|
|
||||||
#
|
|
||||||
# NOTE: You are assumed to not only compile your program with these flags,
|
|
||||||
# but also to link with them as well. For example, you might link with
|
|
||||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
|
||||||
# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
|
||||||
#
|
|
||||||
# If you are only building threaded programs, you may wish to use these
|
|
||||||
# variables in your default LIBS, CFLAGS, and CC:
|
|
||||||
#
|
|
||||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
|
||||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
|
||||||
# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
|
|
||||||
# CC="$PTHREAD_CC"
|
|
||||||
# CXX="$PTHREAD_CXX"
|
|
||||||
#
|
|
||||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
|
||||||
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
|
|
||||||
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
|
||||||
#
|
|
||||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
|
||||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
|
||||||
# PTHREAD_CFLAGS.
|
|
||||||
#
|
|
||||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
|
||||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
|
||||||
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
|
||||||
# will define HAVE_PTHREAD.
|
|
||||||
#
|
|
||||||
# Please let the authors know if this macro fails on any platform, or if
|
|
||||||
# you have any other suggestions or comments. This macro was based on work
|
|
||||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
|
||||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
|
||||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
|
||||||
# grateful for the helpful feedback of numerous users.
|
|
||||||
#
|
|
||||||
# Updated for Autoconf 2.68 by Daniel Richard G.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
|
||||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
|
||||||
# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 30
|
|
||||||
|
|
||||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
|
||||||
AC_DEFUN([AX_PTHREAD], [
|
|
||||||
AC_REQUIRE([AC_CANONICAL_TARGET])
|
|
||||||
AC_REQUIRE([AC_PROG_CC])
|
|
||||||
AC_REQUIRE([AC_PROG_SED])
|
|
||||||
AC_LANG_PUSH([C])
|
|
||||||
ax_pthread_ok=no
|
|
||||||
|
|
||||||
# We used to check for pthread.h first, but this fails if pthread.h
|
|
||||||
# requires special compiler flags (e.g. on Tru64 or Sequent).
|
|
||||||
# It gets checked for in the link test anyway.
|
|
||||||
|
|
||||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
|
||||||
# etcetera environment variables, and if threads linking works using
|
|
||||||
# them:
|
|
||||||
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
|
|
||||||
ax_pthread_save_CC="$CC"
|
|
||||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
|
||||||
ax_pthread_save_LIBS="$LIBS"
|
|
||||||
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
|
|
||||||
AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
|
|
||||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
|
||||||
LIBS="$PTHREAD_LIBS $LIBS"
|
|
||||||
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
|
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
|
|
||||||
AC_MSG_RESULT([$ax_pthread_ok])
|
|
||||||
if test "x$ax_pthread_ok" = "xno"; then
|
|
||||||
PTHREAD_LIBS=""
|
|
||||||
PTHREAD_CFLAGS=""
|
|
||||||
fi
|
|
||||||
CC="$ax_pthread_save_CC"
|
|
||||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
|
||||||
LIBS="$ax_pthread_save_LIBS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We must check for the threads library under a number of different
|
|
||||||
# names; the ordering is very important because some systems
|
|
||||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
|
||||||
# libraries is broken (non-POSIX).
|
|
||||||
|
|
||||||
# Create a list of thread flags to try. Items with a "," contain both
|
|
||||||
# C compiler flags (before ",") and linker flags (after ","). Other items
|
|
||||||
# starting with a "-" are C compiler flags, and remaining items are
|
|
||||||
# library names, except for "none" which indicates that we try without
|
|
||||||
# any flags at all, and "pthread-config" which is a program returning
|
|
||||||
# the flags for the Pth emulation library.
|
|
||||||
|
|
||||||
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
|
||||||
|
|
||||||
# The ordering *is* (sometimes) important. Some notes on the
|
|
||||||
# individual items follow:
|
|
||||||
|
|
||||||
# pthreads: AIX (must check this before -lpthread)
|
|
||||||
# none: in case threads are in libc; should be tried before -Kthread and
|
|
||||||
# other compiler flags to prevent continual compiler warnings
|
|
||||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
|
||||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
|
|
||||||
# (Note: HP C rejects this with "bad form for `-t' option")
|
|
||||||
# -pthreads: Solaris/gcc (Note: HP C also rejects)
|
|
||||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
|
||||||
# doesn't hurt to check since this sometimes defines pthreads and
|
|
||||||
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
|
|
||||||
# is present but should not be used directly; and before -mthreads,
|
|
||||||
# because the compiler interprets this as "-mt" + "-hreads")
|
|
||||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
|
||||||
# pthread: Linux, etcetera
|
|
||||||
# --thread-safe: KAI C++
|
|
||||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
|
||||||
|
|
||||||
case $target_os in
|
|
||||||
|
|
||||||
freebsd*)
|
|
||||||
|
|
||||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
|
||||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
|
||||||
|
|
||||||
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hpux*)
|
|
||||||
|
|
||||||
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
|
|
||||||
# multi-threading and also sets -lpthread."
|
|
||||||
|
|
||||||
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
|
|
||||||
;;
|
|
||||||
|
|
||||||
openedition*)
|
|
||||||
|
|
||||||
# IBM z/OS requires a feature-test macro to be defined in order to
|
|
||||||
# enable POSIX threads at all, so give the user a hint if this is
|
|
||||||
# not set. (We don't define these ourselves, as they can affect
|
|
||||||
# other portions of the system API in unpredictable ways.)
|
|
||||||
|
|
||||||
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
|
|
||||||
[
|
|
||||||
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
|
|
||||||
AX_PTHREAD_ZOS_MISSING
|
|
||||||
# endif
|
|
||||||
],
|
|
||||||
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
|
|
||||||
;;
|
|
||||||
|
|
||||||
solaris*)
|
|
||||||
|
|
||||||
# On Solaris (at least, for some versions), libc contains stubbed
|
|
||||||
# (non-functional) versions of the pthreads routines, so link-based
|
|
||||||
# tests will erroneously succeed. (N.B.: The stubs are missing
|
|
||||||
# pthread_cleanup_push, or rather a function called by this macro,
|
|
||||||
# so we could check for that, but who knows whether they'll stub
|
|
||||||
# that too in a future libc.) So we'll check first for the
|
|
||||||
# standard Solaris way of linking pthreads (-mt -lpthread).
|
|
||||||
|
|
||||||
ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Are we compiling with Clang?
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether $CC is Clang],
|
|
||||||
[ax_cv_PTHREAD_CLANG],
|
|
||||||
[ax_cv_PTHREAD_CLANG=no
|
|
||||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
|
||||||
if test "x$GCC" = "xyes"; then
|
|
||||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
|
||||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
|
||||||
# if defined(__clang__) && defined(__llvm__)
|
|
||||||
AX_PTHREAD_CC_IS_CLANG
|
|
||||||
# endif
|
|
||||||
],
|
|
||||||
[ax_cv_PTHREAD_CLANG=yes])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
|
||||||
|
|
||||||
|
|
||||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
|
||||||
|
|
||||||
# Note that for GCC and Clang -pthread generally implies -lpthread,
|
|
||||||
# except when -nostdlib is passed.
|
|
||||||
# This is problematic using libtool to build C++ shared libraries with pthread:
|
|
||||||
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
|
|
||||||
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
|
|
||||||
# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
|
|
||||||
# To solve this, first try -pthread together with -lpthread for GCC
|
|
||||||
|
|
||||||
AS_IF([test "x$GCC" = "xyes"],
|
|
||||||
[ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
|
|
||||||
|
|
||||||
# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
|
|
||||||
|
|
||||||
AS_IF([test "x$ax_pthread_clang" = "xyes"],
|
|
||||||
[ax_pthread_flags="-pthread,-lpthread -pthread"])
|
|
||||||
|
|
||||||
|
|
||||||
# The presence of a feature test macro requesting re-entrant function
|
|
||||||
# definitions is, on some systems, a strong hint that pthreads support is
|
|
||||||
# correctly enabled
|
|
||||||
|
|
||||||
case $target_os in
|
|
||||||
darwin* | hpux* | linux* | osf* | solaris*)
|
|
||||||
ax_pthread_check_macro="_REENTRANT"
|
|
||||||
;;
|
|
||||||
|
|
||||||
aix*)
|
|
||||||
ax_pthread_check_macro="_THREAD_SAFE"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
ax_pthread_check_macro="--"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
|
|
||||||
[ax_pthread_check_cond=0],
|
|
||||||
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
|
|
||||||
|
|
||||||
|
|
||||||
if test "x$ax_pthread_ok" = "xno"; then
|
|
||||||
for ax_pthread_try_flag in $ax_pthread_flags; do
|
|
||||||
|
|
||||||
case $ax_pthread_try_flag in
|
|
||||||
none)
|
|
||||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
|
||||||
;;
|
|
||||||
|
|
||||||
*,*)
|
|
||||||
PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
|
|
||||||
PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
|
|
||||||
AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
|
|
||||||
PTHREAD_CFLAGS="$ax_pthread_try_flag"
|
|
||||||
;;
|
|
||||||
|
|
||||||
pthread-config)
|
|
||||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
|
||||||
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
|
|
||||||
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
|
||||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
|
|
||||||
PTHREAD_LIBS="-l$ax_pthread_try_flag"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
|
||||||
ax_pthread_save_LIBS="$LIBS"
|
|
||||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
|
||||||
LIBS="$PTHREAD_LIBS $LIBS"
|
|
||||||
|
|
||||||
# Check for various functions. We must include pthread.h,
|
|
||||||
# since some functions may be macros. (On the Sequent, we
|
|
||||||
# need a special flag -Kthread to make this header compile.)
|
|
||||||
# We check for pthread_join because it is in -lpthread on IRIX
|
|
||||||
# while pthread_create is in libc. We check for pthread_attr_init
|
|
||||||
# due to DEC craziness with -lpthreads. We check for
|
|
||||||
# pthread_cleanup_push because it is one of the few pthread
|
|
||||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
|
||||||
# We try pthread_create on general principles.
|
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
|
||||||
# if $ax_pthread_check_cond
|
|
||||||
# error "$ax_pthread_check_macro must be defined"
|
|
||||||
# endif
|
|
||||||
static void *some_global = NULL;
|
|
||||||
static void routine(void *a)
|
|
||||||
{
|
|
||||||
/* To avoid any unused-parameter or
|
|
||||||
unused-but-set-parameter warning. */
|
|
||||||
some_global = a;
|
|
||||||
}
|
|
||||||
static void *start_routine(void *a) { return a; }],
|
|
||||||
[pthread_t th; pthread_attr_t attr;
|
|
||||||
pthread_create(&th, 0, start_routine, 0);
|
|
||||||
pthread_join(th, 0);
|
|
||||||
pthread_attr_init(&attr);
|
|
||||||
pthread_cleanup_push(routine, 0);
|
|
||||||
pthread_cleanup_pop(0) /* ; */])],
|
|
||||||
[ax_pthread_ok=yes],
|
|
||||||
[])
|
|
||||||
|
|
||||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
|
||||||
LIBS="$ax_pthread_save_LIBS"
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$ax_pthread_ok])
|
|
||||||
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
|
|
||||||
|
|
||||||
PTHREAD_LIBS=""
|
|
||||||
PTHREAD_CFLAGS=""
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Clang needs special handling, because older versions handle the -pthread
|
|
||||||
# option in a rather... idiosyncratic way
|
|
||||||
|
|
||||||
if test "x$ax_pthread_clang" = "xyes"; then
|
|
||||||
|
|
||||||
# Clang takes -pthread; it has never supported any other flag
|
|
||||||
|
|
||||||
# (Note 1: This will need to be revisited if a system that Clang
|
|
||||||
# supports has POSIX threads in a separate library. This tends not
|
|
||||||
# to be the way of modern systems, but it's conceivable.)
|
|
||||||
|
|
||||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
|
||||||
# to get POSIX threads support; the API is always present and
|
|
||||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
|
||||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
|
||||||
# ignore this macro, third-party headers might not.)
|
|
||||||
|
|
||||||
# However, older versions of Clang make a point of warning the user
|
|
||||||
# that, in an invocation where only linking and no compilation is
|
|
||||||
# taking place, the -pthread option has no effect ("argument unused
|
|
||||||
# during compilation"). They expect -pthread to be passed in only
|
|
||||||
# when source code is being compiled.
|
|
||||||
#
|
|
||||||
# Problem is, this is at odds with the way Automake and most other
|
|
||||||
# C build frameworks function, which is that the same flags used in
|
|
||||||
# compilation (CFLAGS) are also used in linking. Many systems
|
|
||||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
|
||||||
# support, and in fact it is often not straightforward to specify a
|
|
||||||
# flag that is used only in the compilation phase and not in
|
|
||||||
# linking. Such a scenario is extremely rare in practice.
|
|
||||||
#
|
|
||||||
# Even though use of the -pthread flag in linking would only print
|
|
||||||
# a warning, this can be a nuisance for well-run software projects
|
|
||||||
# that build with -Werror. So if the active version of Clang has
|
|
||||||
# this misfeature, we search for an option to squash it.
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
|
||||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
|
||||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
|
||||||
# Create an alternate version of $ac_link that compiles and
|
|
||||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
|
||||||
# (.c -> exe), because the warning occurs only in the second
|
|
||||||
# step
|
|
||||||
ax_pthread_save_ac_link="$ac_link"
|
|
||||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
|
||||||
ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
|
|
||||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
|
||||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
|
||||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
|
||||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
|
||||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
|
||||||
ac_link="$ax_pthread_save_ac_link"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
|
||||||
[ac_link="$ax_pthread_2step_ac_link"
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
|
||||||
[break])
|
|
||||||
])
|
|
||||||
done
|
|
||||||
ac_link="$ax_pthread_save_ac_link"
|
|
||||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
|
||||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
|
||||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
|
||||||
])
|
|
||||||
|
|
||||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
|
||||||
no | unknown) ;;
|
|
||||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
fi # $ax_pthread_clang = yes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Various other checks:
|
|
||||||
if test "x$ax_pthread_ok" = "xyes"; then
|
|
||||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
|
||||||
ax_pthread_save_LIBS="$LIBS"
|
|
||||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
|
||||||
LIBS="$PTHREAD_LIBS $LIBS"
|
|
||||||
|
|
||||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
|
||||||
AC_CACHE_CHECK([for joinable pthread attribute],
|
|
||||||
[ax_cv_PTHREAD_JOINABLE_ATTR],
|
|
||||||
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
|
|
||||||
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
|
||||||
[int attr = $ax_pthread_attr; return attr /* ; */])],
|
|
||||||
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
|
|
||||||
[])
|
|
||||||
done
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
|
|
||||||
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
|
|
||||||
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
|
|
||||||
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
|
|
||||||
[$ax_cv_PTHREAD_JOINABLE_ATTR],
|
|
||||||
[Define to necessary symbol if this constant
|
|
||||||
uses a non-standard name on your system.])
|
|
||||||
ax_pthread_joinable_attr_defined=yes
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether more special flags are required for pthreads],
|
|
||||||
[ax_cv_PTHREAD_SPECIAL_FLAGS],
|
|
||||||
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
|
|
||||||
case $target_os in
|
|
||||||
solaris*)
|
|
||||||
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
|
|
||||||
test "x$ax_pthread_special_flags_added" != "xyes"],
|
|
||||||
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
|
|
||||||
ax_pthread_special_flags_added=yes])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
|
||||||
[ax_cv_PTHREAD_PRIO_INHERIT],
|
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
|
||||||
[[int i = PTHREAD_PRIO_INHERIT;
|
|
||||||
return i;]])],
|
|
||||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
|
||||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
|
|
||||||
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
|
|
||||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
|
|
||||||
ax_pthread_prio_inherit_defined=yes
|
|
||||||
])
|
|
||||||
|
|
||||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
|
||||||
LIBS="$ax_pthread_save_LIBS"
|
|
||||||
|
|
||||||
# More AIX lossage: compile with *_r variant
|
|
||||||
if test "x$GCC" != "xyes"; then
|
|
||||||
case $target_os in
|
|
||||||
aix*)
|
|
||||||
AS_CASE(["x/$CC"],
|
|
||||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
|
||||||
[#handle absolute path differently from PATH based program lookup
|
|
||||||
AS_CASE(["x$CC"],
|
|
||||||
[x/*],
|
|
||||||
[
|
|
||||||
AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
|
|
||||||
AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
|
|
||||||
AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
|
|
||||||
]
|
|
||||||
)
|
|
||||||
])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
|
||||||
test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
|
|
||||||
|
|
||||||
AC_SUBST([PTHREAD_LIBS])
|
|
||||||
AC_SUBST([PTHREAD_CFLAGS])
|
|
||||||
AC_SUBST([PTHREAD_CC])
|
|
||||||
AC_SUBST([PTHREAD_CXX])
|
|
||||||
|
|
||||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
|
||||||
if test "x$ax_pthread_ok" = "xyes"; then
|
|
||||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ax_pthread_ok=no
|
|
||||||
$2
|
|
||||||
fi
|
|
||||||
AC_LANG_POP
|
|
||||||
])dnl AX_PTHREAD
|
|
@@ -1,227 +0,0 @@
|
|||||||
AC_DEFUN([_NM_COMPILER_FLAG], [
|
|
||||||
CFLAGS_SAVED="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $GLIB_CFLAGS -Werror $1"
|
|
||||||
AC_MSG_CHECKING([whether $1 works as expected])
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$2]])], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
CFLAGS="$CFLAGS_SAVED"
|
|
||||||
$3
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
CFLAGS="$CFLAGS_SAVED"
|
|
||||||
$4
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(not supported)
|
|
||||||
CFLAGS="$CFLAGS_SAVED"
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check whether a particular compiler flag is supported,
|
|
||||||
dnl append it to the specified variable if the check succeeds.
|
|
||||||
dnl NM_COMPILER_FLAG([ENV-VAR], [FLAG], [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
|
|
||||||
AC_DEFUN([NM_COMPILER_FLAG], [
|
|
||||||
_NM_COMPILER_FLAG([$2], [], [
|
|
||||||
eval "AS_TR_SH([$1])='$$1 $2'"
|
|
||||||
$3
|
|
||||||
], [$4])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check whether a particular warning is supported. If yes, the flag
|
|
||||||
dnl is appended to [ENV-VAR].
|
|
||||||
dnl NM_COMPILER_WARNING_FLAG([ENV-VAR], [WARNING])
|
|
||||||
AC_DEFUN([NM_COMPILER_WARNING_FLAG], [
|
|
||||||
dnl "-Wno-*" requires special handling, see https://gcc.gnu.org/wiki/FAQ#wnowarning.
|
|
||||||
_NM_COMPILER_FLAG([-Wall $(printf '%s' "$2" | sed -e 's/^-W\(no-\|no-error=\)/-W/')], [], [eval "AS_TR_SH([$1])='$$1 $2'"], [])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check whether a particular warning is not emitted with code provided,
|
|
||||||
dnl append an option to disable the warning to a specified variable if the check fails.
|
|
||||||
dnl Note that this always either adds -W$2 or -Wno-$2, depending on whether it's supported.
|
|
||||||
dnl NM_COMPILER_WARNING([ENV-VAR], [WARNING], [C-SNIPPET])
|
|
||||||
AC_DEFUN([NM_COMPILER_WARNING], [
|
|
||||||
_NM_COMPILER_FLAG([-W$2], [$3], [eval "AS_TR_SH([$1])='$$1 -W$2'"], [eval "AS_TR_SH([$1])='$$1 -Wno-$2'"])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl NM_COMPILER_WARNINGS([ENV-VAR], [MORE-WARNINGS])
|
|
||||||
AC_DEFUN([NM_COMPILER_WARNINGS],
|
|
||||||
[AC_ARG_ENABLE(more-warnings,
|
|
||||||
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
|
|
||||||
set_more_warnings="$enableval",set_more_warnings=$2)
|
|
||||||
AC_MSG_CHECKING(for more warnings)
|
|
||||||
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
|
|
||||||
dnl This is enabled in clang by default, makes little sense,
|
|
||||||
dnl and causes the build to abort with -Werror.
|
|
||||||
CFLAGS_SAVED="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS -Qunused-arguments"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], eval "AS_TR_SH([$1])='$$1 -Qunused-arguments'", [])
|
|
||||||
CFLAGS="$CFLAGS_SAVED"
|
|
||||||
|
|
||||||
dnl clang only warns about unknown warnings, unless
|
|
||||||
dnl called with "-Werror=unknown-warning-option"
|
|
||||||
dnl Test if the compiler supports that, and if it does
|
|
||||||
dnl attach it to the CFLAGS.
|
|
||||||
NM_COMPILER_WARNING([$1], [unknown-warning-option], [])
|
|
||||||
|
|
||||||
CFLAGS_MORE_WARNINGS="-Wall"
|
|
||||||
|
|
||||||
if test "x$enable_lto" = xyes; then
|
|
||||||
dnl With LTO and optimizations enabled, gcc 10.2.1-1.fc32 is really
|
|
||||||
dnl adamant to warn about correct uses of strncpy. Disable "-Wstringop-overflow".
|
|
||||||
_CFLAGS_MORE_WARNINGS_DISABLE_LTO="-Wno-stringop-overflow"
|
|
||||||
|
|
||||||
dnl We want to build with "-Wmaybe-uninitialized" enabled. With LTO that
|
|
||||||
dnl can easily lead to false positives. For manual testing, disable the
|
|
||||||
dnl warning here by uncommenting the following line.
|
|
||||||
dnl _CFLAGS_MORE_WARNINGS_DISABLE_LTO="$_CFLAGS_MORE_WARNINGS_DISABLE_LTO -Wno-error=maybe-uninitialized"
|
|
||||||
else
|
|
||||||
_CFLAGS_MORE_WARNINGS_DISABLE_LTO=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$set_more_warnings" = xerror; then
|
|
||||||
CFLAGS_MORE_WARNINGS="$CFLAGS_MORE_WARNINGS -Werror"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for option in \
|
|
||||||
$_CFLAGS_MORE_WARNINGS_DISABLE_LTO \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wcast-align=strict \
|
|
||||||
-Wdeclaration-after-statement \
|
|
||||||
-Wfloat-equal \
|
|
||||||
-Wformat-nonliteral \
|
|
||||||
-Wformat-security \
|
|
||||||
-Wimplicit-function-declaration \
|
|
||||||
-Wimplicit-int \
|
|
||||||
-Winit-self \
|
|
||||||
-Wint-conversion \
|
|
||||||
-Wlogical-op \
|
|
||||||
-Wmissing-declarations \
|
|
||||||
-Wmissing-include-dirs \
|
|
||||||
-Wmissing-prototypes \
|
|
||||||
-Wold-style-definition \
|
|
||||||
-Wparentheses-equality \
|
|
||||||
-Wpointer-arith \
|
|
||||||
-Wshadow \
|
|
||||||
-Wshift-negative-value \
|
|
||||||
-Wstrict-prototypes \
|
|
||||||
-Wtypedef-redefinition \
|
|
||||||
-Wundef \
|
|
||||||
-Wunknown-attributes \
|
|
||||||
-Wvla \
|
|
||||||
-Wno-duplicate-decl-specifier \
|
|
||||||
-Wno-format-truncation \
|
|
||||||
-Wno-format-y2k \
|
|
||||||
-Wno-gnu-variable-sized-type-not-at-end \
|
|
||||||
-Wno-missing-field-initializers \
|
|
||||||
-Wno-pragmas \
|
|
||||||
-Wno-sign-compare \
|
|
||||||
-Wno-tautological-constant-out-of-range-compare \
|
|
||||||
-Wno-unknown-pragmas \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
; do
|
|
||||||
dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning)
|
|
||||||
_NM_COMPILER_FLAG([-Wall $(printf '%s' "$option" | sed -e 's/^-W\(no-\|no-error=\)/-W/')], [],
|
|
||||||
[CFLAGS_MORE_WARNINGS="$CFLAGS_MORE_WARNINGS $option"], [])
|
|
||||||
done
|
|
||||||
unset option
|
|
||||||
|
|
||||||
dnl Disable warnings triggered by known compiler problems
|
|
||||||
|
|
||||||
dnl https://bugzilla.gnome.org/show_bug.cgi?id=745821
|
|
||||||
NM_COMPILER_WARNING([$1], [unknown-attributes], [#include <glib.h>])
|
|
||||||
|
|
||||||
dnl https://bugzilla.gnome.org/show_bug.cgi?id=744473
|
|
||||||
NM_COMPILER_WARNING([$1], [typedef-redefinition], [#include <gio/gio.h>])
|
|
||||||
|
|
||||||
dnl https://llvm.org/bugs/show_bug.cgi?id=21614
|
|
||||||
NM_COMPILER_WARNING([$1], [array-bounds],
|
|
||||||
[#include <string.h>]
|
|
||||||
[void f () { strcmp ("something", "0"); }]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl https://llvm.org/bugs/show_bug.cgi?id=22949
|
|
||||||
NM_COMPILER_WARNING([$1], [parentheses-equality],
|
|
||||||
[#include <sys/wait.h>]
|
|
||||||
[void f () { if (WIFCONTINUED(0)) return; }]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl systemd-dhcp's log_internal macro and our handle_warn are sometimes
|
|
||||||
dnl used in void context,u sometimes in int. Makes clang unhappy.
|
|
||||||
NM_COMPILER_WARNING([$1], [unused-value],
|
|
||||||
[#define yolo ({ (666 + 666); })]
|
|
||||||
[int f () { int i = yolo; yolo; return i; }]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl a new warning in gcc 8, glib 2.55 doesn't play nice yet
|
|
||||||
dnl https://bugzilla.gnome.org/show_bug.cgi?id=793272
|
|
||||||
NM_COMPILER_WARNING([$1], [cast-function-type],
|
|
||||||
[#include <glib-object.h>]
|
|
||||||
[typedef struct { GObject parent; } NMObject;]
|
|
||||||
[typedef struct { GObjectClass parent; } NMObjectClass;]
|
|
||||||
[static void nm_object_init (NMObject *object) { } ]
|
|
||||||
[static void nm_object_class_init (NMObjectClass *object) { }]
|
|
||||||
[G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl clang started supporting -Wimplicit-fallthrough, but it does not
|
|
||||||
dnl honor the code comments to suppress the warning. Disable the
|
|
||||||
dnl warning with clang.
|
|
||||||
dnl
|
|
||||||
NM_COMPILER_WARNING([$1], [implicit-fallthrough],
|
|
||||||
[int foo(int a);
|
|
||||||
int foo(int a) {
|
|
||||||
int r = 0;
|
|
||||||
switch (a) {
|
|
||||||
case 1:
|
|
||||||
r++;
|
|
||||||
/* fall-through */
|
|
||||||
case 2:
|
|
||||||
r++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}]
|
|
||||||
)
|
|
||||||
|
|
||||||
eval "AS_TR_SH([$1])='$CFLAGS_MORE_WARNINGS $$1'"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([NM_LTO],
|
|
||||||
[AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size [default=no]]))
|
|
||||||
if (test "${enable_lto}" = "yes"); then
|
|
||||||
CC_CHECK_FLAG_APPEND([lto_flags], [CFLAGS], [-flto -flto-partition=none])
|
|
||||||
if (test -n "${lto_flags}"); then
|
|
||||||
CFLAGS="-flto -flto-partition=none $CFLAGS"
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([Link Time Optimization -flto is not supported.])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
enable_lto='no'
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([NM_LD_GC],
|
|
||||||
[AC_ARG_ENABLE(ld-gc, AS_HELP_STRING([--enable-ld-gc], [Enable garbage collection of unused symbols on linking [default=auto]]))
|
|
||||||
if (test "${enable_ld_gc}" != "no"); then
|
|
||||||
CC_CHECK_FLAG_APPEND([ld_gc_flags], [CFLAGS], [-fdata-sections -ffunction-sections -Wl,--gc-sections])
|
|
||||||
if (test -n "${ld_gc_flags}"); then
|
|
||||||
enable_ld_gc="yes"
|
|
||||||
CFLAGS="$ld_gc_flags $CFLAGS"
|
|
||||||
else
|
|
||||||
if (test "${enable_ld_gc}" = "yes"); then
|
|
||||||
AC_MSG_ERROR([Unused symbol eviction requested but not supported.])
|
|
||||||
else
|
|
||||||
enable_ld_gc="no"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
@@ -1,15 +0,0 @@
|
|||||||
dnl GIT_SHA_RECORD($1, $2)
|
|
||||||
dnl
|
|
||||||
dnl $1: the name of the assigned variable. For example NM_GIT_SHA,
|
|
||||||
dnl NMA_GIT_SHA, LIBNL_GIT_SHA.
|
|
||||||
dnl $2: by default, a define to config.h is added. This can be
|
|
||||||
dnl suppressed by passing "no-config-h".
|
|
||||||
dnl
|
|
||||||
AC_DEFUN([GIT_SHA_RECORD], [
|
|
||||||
m4_define([git_sha_record_v],
|
|
||||||
[m4_esyscmd([ ( [ -d ./.git/ ] && [ "$(readlink -f ./.git/)" = "$(readlink -f "$(git rev-parse --git-dir 2>/dev/null)" 2>/dev/null)" ] && git rev-parse --verify -q HEAD 2>/dev/null ) || true ])])
|
|
||||||
$1=git_sha_record_v
|
|
||||||
if test ""$2"" != "no-config-h" ; then
|
|
||||||
AC_DEFINE_UNQUOTED($1,"$$1",[git commit id of the original source code version])
|
|
||||||
fi
|
|
||||||
])
|
|
@@ -1,142 +0,0 @@
|
|||||||
dnl GNOME_CODE_COVERAGE
|
|
||||||
dnl
|
|
||||||
dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
|
|
||||||
dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
|
|
||||||
dnl (program or library) which should be built with code coverage support.
|
|
||||||
dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
|
|
||||||
dnl Makefile; and $enable_code_coverage which can be used in subsequent
|
|
||||||
dnl configure output.
|
|
||||||
dnl
|
|
||||||
dnl Note that all optimisation flags in CFLAGS must be disabled when code
|
|
||||||
dnl coverage is enabled.
|
|
||||||
dnl
|
|
||||||
dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
|
|
||||||
dnl This file is licenced under LGPLv2.1+.
|
|
||||||
dnl
|
|
||||||
dnl Usage example:
|
|
||||||
dnl configure.ac:
|
|
||||||
dnl GNOME_CODE_COVERAGE
|
|
||||||
dnl
|
|
||||||
dnl Makefile.am:
|
|
||||||
dnl @GNOME_CODE_COVERAGE_RULES@
|
|
||||||
dnl my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
|
|
||||||
dnl my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
|
|
||||||
dnl
|
|
||||||
dnl This results in a “check-code-coverage” rule being added to any Makefile.am
|
|
||||||
dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
|
|
||||||
dnl configured with --enable-code-coverage). Running `make check-code-coverage`
|
|
||||||
dnl in that directory will run the module’s test suite (`make check`) and build
|
|
||||||
dnl a code coverage report detailing the code which was touched, then print the
|
|
||||||
dnl URI for the report.
|
|
||||||
|
|
||||||
AC_DEFUN([GNOME_CODE_COVERAGE],[
|
|
||||||
dnl Check for --enable-code-coverage
|
|
||||||
AC_MSG_CHECKING([whether to build with code coverage support])
|
|
||||||
AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
|
|
||||||
AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
|
|
||||||
AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
|
|
||||||
AC_MSG_RESULT($enable_code_coverage)
|
|
||||||
|
|
||||||
AS_IF([ test "$enable_code_coverage" = "yes" ], [
|
|
||||||
dnl Check if gcc is being used
|
|
||||||
AS_IF([ test "$GCC" = "no" ], [
|
|
||||||
AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CHECK_PROG([LCOV], [lcov], [lcov])
|
|
||||||
AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
|
|
||||||
|
|
||||||
AS_IF([ test -z "$LCOV" ], [
|
|
||||||
AC_MSG_ERROR([lcov is needed to enable code coverage reporting])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([ test -z "$GENHTML" ], [
|
|
||||||
AC_MSG_ERROR([Could not find genhtml from the lcov package])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Build the code coverage flags
|
|
||||||
CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
|
|
||||||
CODE_COVERAGE_LDFLAGS="-lgcov"
|
|
||||||
|
|
||||||
AC_SUBST([CODE_COVERAGE_CFLAGS])
|
|
||||||
AC_SUBST([CODE_COVERAGE_LDFLAGS])
|
|
||||||
])
|
|
||||||
|
|
||||||
GNOME_CODE_COVERAGE_RULES='
|
|
||||||
# Code coverage
|
|
||||||
#
|
|
||||||
# Optional:
|
|
||||||
# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
|
|
||||||
# (Default: $(top_builddir))
|
|
||||||
# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
|
|
||||||
# by lcov for code coverage. (Default:
|
|
||||||
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
|
|
||||||
# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
|
|
||||||
# reports to be created. (Default:
|
|
||||||
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
|
|
||||||
# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
|
|
||||||
# (Default: empty)
|
|
||||||
# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
|
|
||||||
# instance. (Default: empty)
|
|
||||||
# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
|
|
||||||
#
|
|
||||||
# The generated report will be titled using the $(PACKAGE_NAME) and
|
|
||||||
# $(PACKAGE_VERSION). In order to add the current git hash to the title,
|
|
||||||
# use the git-version-gen script, available online.
|
|
||||||
|
|
||||||
# Optional variables
|
|
||||||
CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
|
|
||||||
CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
|
|
||||||
CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
|
|
||||||
CODE_COVERAGE_LCOV_OPTIONS ?=
|
|
||||||
CODE_COVERAGE_GENHTML_OPTIONS ?=
|
|
||||||
CODE_COVERAGE_IGNORE_PATTERN ?=
|
|
||||||
|
|
||||||
code_coverage_quiet = $(code_coverage_quiet_$(V))
|
|
||||||
code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
|
|
||||||
code_coverage_quiet_0 = --quiet
|
|
||||||
|
|
||||||
# Use recursive makes in order to ignore errors during check
|
|
||||||
check-code-coverage:
|
|
||||||
ifeq ($(CODE_COVERAGE_ENABLED),yes)
|
|
||||||
-$(MAKE) $(AM_MAKEFLAGS) -k check
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
|
|
||||||
else
|
|
||||||
@echo "Need to reconfigure with --enable-code-coverage"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Capture code coverage data
|
|
||||||
code-coverage-capture: code-coverage-capture-hook
|
|
||||||
ifeq ($(CODE_COVERAGE_ENABLED),yes)
|
|
||||||
$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
|
|
||||||
$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
|
|
||||||
-@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
|
|
||||||
LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
|
|
||||||
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
|
|
||||||
else
|
|
||||||
@echo "Need to reconfigure with --enable-code-coverage"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Hook rule executed before code-coverage-capture, overridable by the user
|
|
||||||
code-coverage-capture-hook:
|
|
||||||
|
|
||||||
ifeq ($(CODE_COVERAGE_ENABLED),yes)
|
|
||||||
clean: code-coverage-clean
|
|
||||||
code-coverage-clean:
|
|
||||||
-$(LCOV) --directory $(top_builddir) -z
|
|
||||||
-rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
|
|
||||||
-find . -name "*.gcda" -o -name "*.gcov" -delete
|
|
||||||
endif
|
|
||||||
|
|
||||||
GITIGNOREFILES ?=
|
|
||||||
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
|
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS ?=
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
|
|
||||||
|
|
||||||
.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
|
|
||||||
'
|
|
||||||
|
|
||||||
AC_SUBST([GNOME_CODE_COVERAGE_RULES])
|
|
||||||
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
|
|
||||||
])
|
|
@@ -1,92 +0,0 @@
|
|||||||
dnl Copyright 2009 Johan Dahlin
|
|
||||||
dnl
|
|
||||||
dnl This file is free software; the author(s) gives unlimited
|
|
||||||
dnl permission to copy and/or distribute it, with or without
|
|
||||||
dnl modifications, as long as this notice is preserved.
|
|
||||||
dnl
|
|
||||||
|
|
||||||
# serial 1
|
|
||||||
|
|
||||||
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|
||||||
[
|
|
||||||
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
|
||||||
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
|
||||||
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
|
|
||||||
|
|
||||||
dnl enable/disable introspection
|
|
||||||
m4_if([$2], [require],
|
|
||||||
[dnl
|
|
||||||
enable_introspection=yes
|
|
||||||
],[dnl
|
|
||||||
AC_ARG_ENABLE(introspection,
|
|
||||||
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
|
|
||||||
[Enable introspection for this build]),,
|
|
||||||
[enable_introspection=auto])
|
|
||||||
])dnl
|
|
||||||
|
|
||||||
INTROSPECTION_SCANNER=
|
|
||||||
INTROSPECTION_COMPILER=
|
|
||||||
INTROSPECTION_GENERATE=
|
|
||||||
INTROSPECTION_GIRDIR=
|
|
||||||
INTROSPECTION_TYPELIBDIR=
|
|
||||||
|
|
||||||
if test "x$enable_introspection" = "xno"; then
|
|
||||||
found_introspection="no"
|
|
||||||
else
|
|
||||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], [
|
|
||||||
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
|
||||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
|
||||||
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if $INTROSPECTION_SCANNER works])
|
|
||||||
if CFLAGS="${CFLAGS} -Wno-error" "$INTROSPECTION_SCANNER" --namespace=test --library=c /dev/null --output /dev/null >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
|
|
||||||
found_introspection=yes
|
|
||||||
else
|
|
||||||
found_introspection="no (compiler failure -- check config.log)"
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT([$found_introspection])
|
|
||||||
], [found_introspection="no (not installed)"])
|
|
||||||
|
|
||||||
if test "x$enable_introspection" = "xyes"; then
|
|
||||||
if test "x$found_introspection" != "xyes"; then
|
|
||||||
AC_MSG_ERROR([introspection enabled but can't be used])
|
|
||||||
fi
|
|
||||||
elif test "x$enable_introspection" != "xauto"; then
|
|
||||||
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(INTROSPECTION_SCANNER, 'CFLAGS="${CFLAGS} -Wno-error" '"$INTROSPECTION_SCANNER")
|
|
||||||
AC_SUBST(INTROSPECTION_COMPILER)
|
|
||||||
AC_SUBST(INTROSPECTION_GENERATE)
|
|
||||||
AC_SUBST(INTROSPECTION_GIRDIR)
|
|
||||||
AC_SUBST(INTROSPECTION_TYPELIBDIR)
|
|
||||||
AC_SUBST(INTROSPECTION_CFLAGS)
|
|
||||||
AC_SUBST(INTROSPECTION_LIBS)
|
|
||||||
AC_SUBST(INTROSPECTION_MAKEFILE)
|
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Usage:
|
|
||||||
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
|
|
||||||
|
|
||||||
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
|
|
||||||
[
|
|
||||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Usage:
|
|
||||||
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
|
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
|
|
||||||
[
|
|
||||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
|
|
||||||
])
|
|
@@ -1,87 +0,0 @@
|
|||||||
dnl vala.m4
|
|
||||||
dnl
|
|
||||||
dnl Copyright 2012 Evan Nemerson
|
|
||||||
dnl
|
|
||||||
dnl This library is free software; you can redistribute it and/or
|
|
||||||
dnl modify it under the terms of the GNU Lesser General Public
|
|
||||||
dnl License as published by the Free Software Foundation; either
|
|
||||||
dnl version 2.1 of the License, or (at your option) any later version.
|
|
||||||
dnl
|
|
||||||
dnl This library is distributed in the hope that it will be useful,
|
|
||||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
dnl Lesser General Public License for more details.
|
|
||||||
dnl
|
|
||||||
dnl You should have received a copy of the GNU Lesser General Public
|
|
||||||
dnl License along with this library.
|
|
||||||
|
|
||||||
# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION])
|
|
||||||
# --------------------------------------
|
|
||||||
# Check that vapigen existence and version
|
|
||||||
#
|
|
||||||
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
|
|
||||||
AC_DEFUN([VAPIGEN_CHECK],
|
|
||||||
[
|
|
||||||
AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
|
|
||||||
AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([vala],
|
|
||||||
AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],
|
|
||||||
[build Vala bindings [default=auto]]),,
|
|
||||||
[enable_vala=auto])
|
|
||||||
|
|
||||||
AS_CASE([$enable_vala], [no], [],
|
|
||||||
[yes], [
|
|
||||||
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
|
|
||||||
AC_MSG_ERROR([Vala bindings require GObject Introspection])
|
|
||||||
])
|
|
||||||
], [auto], [
|
|
||||||
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
|
|
||||||
enable_vala=no
|
|
||||||
])
|
|
||||||
], [
|
|
||||||
AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test "x$2" = "x"], [
|
|
||||||
vapigen_pkg_name=vapigen
|
|
||||||
], [
|
|
||||||
vapigen_pkg_name=vapigen-$2
|
|
||||||
])
|
|
||||||
AS_IF([test "x$1" = "x"], [
|
|
||||||
vapigen_pkg="$vapigen_pkg_name"
|
|
||||||
], [
|
|
||||||
vapigen_pkg="$vapigen_pkg_name >= $1"
|
|
||||||
])
|
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
|
||||||
|
|
||||||
PKG_CHECK_EXISTS([$vapigen_pkg], [
|
|
||||||
AS_IF([test "$enable_vala" = "auto"], [
|
|
||||||
enable_vala=yes
|
|
||||||
])
|
|
||||||
], [
|
|
||||||
AS_CASE([$enable_vala], [yes], [
|
|
||||||
AC_MSG_ERROR([$vapigen_pkg not found])
|
|
||||||
], [auto], [
|
|
||||||
enable_vala=no
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_CASE([$enable_vala],
|
|
||||||
[yes], [
|
|
||||||
VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
|
|
||||||
VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
|
|
||||||
AS_IF([test "x$2" = "x"], [
|
|
||||||
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
|
|
||||||
], [
|
|
||||||
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_SUBST([VAPIGEN])
|
|
||||||
AC_SUBST([VAPIGEN_VAPIDIR])
|
|
||||||
AC_SUBST([VAPIGEN_MAKEFILE])
|
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
|
|
||||||
])
|
|
Reference in New Issue
Block a user