Commit 4a1ff8ad authored by Beniamino Galvani's avatar Beniamino Galvani

build: merge branch 'bg/meson-paths'

https://github.com/NetworkManager/NetworkManager/pull/198
parents e8934059 5b36585a
......@@ -104,11 +104,12 @@ script:
-D ofono=true \
-D teamdctl=false \
\
-D dhcpcanon=/bin/true \
-D dhclient=/bin/true \
-D dhclient=/bin/nowhere/dhclient \
-D dhcpcanon=/bin/nowhere/dhcpcanon \
-D dhcpcd=/bin/nowhere/dhcpd \
\
-D netconfig=true \
-D resolvconf=true \
-D netconfig=/bin/nowhere/netconfig \
-D resolvconf=/bin/nowhere/resolvconf \
\
-D ifcfg_rh=false \
-D ibft=true \
......@@ -145,8 +146,8 @@ script:
--with-dhcpcd=yes \
--with-dhclient=yes \
\
--with-netconfig=no \
--with-resolvconf=yes \
--with-netconfig=/bin/nowhere/netconfig \
--with-resolvconf=/bin/nowhere/resolvconf \
\
--enable-ifcfg-rh=yes \
--enable-config-plugin-ibft=yes \
......
......@@ -120,9 +120,6 @@ config-extra.h: Makefile
echo "/* Generated by Makefile.am */" >$@ && \
echo "#define BINDIR \"$(bindir)\"" >>$@ && \
echo "#define DATADIR \"$(datadir)\"" >>$@ && \
echo "#define DHCLIENT_PATH \"$(DHCLIENT_PATH)\"" >>$@ && \
echo "#define DHCPCANON_PATH \"$(DHCPCANON_PATH)\"" >>$@ && \
echo "#define DHCPCD_PATH \"$(DHCPCD_PATH)\"" >>$@ && \
echo "#define LIBEXECDIR \"$(libexecdir)\"" >>$@ && \
echo "#define LOCALSTATEDIR \"$(localstatedir)\"" >>$@ && \
echo "#define NMCONFDIR \"$(nmconfdir)\"" >>$@ && \
......@@ -1853,7 +1850,7 @@ $(src_libNetworkManagerTest_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
###############################################################################
src/NetworkManager.ver: src/libNetworkManager.la $(core_plugins)
$(AM_V_GEN) NM="$(NM)" "$(srcdir)/tools/create-exports-NetworkManager.sh" --called-from-make "$(srcdir)"
$(AM_V_GEN) NM="$(NM)" "$(srcdir)/tools/create-exports-NetworkManager.sh" --called-from-build "$(srcdir)"
CLEANFILES += src/NetworkManager.ver
......@@ -4749,6 +4746,7 @@ EXTRA_DIST += \
meson_options.txt \
meson_post_install.py \
config.h.meson \
config-extra.h.meson \
docs/meson.build \
\
po/meson.build \
......
#mesondefine BINDIR
#mesondefine DATADIR
#mesondefine DHCLIENT_PATH
#mesondefine DHCPCANON_PATH
#mesondefine DHCPCD_PATH
#mesondefine LIBEXECDIR
#mesondefine LOCALSTATEDIR
#mesondefine NMCONFDIR
......
......@@ -10,14 +10,11 @@
/* Define to path of dhcpcd binary */
#mesondefine DHCPCD_PATH
/* Define if dhcpcd supports IPv6 (6.x+) */
#mesondefine DHCPCD_SUPPORTS_IPV6
/* Define to path of dnsmasq binary */
#mesondefine DNSMASQ_PATH
/* Define to path of unbound dnssec-trigger-script */
#mesondefine DNSSEC_TRIGGER_SCRIPT
#mesondefine DNSSEC_TRIGGER_PATH
/* Gettext package */
#mesondefine GETTEXT_PACKAGE
......
......@@ -603,9 +603,6 @@ if (test "${enable_teamdctl}" = "yes"); then
fi
# temporary bug workaround
LIBTEAMDCTL_CFLAGS=`echo $LIBTEAMDCTL_CFLAGS | sed -e 's:/teamdctl.h::'`
AC_DEFINE(WITH_TEAMDCTL, 1, [Define if you have Teamd control support])
else
AC_DEFINE(WITH_TEAMDCTL, 0, [Define if you have Teamd control support])
fi
AM_CONDITIONAL(WITH_TEAMDCTL, test "${enable_teamdctl}" = "yes")
......@@ -674,16 +671,6 @@ if test "${have_crypto_nss}" = "yes"; then
fi
AM_CONDITIONAL(HAVE_CRYPTO_GNUTLS, test "${have_crypto_gnutls}" = 'yes')
AM_CONDITIONAL(HAVE_CRYPTO_NSS, test "${have_crypto_nss}" = 'yes')
if test "${have_crypto_gnutls}" = 'yes'; then
AC_DEFINE(HAVE_CRYPTO_GNUTLS, 1, [Define if you have gnutls support])
else
AC_DEFINE(HAVE_CRYPTO_GNUTLS, 0, [Define if you have gnutls support])
fi
if test "${have_crypto_nss}" = 'yes'; then
AC_DEFINE(HAVE_CRYPTO_NSS, 1, [Define if you have nss support])
else
AC_DEFINE(HAVE_CRYPTO_NSS, 0, [Define if you have nss support])
fi
AC_ARG_WITH(crypto,
AS_HELP_STRING([--with-crypto=nss|gnutls],
......@@ -773,12 +760,6 @@ if (test "${with_modem_manager_1}" != "no"); then
with_modem_manager_1="yes"
fi
fi
if (test "${with_modem_manager_1}" = "yes"); then
AC_DEFINE(WITH_MODEM_MANAGER_1, 1, [Define if you have ModemManager1 support])
else
AC_DEFINE(WITH_MODEM_MANAGER_1, 0, [Define if you have ModemManager1 support])
fi
AM_CONDITIONAL(WITH_MODEM_MANAGER_1, test "${with_modem_manager_1}" = "yes")
# Bluez5 DUN support
......@@ -822,7 +803,7 @@ if test "$with_dhcpcanon" != "no"; then
fi
if test "$with_dhcpcanon" != "no"; then
AC_DEFINE(WITH_DHCPCANON, 1, [Define if you have dhcpcanon])
AC_SUBST(DHCPCANON_PATH, $with_dhcpcanon)
AC_DEFINE_UNQUOTED(DHCPCANON_PATH, "$with_dhcpcanon", [Define path to dhcpcanon])
else
AC_DEFINE(WITH_DHCPCANON, 0, [Define if you have dhcpcanon])
fi
......@@ -834,15 +815,12 @@ if test "${enable_ovs}" != "no"; then
if test "$have_jansson" = "no"; then
AC_MSG_ERROR(Jansson is required for ovs support)
fi
AC_DEFINE(WITH_OPENVSWITCH, 1, [Define if you have OpenVSwitch support])
else
AC_DEFINE(WITH_OPENVSWITCH, 0, [Define if you have OpenVSwitch support])
fi
AM_CONDITIONAL(WITH_OPENVSWITCH, test "${enable_ovs}" = "yes")
# DHCP client support
AC_ARG_WITH([dhclient],
AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support]))
AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient support]))
if test "$with_dhclient" != "no"; then
with_dhclient_="$with_dhclient"
AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
......@@ -851,25 +829,17 @@ if test "$with_dhclient" != "no"; then
AC_MSG_WARN([dhclient not found, assume path /usr/sbin/dhclient])
with_dhclient=/usr/sbin/dhclient
fi
else
if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then
AC_MSG_WARN([Seems version of dhclient $with_dhclient is too old, version 4.x or newer is required.])
fi
fi
fi
if test "$with_dhclient" != "no"; then
AC_DEFINE(WITH_DHCLIENT, 1, [Define if you have dhclient])
AC_SUBST(DHCLIENT_PATH, $with_dhclient)
AC_DEFINE_UNQUOTED(DHCLIENT_PATH, "$with_dhclient", [Define path to dhclient])
else
AC_DEFINE(WITH_DHCLIENT, 0, [Define if you have dhclient])
fi
AC_ARG_WITH([dhcpcd],
AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable dhcpcd 4.x support]))
AC_ARG_WITH([dhcpcd-supports-ipv6],
AS_HELP_STRING([--with-dhcpcd-supports-ipv6=yes|no|auto],
[Whether using dhcpcd >= 6.x which has IPv6 support]),
[with_dhcpcd_supports_ipv6=$withval], [with_dhcpcd_supports_ipv6=auto])
if test "$with_dhcpcd" != "no"; then
with_dhcpcd_="$with_dhcpcd"
AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
......@@ -877,39 +847,12 @@ if test "$with_dhcpcd" != "no"; then
if test "$with_dhcpcd_" == yes; then
AC_MSG_WARN([dhcpcd not found, assume path /usr/sbin/dhcpcd])
with_dhcpcd=/usr/sbin/dhcpcd
if test "$with_dhcpcd_supports_ipv6" == auto; then
with_dhcpcd_supports_ipv6=yes
fi
fi
else
if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[456789]]\."; then
AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd is too old, version 4.x or newer is required])
fi
fi
fi
if test "$with_dhcpcd" != "no"; then
if $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[6789]]\."; then
if test "$with_dhcpcd_supports_ipv6" == no; then
AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd supports IPv6, but compiling --with-dhcpcd-supports-ipv6=no])
else
with_dhcpcd_supports_ipv6=yes
fi
else
if test "$with_dhcpcd_supports_ipv6" == yes; then
AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd does not support IPv6, but compiling --with-dhcpcd-supports-ipv6=yes])
else
with_dhcpcd_supports_ipv6=no
fi
fi
if test "$with_dhcpcd_supports_ipv6" != no; then
AC_DEFINE(DHCPCD_SUPPORTS_IPV6, 1, [Define if dhcpcd supports IPv6 (6.x+)])
fi
else
with_dhcpcd_supports_ipv6=no
fi
if test "$with_dhcpcd" != "no"; then
AC_DEFINE(WITH_DHCPCD, 1, [Define if you have dhcpcd])
AC_SUBST(DHCPCD_PATH, $with_dhcpcd)
AC_DEFINE_UNQUOTED(DHCPCD_PATH, "$with_dhcpcd", [Define path to dhcpcd])
else
AC_DEFINE(WITH_DHCPCD, 0, [Define if you have dhcpcd])
fi
......@@ -928,13 +871,12 @@ test -z "$config_dhcp_default" && config_dhcp_defaul
AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_DHCP, "$config_dhcp_default", [Default configuration option for main.dhcp setting])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_DHCP, $config_dhcp_default)
# resolvconf and netconfig support
AC_ARG_WITH(resolvconf, AS_HELP_STRING([--with-resolvconf=yes|no|path], [Enable resolvconf support]))
AC_ARG_WITH(netconfig, AS_HELP_STRING([--with-netconfig=yes|no], [Enable SUSE netconfig support]))
AC_ARG_WITH(config-dns-rc-manager-default, AS_HELP_STRING([--with-config-dns-rc-manager-default=symlink|file|netconfig|resolvconf], [Configure default value for main.rc-manager setting]), [config_dns_rc_manager_default=$withval])
if test "$config_dns_rc_manager_default" != symlink -a \
if test "$config_dns_rc_manager_default" != "" -a \
"$config_dns_rc_manager_default" != file -a \
"$config_dns_rc_manager_default" != "" -a \
"$config_dns_rc_manager_default" != symlink -a \
"$config_dns_rc_manager_default" != netconfig -a \
"$config_dns_rc_manager_default" != resolvconf; then
AC_MSG_WARN([Unknown --with-config-dns-rc-manager-default=$config_dns_rc_manager_default setting.])
......@@ -945,21 +887,29 @@ AS_IF([test -z "$with_netconfig" -a -f /etc/SuSE-release], with_netconfig=yes)
# Otherwise default to "no"
AS_IF([test -z "$with_resolvconf"], with_resolvconf=no)
AS_IF([test -z "$with_netconfig"], with_netconfig=no)
# Find resolvconf and netconfig
if test "$with_resolvconf" = "yes"; then
AC_PATH_PROGS(with_resolvconf, resolvconf, no, /sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROGS(with_resolvconf, resolvconf, 'yes', /sbin:/usr/sbin:/usr/local/sbin)
if test "$with_resolvconf" = "yes"; then
AC_MSG_ERROR(cannot find resolvconf in path. Set the path explicitly via --with-resolvconf=PATH.)
fi
fi
if test "$with_resolvconf" != "no"; then
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=resolvconf)
fi
if test "$with_netconfig" = "yes"; then
AC_PATH_PROGS(with_netconfig, netconfig, no, /sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROGS(with_netconfig, netconfig, yes, /sbin:/usr/sbin:/usr/local/sbin)
if test "$with_netconfig" = "yes"; then
AC_MSG_ERROR(cannot find netconfig in path. Set the path explicitly via --with-netconfig=PATH.)
fi
fi
if test "$with_netconfig" != "no"; then
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=netconfig)
fi
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=symlink)
# Define resolvconf and netconfig paths
if test "$with_resolvconf" != "no"; then
AC_DEFINE_UNQUOTED(RESOLVCONF_PATH, "$with_resolvconf", [Path to resolvconf])
fi
......@@ -998,13 +948,13 @@ AC_SUBST(DNSMASQ_PATH)
AC_ARG_WITH(dnssec_trigger,
AS_HELP_STRING([--with-dnssec-trigger=/path/to/dnssec-trigger-script], [path to unbound dnssec-trigger-script]))
if test "x${with_dnssec_trigger}" = x; then
AC_PATH_PROG(DNSSEC_TRIGGER_SCRIPT, dnssec-trigger-script, /usr/libexec/dnssec-trigger-script,
AC_PATH_PROG(DNSSEC_TRIGGER_PATH, dnssec-trigger-script, /usr/libexec/dnssec-trigger-script,
/usr/local/libexec:/usr/local/lib:/usr/local/lib/dnssec-trigger:/usr/libexec:/usr/lib:/usr/lib/dnssec-trigger)
else
DNSSEC_TRIGGER_SCRIPT="$with_dnssec_trigger"
DNSSEC_TRIGGER_PATH="$with_dnssec_trigger"
fi
AC_DEFINE_UNQUOTED(DNSSEC_TRIGGER_SCRIPT, "$DNSSEC_TRIGGER_SCRIPT", [Define to path of unbound dnssec-trigger-script])
AC_SUBST(DNSSEC_TRIGGER_SCRIPT)
AC_DEFINE_UNQUOTED(DNSSEC_TRIGGER_PATH, "$DNSSEC_TRIGGER_PATH", [Define to path of unbound dnssec-trigger-script])
AC_SUBST(DNSSEC_TRIGGER_PATH)
# system CA certificates path
AC_ARG_WITH(system-ca-path,
......@@ -1356,7 +1306,7 @@ echo
echo "Features:"
echo " wext: $ac_with_wext"
echo " wifi: $enable_wifi"
echo " ppp: $enable_ppp ${PPPD_PLUGIN_DIR}"
echo " ppp: $enable_ppp ${PPPD_PATH} plugins:${PPPD_PLUGIN_DIR}"
echo " modemmanager-1: $with_modem_manager_1"
echo " ofono: $with_ofono"
echo " concheck: $enable_concheck"
......@@ -1384,7 +1334,6 @@ echo "DHCP clients (default $config_dhcp_default):"
echo " dhcpcanon: $with_dhcpcanon"
echo " dhclient: $with_dhclient"
echo " dhcpcd: $with_dhcpcd"
echo " dhcpcd-supports-ipv6: $with_dhcpcd_supports_ipv6"
echo
echo "Miscellaneous:"
......
......@@ -685,9 +685,9 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/NetworkManager.conf
%{_bindir}/nm-online
%{_libexecdir}/nm-ifup
%ghost %{_sbindir}/ifup
%ghost %attr(755, root, root) %{_sbindir}/ifup
%{_libexecdir}/nm-ifdown
%ghost %{_sbindir}/ifdown
%ghost %attr(755, root, root) %{_sbindir}/ifdown
%{_libexecdir}/nm-dhcp-helper
%{_libexecdir}/nm-dispatcher
%{_libexecdir}/nm-iface-helper
......
......@@ -16,6 +16,7 @@ libnm_core_headers = files(
'nm-setting-connection.h',
'nm-setting-dcb.h',
'nm-setting-dummy.h',
'nm-setting-ethtool.h',
'nm-setting-generic.h',
'nm-setting-gsm.h',
'nm-setting-infiniband.h',
......
This diff is collapsed.
......@@ -7,9 +7,9 @@ option('dbus_ifaces_dir', type: 'string', value: '', description: 'where D-Bus i
option('dbus_sys_dir', type: 'string', value: '', description: 'where D-Bus system service directory is')
option('polkit_dir', type: 'string', value: '', description: 'where PolicyKit policy directory is')
option('kernel_firmware_dir', type: 'string', value: '/lib/firmware', description: 'where kernel firmware directory is (default is /lib/firmware)')
option('iptables', type: 'array', value: ['iptables', '/sbin/iptables', '/usr/sbin/iptables'], description: 'path to iptables')
option('dnsmasq', type: 'array', value: ['dnsmasq', '/sbin/dnsmasq', '/usr/sbin/dnsmasq'], description: 'path to dnsmasq')
option('dnssec_trigger', type: 'array', value: ['dnssec-trigger-script', '/usr/local/libexec/dnssec-trigger-script', '/usr/local/lib/dnssec-trigger-script', '/usr/local/lib/dnssec-trigger/dnssec-trigger-script', '/usr/libexec/dnssec-trigger-script', '/usr/lib/dnssec-trigger-script', '/usr/lib/dnssec-trigger/dnssec-trigger-script'], description: 'path to unbound dnssec-trigger-script')
option('iptables', type: 'string', value: '', description: 'path to iptables')
option('dnsmasq', type: 'string', value: '', description: 'path to dnsmasq')
option('dnssec_trigger', type: 'string', value: '', description: 'path to unbound dnssec-trigger-script')
# platform
option('dist_version', type: 'string', value: '', description: 'Define the NM\'s distribution version string')
......@@ -30,7 +30,7 @@ option('wext', type: 'boolean', value: true, description: 'Enable or disable Lin
option('wifi', type: 'boolean', value: true, description: 'enable Wi-Fi support')
option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)')
option('ppp', type: 'boolean', value: true, description: 'enable PPP/PPPoE support')
option('pppd', type: 'array', value: ['pppd', '/sbin/pppd', '/usr/sbin/pppd'], description: 'path to pppd binary')
option('pppd', type: 'string', value: '', description: 'path to pppd binary')
option('pppd_plugin_dir', type: 'string', value: '', description: 'path to the pppd plugins directory')
option('modem_manager', type: 'boolean', value: true, description: 'Enable new ModemManager1 interface support')
option('ofono', type: 'boolean', value: false, description: 'Enable oFono support (experimental)')
......@@ -49,16 +49,15 @@ option('ifcfg_rh', type: 'boolean', value: false, description: 'enable ifcfg-rh
option('ifupdown', type: 'boolean', value: false, description: 'enable ifupdown configuration plugin (Debian/Ubuntu)')
# handlers for resolv.conf
option('resolvconf', type: 'array', value: ['resolvconf', '/sbin/resolvconf', '/usr/sbin/resolvconf', '/usr/local/sbin/resolvconf'], description: 'Enable resolvconf support')
option('netconfig', type: 'array', value: ['netconfig', '/sbin/netconfig', '/usr/sbin/netconfig', '/usr/local/sbin/netconfig'], description: 'Enable SUSE netconfig support')
option('resolvconf', type: 'string', value: '', description: 'Enable resolvconf support')
option('netconfig', type: 'string', value: '', description: 'Enable SUSE netconfig support')
option('config_dns_rc_manager_default', type: 'combo', choices: ['symlink', 'file', 'netconfig', 'resolvconf'], value: 'symlink', description: 'Configure default value for main.rc-manager setting')
# dhcp clients
option('dhcpcanon', type: 'array', value: ['dhcpcanon', '/sbin/dhcpcanon', '/usr/sbin/dhcpcanon', '/usr/local/sbin/dhcpcanon', '/usr/bin/dhcpcanon', '/usr/local/bin/dhcpcanon'], description: 'Enable dhcpcanon support (experimental)')
option('dhclient', type: 'array', value: ['dhclient', '/sbin/dhclient', '/usr/sbin/dhclient', '/usr/local/sbin/dhclient'], description: 'Enable dhclient 4.x support')
option('dhcpcd', type: 'array', value: ['dhcpcd', '/sbin/dhcpcd', '/usr/sbin/dhcpcd', '/usr/local/sbin/dhcpcd'], description: 'Enable dhcpcd 4.x support')
option('dhclient', type: 'string', value: '', description: 'Enable dhclient support')
option('dhcpcanon', type: 'string', value: '', description: 'Enable dhcpcanon support (experimental)')
option('dhcpcd', type: 'string', value: '', description: 'Enable dhcpcd support')
option('config_dhcp_default', type: 'combo', choices: ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal'], value: 'internal', description: 'Default configuration option for main.dhcp setting, used as fallback if the configuration option is unset')
option('dhcpcd_supports_ipv6', type: 'boolean', value: true, description: 'Whether using dhcpcd >= 6.x which has IPv6 support')
# miscellaneous
option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build')
......
......@@ -133,13 +133,11 @@ ip4_start (NMDhcpClient *client,
g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */
g_ptr_array_add (argv, (gpointer) nm_dhcp_helper_path);
#ifdef DHCPCD_SUPPORTS_IPV6
/* IPv4-only for now. NetworkManager knows better than dhcpcd when to
* run IPv6, and dhcpcd's automatic Router Solicitations cause problems
* with devices that don't expect them.
*/
g_ptr_array_add (argv, (gpointer) "-4");
#endif
hostname = nm_dhcp_client_get_hostname (client);
......
......@@ -43,7 +43,7 @@ update (NMDnsPlugin *plugin,
const CList *ip_config_lst_head,
const char *hostname)
{
char *argv[] = { DNSSEC_TRIGGER_SCRIPT, "--async", "--update", NULL };
char *argv[] = { DNSSEC_TRIGGER_PATH, "--async", "--update", NULL };
int status;
/* TODO: We currently call a script installed with the dnssec-trigger
......
......@@ -143,7 +143,7 @@ sources = files(
'nm-sleep-monitor.c'
)
deps = [
nm_deps = [
dl_dep,
libndp_dep,
libudev_dep,
......@@ -153,70 +153,29 @@ deps = [
]
if enable_concheck
deps += libcurl_dep
nm_deps += libcurl_dep
endif
if enable_libaudit
deps += libaudit_dep
nm_deps += libaudit_dep
endif
if enable_libpsl
deps += libpsl_dep
nm_deps += libpsl_dep
endif
if enable_selinux
deps += selinux_dep
nm_deps += selinux_dep
endif
libnetwork_manager = static_library(
nm_name,
sources: sources,
dependencies: deps,
dependencies: nm_deps,
c_args: cflags,
link_with: [libnetwork_manager_base, libsystemd_nm]
)
ldflags = ['-rdynamic']
# FIXME: this doesn't work and it depends on libtool
'''
src/NetworkManager.ver: src/libNetworkManager.la $(core_plugins)
$(AM_V_GEN) NM="$(NM)" "$(srcdir)/tools/create-exports-NetworkManager.sh" --called-from-make "$(srcdir)"
src_NetworkManager_LDFLAGS = \
-rdynamic \
-Wl,--version-script="src/NetworkManager.ver"
nm = find_program('gcc-nm', 'nm')
create_exports_networkmanager = join_paths(meson.source_root(), 'tools', 'create-exports-NetworkManager.sh')
symbol_map_name = 'NetworkManager.ver'
linker_script = custom_target(
symbol_map_name,
input: meson.source_root(),
output: symbol_map_name,
capture: true,
#command: ['NM=' + nm.path(), create_exports_networkmanager, '--called-from-make', '@INPUT@']
command: [create_exports_networkmanager, '--called-from-make', '@INPUT@']
)
ldflags += '-Wl,--version-script,@0@'.format(linker_script)
'''
network_manager = executable(
nm_name,
'main.c',
dependencies: deps,
c_args: cflags,
link_with: libnetwork_manager,
link_args: ldflags,
#FIXME
#link_depends: linker_script,
install: true,
install_dir: nm_sbindir
)
deps = [
dl_dep,
libndp_dep,
......@@ -287,3 +246,30 @@ endif
subdir('devices')
subdir('settings/plugins')
# NetworkManager binary
create_exports_networkmanager = join_paths(meson.source_root(), 'tools', 'create-exports-NetworkManager.sh')
symbol_map_name = 'NetworkManager.ver'
ver_script = custom_target(
symbol_map_name,
input: meson.source_root(),
output: symbol_map_name,
depends: [ libnetwork_manager, core_plugins ],
command: [create_exports_networkmanager, '--called-from-build', '@INPUT@']
)
ldflags = ['-rdynamic', '-Wl,--version-script,@0@'.format(ver_script.full_path())]
network_manager = executable(
nm_name,
'main.c',
dependencies: nm_deps,
c_args: nm_cflags,
link_with: libnetwork_manager,
link_args: ldflags,
link_depends: ver_script,
install: true,
install_dir: nm_sbindir
)
......@@ -18,7 +18,7 @@ libnmdbus_ifcfg_rh = static_library(
dependencies: glib_dep,
)
sources = files(
core_sources = files(
'nm-inotify-helper.c',
'nms-ifcfg-rh-reader.c',
'nms-ifcfg-rh-utils.c',
......@@ -32,11 +32,11 @@ deps = [
libnms_ifcfg_rh_core = static_library(
'nms-ifcfg-rh-core',
sources: sources,
sources: core_sources,
dependencies: deps,
)
sources = [dbus_sources] + files('nms-ifcfg-rh-connection.c')
sources = [dbus_sources] + core_sources + files('nms-ifcfg-rh-connection.c', 'nms-ifcfg-rh-plugin.c')
libnm_settings_plugin_ifcfg_rh = shared_module(
'nm-settings-plugin-ifcfg-rh',
......
......@@ -35,7 +35,7 @@ call_nm() {
}
get_symbols_nm () {
call_nm ./src/.libs/libNetworkManager.a |
call_nm ./src/${libs}libNetworkManager.a |
sed -n 's/^[tTDGRBS] //p' |
_sort
}
......@@ -47,9 +47,9 @@ EOF
}
get_symbols_missing() {
(for f in $(find ./src/settings/plugins/*/.libs/ \
./src/devices/*/.libs/ \
./src/ppp/.libs/ -name '*.so'); do
(for f in $(find ./src/settings/plugins/*/${libs} \
./src/devices/*/${libs} \
./src/ppp/${libs} -name '*.so'); do
call_nm "$f" |
sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|c_siphash_\).*\)$/\2/p'
done) |
......@@ -90,16 +90,25 @@ local:
EOF
}
test -f ./src/.libs/libNetworkManager.a || die "must be called from NetworkManager \$(top_builddir) after building the tree"
if [ -f "build.ninja" ]; then
from_meson=1
libs=
else
libs=.libs/
fi
test -f ./src/${libs}libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree"
case "$1" in
rebuild)
[ -n "$from_meson" ] && die "can't do a build when called from meson"
do_rebuild
;;
build)
[ -n "$from_meson" ] && die "can't do a build when called from meson"
do_build
;;
'--called-from-make')
--called-from-build)
if test -z "${NM_BUILD_NO_CREATE_EXPORTS+x}"; then
do_update
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment