summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3773
-rw-r--r--INSTALL322
-rw-r--r--Make.xml.rules24
-rw-r--r--Make.xml.rules.in26
-rw-r--r--Makefile.am8
-rw-r--r--Makefile.in102
-rw-r--r--NEWS58
-rw-r--r--README26
-rw-r--r--aclocal.m4556
-rwxr-xr-xbuild-aux/compile13
-rwxr-xr-xbuild-aux/config.guess949
-rwxr-xr-xbuild-aux/config.sub2501
-rwxr-xr-xbuild-aux/depcomp10
-rwxr-xr-xbuild-aux/install-sh397
-rw-r--r--build-aux/ltmain.sh5788
-rwxr-xr-xbuild-aux/missing18
-rwxr-xr-xbuild-aux/test-driver41
-rwxr-xr-xbuild-aux/ylwrap34
-rw-r--r--conf/Makefile.in39
-rw-r--r--conf/pam_conv1/Makefile.am4
-rw-r--r--conf/pam_conv1/Makefile.in109
-rw-r--r--conf/pam_conv1/README2
-rw-r--r--conf/pam_conv1/pam_conv_l.c548
-rw-r--r--conf/pam_conv1/pam_conv_l.l4
-rw-r--r--conf/pam_conv1/pam_conv_y.c816
-rw-r--r--conf/pam_conv1/pam_conv_y.h60
-rw-r--r--conf/pam_conv1/pam_conv_y.y4
-rw-r--r--config.h.in48
-rwxr-xr-xconfigure3526
-rw-r--r--configure.ac215
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in42
-rw-r--r--doc/adg/Makefile.in37
-rw-r--r--doc/custom-html.xsl18
-rw-r--r--doc/custom-man.xsl9
-rw-r--r--doc/man/Makefile.in37
-rw-r--r--doc/man/PAM.825
-rw-r--r--doc/man/misc_conv.314
-rw-r--r--doc/man/misc_conv.3.xml8
-rw-r--r--doc/man/pam.38
-rw-r--r--doc/man/pam.3.xml2
-rw-r--r--doc/man/pam.82
-rw-r--r--doc/man/pam.8.xml17
-rw-r--r--doc/man/pam.conf-syntax.xml16
-rw-r--r--doc/man/pam.conf.524
-rw-r--r--doc/man/pam.d.52
-rw-r--r--doc/man/pam_acct_mgmt.36
-rw-r--r--doc/man/pam_authenticate.36
-rw-r--r--doc/man/pam_chauthtok.36
-rw-r--r--doc/man/pam_close_session.36
-rw-r--r--doc/man/pam_conv.38
-rw-r--r--doc/man/pam_conv.3.xml6
-rw-r--r--doc/man/pam_end.36
-rw-r--r--doc/man/pam_error.36
-rw-r--r--doc/man/pam_fail_delay.312
-rw-r--r--doc/man/pam_fail_delay.3.xml13
-rw-r--r--doc/man/pam_get_authtok.39
-rw-r--r--doc/man/pam_get_authtok_noverify.32
-rw-r--r--doc/man/pam_get_authtok_verify.32
-rw-r--r--doc/man/pam_get_data.36
-rw-r--r--doc/man/pam_get_item.310
-rw-r--r--doc/man/pam_get_item.3.xml4
-rw-r--r--doc/man/pam_get_user.321
-rw-r--r--doc/man/pam_get_user.3.xml25
-rw-r--r--doc/man/pam_getenv.36
-rw-r--r--doc/man/pam_getenvlist.36
-rw-r--r--doc/man/pam_info.36
-rw-r--r--doc/man/pam_misc_drop_env.36
-rw-r--r--doc/man/pam_misc_paste_env.36
-rw-r--r--doc/man/pam_misc_setenv.36
-rw-r--r--doc/man/pam_open_session.36
-rw-r--r--doc/man/pam_prompt.38
-rw-r--r--doc/man/pam_prompt.3.xml2
-rw-r--r--doc/man/pam_putenv.38
-rw-r--r--doc/man/pam_putenv.3.xml2
-rw-r--r--doc/man/pam_set_data.36
-rw-r--r--doc/man/pam_set_item.312
-rw-r--r--doc/man/pam_set_item.3.xml6
-rw-r--r--doc/man/pam_setcred.38
-rw-r--r--doc/man/pam_setcred.3.xml2
-rw-r--r--doc/man/pam_sm_acct_mgmt.312
-rw-r--r--doc/man/pam_sm_acct_mgmt.3.xml1
-rw-r--r--doc/man/pam_sm_authenticate.312
-rw-r--r--doc/man/pam_sm_authenticate.3.xml1
-rw-r--r--doc/man/pam_sm_chauthtok.312
-rw-r--r--doc/man/pam_sm_chauthtok.3.xml1
-rw-r--r--doc/man/pam_sm_close_session.312
-rw-r--r--doc/man/pam_sm_close_session.3.xml1
-rw-r--r--doc/man/pam_sm_open_session.312
-rw-r--r--doc/man/pam_sm_open_session.3.xml1
-rw-r--r--doc/man/pam_sm_setcred.312
-rw-r--r--doc/man/pam_sm_setcred.3.xml1
-rw-r--r--doc/man/pam_start.325
-rw-r--r--doc/man/pam_start.3.xml24
-rw-r--r--doc/man/pam_strerror.36
-rw-r--r--doc/man/pam_syslog.36
-rw-r--r--doc/man/pam_verror.32
-rw-r--r--doc/man/pam_vinfo.32
-rw-r--r--doc/man/pam_vprompt.32
-rw-r--r--doc/man/pam_vsyslog.32
-rw-r--r--doc/man/pam_xauth_data.36
-rw-r--r--doc/mwg/Linux-PAM_MWG.xml24
-rw-r--r--doc/mwg/Makefile.in37
-rw-r--r--doc/sag/Makefile.in37
-rw-r--r--doc/sag/pam_faillock.xml38
-rw-r--r--doc/sag/pam_setquota.xml34
-rw-r--r--doc/sag/pam_time.xml2
-rw-r--r--doc/specs/Makefile.am2
-rw-r--r--doc/specs/Makefile.in107
-rw-r--r--doc/specs/draft-morgan-pam.raw4
-rw-r--r--doc/specs/parse_l.c528
-rw-r--r--doc/specs/parse_y.c851
-rw-r--r--doc/specs/parse_y.h68
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in79
-rw-r--r--libpam/Makefile.am16
-rw-r--r--libpam/Makefile.in235
-rw-r--r--libpam/include/pam_cc_compat.h66
-rw-r--r--libpam/include/pam_inline.h67
-rw-r--r--libpam/include/security/_pam_types.h4
-rw-r--r--libpam/include/security/pam_appl.h5
-rw-r--r--libpam/include/security/pam_modutil.h6
-rw-r--r--libpam/include/test_assert.h55
-rw-r--r--libpam/libpam.map10
-rw-r--r--libpam/pam_delay.c12
-rw-r--r--libpam/pam_get_authtok.c68
-rw-r--r--libpam/pam_handlers.c95
-rw-r--r--libpam/pam_item.c62
-rw-r--r--libpam/pam_misc.c2
-rw-r--r--libpam/pam_modutil_ingroup.c25
-rw-r--r--libpam/pam_modutil_sanitize.c103
-rw-r--r--libpam/pam_modutil_searchkey.c128
-rw-r--r--libpam/pam_private.h11
-rw-r--r--libpam/pam_start.c37
-rw-r--r--libpam_misc/Makefile.am2
-rw-r--r--libpam_misc/Makefile.in72
-rw-r--r--libpam_misc/misc_conv.c4
-rw-r--r--libpamc/Makefile.am2
-rw-r--r--libpamc/Makefile.in104
-rw-r--r--libpamc/include/security/pam_client.h23
-rw-r--r--libpamc/libpamc.h3
-rw-r--r--libpamc/pamc_converse.c8
-rw-r--r--libpamc/pamc_load.c2
-rw-r--r--libpamc/test/Makefile.in37
-rw-r--r--libpamc/test/regress/test.libpamc.c3
-rw-r--r--m4/libprelude.m46
-rw-r--r--m4/libtool.m42690
-rw-r--r--m4/ltoptions.m4127
-rw-r--r--m4/ltsugar.m47
-rw-r--r--m4/ltversion.m412
-rw-r--r--m4/lt~obsolete.m47
-rw-r--r--modules/Makefile.am107
-rw-r--r--modules/Makefile.in120
-rw-r--r--modules/pam_access/Makefile.am21
-rw-r--r--modules/pam_access/Makefile.in146
-rw-r--r--modules/pam_access/README4
-rw-r--r--modules/pam_access/access.conf.512
-rw-r--r--modules/pam_access/access.conf.5.xml6
-rw-r--r--modules/pam_access/pam_access.86
-rw-r--r--modules/pam_access/pam_access.c66
-rw-r--r--modules/pam_cracklib/Makefile.am20
-rw-r--r--modules/pam_cracklib/Makefile.in117
-rw-r--r--modules/pam_cracklib/README9
-rw-r--r--modules/pam_cracklib/pam_cracklib.810
-rw-r--r--modules/pam_cracklib/pam_cracklib.8.xml4
-rw-r--r--modules/pam_cracklib/pam_cracklib.c99
-rw-r--r--modules/pam_debug/Makefile.am19
-rw-r--r--modules/pam_debug/Makefile.in150
-rw-r--r--modules/pam_debug/pam_debug.86
-rw-r--r--modules/pam_debug/pam_debug.c49
-rw-r--r--modules/pam_debug/tst-pam_debug-retval.c65
-rw-r--r--modules/pam_deny/Makefile.am23
-rw-r--r--modules/pam_deny/Makefile.in150
-rw-r--r--modules/pam_deny/pam_deny.86
-rw-r--r--modules/pam_deny/pam_deny.c18
-rw-r--r--modules/pam_deny/tst-pam_deny-retval.c58
-rw-r--r--modules/pam_echo/Makefile.am20
-rw-r--r--modules/pam_echo/Makefile.in150
-rw-r--r--modules/pam_echo/pam_echo.86
-rw-r--r--modules/pam_echo/pam_echo.c11
-rw-r--r--modules/pam_echo/tst-pam_echo-retval.c101
-rw-r--r--modules/pam_env/Makefile.am20
-rw-r--r--modules/pam_env/Makefile.in151
-rw-r--r--modules/pam_env/README14
-rw-r--r--modules/pam_env/environment.52
-rw-r--r--modules/pam_env/pam_env.814
-rw-r--r--modules/pam_env/pam_env.8.xml8
-rw-r--r--modules/pam_env/pam_env.c123
-rw-r--r--modules/pam_env/pam_env.conf2
-rw-r--r--modules/pam_env/pam_env.conf.56
-rw-r--r--modules/pam_exec/Makefile.am20
-rw-r--r--modules/pam_exec/Makefile.in112
-rw-r--r--modules/pam_exec/README2
-rw-r--r--modules/pam_exec/pam_exec.823
-rw-r--r--modules/pam_exec/pam_exec.8.xml31
-rw-r--r--modules/pam_exec/pam_exec.c69
-rw-r--r--modules/pam_faildelay/Makefile.am19
-rw-r--r--modules/pam_faildelay/Makefile.in151
-rw-r--r--modules/pam_faildelay/pam_faildelay.86
-rw-r--r--modules/pam_faildelay/pam_faildelay.c82
-rw-r--r--modules/pam_faildelay/tst-pam_faildelay-retval.c88
-rw-r--r--modules/pam_faillock/Makefile.am50
-rw-r--r--modules/pam_faillock/Makefile.in1340
-rw-r--r--modules/pam_faillock/README140
-rw-r--r--modules/pam_faillock/README.xml46
-rw-r--r--modules/pam_faillock/faillock.878
-rw-r--r--modules/pam_faillock/faillock.8.xml123
-rw-r--r--modules/pam_faillock/faillock.c161
-rw-r--r--modules/pam_faillock/faillock.conf62
-rw-r--r--modules/pam_faillock/faillock.conf.5166
-rw-r--r--modules/pam_faillock/faillock.conf.5.xml243
-rw-r--r--modules/pam_faillock/faillock.h75
-rw-r--r--modules/pam_faillock/main.c232
-rw-r--r--modules/pam_faillock/pam_faillock.8262
-rw-r--r--modules/pam_faillock/pam_faillock.8.xml362
-rw-r--r--modules/pam_faillock/pam_faillock.c775
-rwxr-xr-xmodules/pam_faillock/tst-pam_faillock2
-rw-r--r--modules/pam_filter/Makefile.am15
-rw-r--r--modules/pam_filter/Makefile.in104
-rw-r--r--modules/pam_filter/pam_filter.86
-rw-r--r--modules/pam_filter/pam_filter.c60
-rw-r--r--modules/pam_filter/upperLOWER/Makefile.am2
-rw-r--r--modules/pam_filter/upperLOWER/Makefile.in87
-rw-r--r--modules/pam_ftp/Makefile.am16
-rw-r--r--modules/pam_ftp/Makefile.in112
-rw-r--r--modules/pam_ftp/pam_ftp.86
-rw-r--r--modules/pam_ftp/pam_ftp.c34
-rw-r--r--modules/pam_group/Makefile.am17
-rw-r--r--modules/pam_group/Makefile.in146
-rw-r--r--modules/pam_group/group.conf.58
-rw-r--r--modules/pam_group/group.conf.5.xml6
-rw-r--r--modules/pam_group/pam_group.86
-rw-r--r--modules/pam_group/pam_group.c20
-rw-r--r--modules/pam_issue/Makefile.am16
-rw-r--r--modules/pam_issue/Makefile.in112
-rw-r--r--modules/pam_issue/pam_issue.86
-rw-r--r--modules/pam_issue/pam_issue.c74
-rw-r--r--modules/pam_keyinit/Makefile.am29
-rw-r--r--modules/pam_keyinit/Makefile.in118
-rw-r--r--modules/pam_keyinit/README25
-rw-r--r--modules/pam_keyinit/pam_keyinit.830
-rw-r--r--modules/pam_keyinit/pam_keyinit.8.xml41
-rw-r--r--modules/pam_keyinit/pam_keyinit.c146
-rw-r--r--modules/pam_lastlog/Makefile.am20
-rw-r--r--modules/pam_lastlog/Makefile.in114
-rw-r--r--modules/pam_lastlog/README15
-rw-r--r--modules/pam_lastlog/pam_lastlog.830
-rw-r--r--modules/pam_lastlog/pam_lastlog.8.xml31
-rw-r--r--modules/pam_lastlog/pam_lastlog.c162
-rw-r--r--modules/pam_limits/Makefile.am23
-rw-r--r--modules/pam_limits/Makefile.in143
-rw-r--r--modules/pam_limits/README4
-rw-r--r--modules/pam_limits/limits.conf.511
-rw-r--r--modules/pam_limits/pam_limits.88
-rw-r--r--modules/pam_limits/pam_limits.8.xml4
-rw-r--r--modules/pam_limits/pam_limits.c24
-rw-r--r--modules/pam_listfile/Makefile.am16
-rw-r--r--modules/pam_listfile/Makefile.in112
-rw-r--r--modules/pam_listfile/pam_listfile.86
-rw-r--r--modules/pam_listfile/pam_listfile.c43
-rw-r--r--modules/pam_localuser/Makefile.am19
-rw-r--r--modules/pam_localuser/Makefile.in151
-rw-r--r--modules/pam_localuser/pam_localuser.823
-rw-r--r--modules/pam_localuser/pam_localuser.8.xml31
-rw-r--r--modules/pam_localuser/pam_localuser.c188
-rw-r--r--modules/pam_localuser/tst-pam_localuser-retval.c144
-rw-r--r--modules/pam_loginuid/Makefile.am20
-rw-r--r--modules/pam_loginuid/Makefile.in112
-rw-r--r--modules/pam_loginuid/pam_loginuid.86
-rw-r--r--modules/pam_loginuid/pam_loginuid.c12
-rw-r--r--modules/pam_mail/Makefile.am16
-rw-r--r--modules/pam_mail/Makefile.in112
-rw-r--r--modules/pam_mail/pam_mail.86
-rw-r--r--modules/pam_mail/pam_mail.c33
-rw-r--r--modules/pam_mkhomedir/Makefile.am19
-rw-r--r--modules/pam_mkhomedir/Makefile.in229
-rw-r--r--modules/pam_mkhomedir/mkhomedir_helper.86
-rw-r--r--modules/pam_mkhomedir/mkhomedir_helper.c2
-rw-r--r--modules/pam_mkhomedir/pam_mkhomedir.819
-rw-r--r--modules/pam_mkhomedir/pam_mkhomedir.8.xml25
-rw-r--r--modules/pam_mkhomedir/pam_mkhomedir.c30
-rw-r--r--modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c110
-rw-r--r--modules/pam_motd/Makefile.am16
-rw-r--r--modules/pam_motd/Makefile.in112
-rw-r--r--modules/pam_motd/README46
-rw-r--r--modules/pam_motd/pam_motd.889
-rw-r--r--modules/pam_motd/pam_motd.8.xml88
-rw-r--r--modules/pam_motd/pam_motd.c312
-rw-r--r--modules/pam_namespace/Makefile.am37
-rw-r--r--modules/pam_namespace/Makefile.in287
-rw-r--r--modules/pam_namespace/README5
-rw-r--r--modules/pam_namespace/md5.c6
-rw-r--r--modules/pam_namespace/md5.h4
-rw-r--r--modules/pam_namespace/namespace.conf5
-rw-r--r--modules/pam_namespace/namespace.conf.521
-rw-r--r--modules/pam_namespace/namespace.conf.5.xml11
-rw-r--r--modules/pam_namespace/pam_namespace.86
-rw-r--r--modules/pam_namespace/pam_namespace.c90
-rw-r--r--modules/pam_namespace/pam_namespace.h5
-rw-r--r--modules/pam_namespace/pam_namespace.service.in11
-rw-r--r--modules/pam_namespace/pam_namespace_helper.849
-rw-r--r--modules/pam_namespace/pam_namespace_helper.8.xml62
-rw-r--r--modules/pam_namespace/pam_namespace_helper.in15
-rw-r--r--modules/pam_nologin/Makefile.am19
-rw-r--r--modules/pam_nologin/Makefile.in151
-rw-r--r--modules/pam_nologin/pam_nologin.88
-rw-r--r--modules/pam_nologin/pam_nologin.8.xml2
-rw-r--r--modules/pam_nologin/pam_nologin.c26
-rw-r--r--modules/pam_nologin/tst-pam_nologin-retval.c226
-rw-r--r--modules/pam_permit/Makefile.am19
-rw-r--r--modules/pam_permit/Makefile.in150
-rw-r--r--modules/pam_permit/pam_permit.86
-rw-r--r--modules/pam_permit/pam_permit.c24
-rw-r--r--modules/pam_permit/tst-pam_permit-retval.c58
-rw-r--r--modules/pam_pwhistory/Makefile.am17
-rw-r--r--modules/pam_pwhistory/Makefile.in118
-rw-r--r--modules/pam_pwhistory/opasswd.c8
-rw-r--r--modules/pam_pwhistory/pam_pwhistory.89
-rw-r--r--modules/pam_pwhistory/pam_pwhistory.c26
-rw-r--r--modules/pam_rhosts/Makefile.am17
-rw-r--r--modules/pam_rhosts/Makefile.in112
-rw-r--r--modules/pam_rhosts/pam_rhosts.86
-rw-r--r--modules/pam_rhosts/pam_rhosts.c17
-rw-r--r--modules/pam_rootok/Makefile.am22
-rw-r--r--modules/pam_rootok/Makefile.in156
-rw-r--r--modules/pam_rootok/pam_rootok.811
-rw-r--r--modules/pam_rootok/pam_rootok.8.xml2
-rw-r--r--modules/pam_rootok/pam_rootok.c20
-rw-r--r--modules/pam_rootok/tst-pam_rootok-retval.c72
-rw-r--r--modules/pam_securetty/Makefile.am16
-rw-r--r--modules/pam_securetty/Makefile.in112
-rw-r--r--modules/pam_securetty/README13
-rw-r--r--modules/pam_securetty/pam_securetty.837
-rw-r--r--modules/pam_securetty/pam_securetty.8.xml37
-rw-r--r--modules/pam_securetty/pam_securetty.c71
-rw-r--r--modules/pam_selinux/Makefile.am27
-rw-r--r--modules/pam_selinux/Makefile.in144
-rw-r--r--modules/pam_selinux/pam_selinux.86
-rw-r--r--modules/pam_selinux/pam_selinux.c164
-rw-r--r--modules/pam_sepermit/Makefile.am22
-rw-r--r--modules/pam_sepermit/Makefile.in152
-rw-r--r--modules/pam_sepermit/pam_sepermit.89
-rw-r--r--modules/pam_sepermit/pam_sepermit.c17
-rw-r--r--modules/pam_sepermit/sepermit.conf.56
-rw-r--r--modules/pam_setquota/Makefile.am29
-rw-r--r--modules/pam_setquota/Makefile.in1142
-rw-r--r--modules/pam_setquota/README80
-rw-r--r--modules/pam_setquota/README.xml41
-rw-r--r--modules/pam_setquota/pam_setquota.8186
-rw-r--r--modules/pam_setquota/pam_setquota.8.xml301
-rw-r--r--modules/pam_setquota/pam_setquota.c389
-rwxr-xr-xmodules/pam_setquota/tst-pam_setquota2
-rw-r--r--modules/pam_shells/Makefile.am16
-rw-r--r--modules/pam_shells/Makefile.in112
-rw-r--r--modules/pam_shells/pam_shells.86
-rw-r--r--modules/pam_shells/pam_shells.c39
-rw-r--r--modules/pam_stress/Makefile.am8
-rw-r--r--modules/pam_stress/Makefile.in107
-rw-r--r--modules/pam_stress/README2
-rw-r--r--modules/pam_stress/pam_stress.c31
-rw-r--r--modules/pam_succeed_if/Makefile.am17
-rw-r--r--modules/pam_succeed_if/Makefile.in112
-rw-r--r--modules/pam_succeed_if/README13
-rw-r--r--modules/pam_succeed_if/pam_succeed_if.818
-rw-r--r--modules/pam_succeed_if/pam_succeed_if.8.xml12
-rw-r--r--modules/pam_succeed_if/pam_succeed_if.c123
-rw-r--r--modules/pam_tally/Makefile.am16
-rw-r--r--modules/pam_tally/Makefile.in189
-rw-r--r--modules/pam_tally/README4
-rw-r--r--modules/pam_tally/faillog.h4
-rw-r--r--modules/pam_tally/pam_tally.810
-rw-r--r--modules/pam_tally/pam_tally.8.xml2
-rw-r--r--modules/pam_tally/pam_tally.c84
-rw-r--r--modules/pam_tally2/Makefile.am16
-rw-r--r--modules/pam_tally2/Makefile.in189
-rw-r--r--modules/pam_tally2/README4
-rw-r--r--modules/pam_tally2/pam_tally2.810
-rw-r--r--modules/pam_tally2/pam_tally2.8.xml2
-rw-r--r--modules/pam_tally2/pam_tally2.c86
-rw-r--r--modules/pam_time/Makefile.am17
-rw-r--r--modules/pam_time/Makefile.in146
-rw-r--r--modules/pam_time/README2
-rw-r--r--modules/pam_time/pam_time.817
-rw-r--r--modules/pam_time/pam_time.8.xml15
-rw-r--r--modules/pam_time/pam_time.c80
-rw-r--r--modules/pam_time/time.conf.58
-rw-r--r--modules/pam_time/time.conf.5.xml6
-rw-r--r--modules/pam_timestamp/Makefile.am23
-rw-r--r--modules/pam_timestamp/Makefile.in224
-rw-r--r--modules/pam_timestamp/hmacfile.c10
-rw-r--r--modules/pam_timestamp/hmacsha1.c1
-rw-r--r--modules/pam_timestamp/pam_timestamp.86
-rw-r--r--modules/pam_timestamp/pam_timestamp.c36
-rw-r--r--modules/pam_timestamp/pam_timestamp_check.88
-rw-r--r--modules/pam_timestamp/pam_timestamp_check.8.xml2
-rw-r--r--modules/pam_timestamp/sha1.c46
-rw-r--r--modules/pam_timestamp/sha1.h8
-rw-r--r--modules/pam_tty_audit/Makefile.am21
-rw-r--r--modules/pam_tty_audit/Makefile.in123
-rw-r--r--modules/pam_tty_audit/README6
-rw-r--r--modules/pam_tty_audit/pam_tty_audit.810
-rw-r--r--modules/pam_tty_audit/pam_tty_audit.8.xml7
-rw-r--r--modules/pam_tty_audit/pam_tty_audit.c27
-rw-r--r--modules/pam_umask/Makefile.am17
-rw-r--r--modules/pam_umask/Makefile.in112
-rw-r--r--modules/pam_umask/README6
-rw-r--r--modules/pam_umask/pam_umask.828
-rw-r--r--modules/pam_umask/pam_umask.8.xml45
-rw-r--r--modules/pam_umask/pam_umask.c125
-rw-r--r--modules/pam_unix/CHANGELOG18
-rw-r--r--modules/pam_unix/Makefile.am20
-rw-r--r--modules/pam_unix/Makefile.in300
-rw-r--r--modules/pam_unix/README34
-rw-r--r--modules/pam_unix/bigcrypt.c2
-rw-r--r--modules/pam_unix/md5.c7
-rw-r--r--modules/pam_unix/md5.h4
-rw-r--r--modules/pam_unix/md5_crypt.c5
-rw-r--r--modules/pam_unix/pam_unix.845
-rw-r--r--modules/pam_unix/pam_unix.8.xml69
-rw-r--r--modules/pam_unix/pam_unix_acct.c57
-rw-r--r--modules/pam_unix/pam_unix_auth.c26
-rw-r--r--modules/pam_unix/pam_unix_passwd.c62
-rw-r--r--modules/pam_unix/pam_unix_sess.c43
-rw-r--r--modules/pam_unix/passverify.c133
-rw-r--r--modules/pam_unix/passverify.h8
-rw-r--r--modules/pam_unix/support.c200
-rw-r--r--modules/pam_unix/support.h113
-rw-r--r--modules/pam_unix/unix_chkpwd.86
-rw-r--r--modules/pam_unix/unix_chkpwd.c11
-rw-r--r--modules/pam_unix/unix_update.86
-rw-r--r--modules/pam_userdb/Makefile.am22
-rw-r--r--modules/pam_userdb/Makefile.in123
-rw-r--r--modules/pam_userdb/pam_userdb.86
-rw-r--r--modules/pam_userdb/pam_userdb.c39
-rw-r--r--modules/pam_usertype/Makefile.am34
-rw-r--r--modules/pam_usertype/Makefile.in1147
-rw-r--r--modules/pam_usertype/README48
-rw-r--r--modules/pam_usertype/README.xml41
-rw-r--r--modules/pam_usertype/pam_usertype.8135
-rw-r--r--modules/pam_usertype/pam_usertype.8.xml199
-rw-r--r--modules/pam_usertype/pam_usertype.c308
-rwxr-xr-xmodules/pam_usertype/tst-pam_usertype2
-rw-r--r--modules/pam_warn/Makefile.am19
-rw-r--r--modules/pam_warn/Makefile.in150
-rw-r--r--modules/pam_warn/pam_warn.86
-rw-r--r--modules/pam_warn/pam_warn.c14
-rw-r--r--modules/pam_warn/tst-pam_warn-retval.c88
-rw-r--r--modules/pam_wheel/Makefile.am16
-rw-r--r--modules/pam_wheel/Makefile.in112
-rw-r--r--modules/pam_wheel/README2
-rw-r--r--modules/pam_wheel/pam_wheel.88
-rw-r--r--modules/pam_wheel/pam_wheel.8.xml4
-rw-r--r--modules/pam_wheel/pam_wheel.c18
-rw-r--r--modules/pam_xauth/Makefile.am16
-rw-r--r--modules/pam_xauth/Makefile.in112
-rw-r--r--modules/pam_xauth/pam_xauth.86
-rw-r--r--modules/pam_xauth/pam_xauth.c53
-rw-r--r--po/LINGUAS17
-rw-r--r--po/Linux-PAM.pot265
-rw-r--r--po/Makevars2
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/af.gmobin525 -> 494 bytes
-rw-r--r--po/af.po268
-rw-r--r--po/am.gmobin522 -> 491 bytes
-rw-r--r--po/am.po268
-rw-r--r--po/anp.gmobin424 -> 0 bytes
-rw-r--r--po/anp.po564
-rw-r--r--po/ar.gmobin9024 -> 7955 bytes
-rw-r--r--po/ar.po295
-rw-r--r--po/as.gmobin16552 -> 13006 bytes
-rw-r--r--po/as.po302
-rw-r--r--po/ast.gmobin526 -> 0 bytes
-rw-r--r--po/ast.po568
-rw-r--r--po/az.gmobin0 -> 1996 bytes
-rw-r--r--po/az.po (renamed from po/kw.po)317
-rw-r--r--po/bal.gmobin502 -> 0 bytes
-rw-r--r--po/bal.po567
-rw-r--r--po/be.gmobin600 -> 569 bytes
-rw-r--r--po/be.po268
-rw-r--r--po/bg.gmobin14311 -> 11504 bytes
-rw-r--r--po/bg.po301
-rw-r--r--po/bn.gmobin17176 -> 13587 bytes
-rw-r--r--po/bn.po301
-rw-r--r--po/bn_IN.gmobin17180 -> 13591 bytes
-rw-r--r--po/bn_IN.po301
-rw-r--r--po/bo.gmobin516 -> 0 bytes
-rw-r--r--po/bo.po566
-rw-r--r--po/br.gmobin521 -> 0 bytes
-rw-r--r--po/br.po568
-rw-r--r--po/brx.gmobin522 -> 0 bytes
-rw-r--r--po/brx.po568
-rw-r--r--po/bs.gmobin597 -> 566 bytes
-rw-r--r--po/bs.po268
-rw-r--r--po/ca.gmobin11559 -> 12189 bytes
-rw-r--r--po/ca.po353
-rw-r--r--po/cs.gmobin11602 -> 12016 bytes
-rw-r--r--po/cs.po329
-rw-r--r--po/cy.gmobin566 -> 535 bytes
-rw-r--r--po/cy.po268
-rw-r--r--po/da.gmobin10943 -> 11797 bytes
-rw-r--r--po/da.po344
-rw-r--r--po/de.gmobin11500 -> 11986 bytes
-rw-r--r--po/de.po310
-rw-r--r--po/de_CH.gmobin542 -> 511 bytes
-rw-r--r--po/de_CH.po268
-rw-r--r--po/el.gmobin498 -> 467 bytes
-rw-r--r--po/el.po268
-rw-r--r--po/en_GB.gmobin546 -> 0 bytes
-rw-r--r--po/en_GB.po568
-rw-r--r--po/eo.gmobin525 -> 494 bytes
-rw-r--r--po/eo.po268
-rw-r--r--po/es.gmobin12004 -> 9682 bytes
-rw-r--r--po/es.po327
-rw-r--r--po/et.gmobin3212 -> 2764 bytes
-rw-r--r--po/et.po289
-rw-r--r--po/eu.gmobin923 -> 1015 bytes
-rw-r--r--po/eu.po275
-rw-r--r--po/fa.gmobin516 -> 485 bytes
-rw-r--r--po/fa.po268
-rw-r--r--po/fi.gmobin11377 -> 11031 bytes
-rw-r--r--po/fi.po324
-rw-r--r--po/fr.gmobin11762 -> 12820 bytes
-rw-r--r--po/fr.po406
-rw-r--r--po/ga.gmobin12240 -> 9758 bytes
-rw-r--r--po/ga.po302
-rw-r--r--po/gl.gmobin524 -> 493 bytes
-rw-r--r--po/gl.po268
-rw-r--r--po/gu.gmobin16417 -> 13074 bytes
-rw-r--r--po/gu.po301
-rw-r--r--po/he.gmobin4380 -> 2889 bytes
-rw-r--r--po/he.po289
-rw-r--r--po/hi.gmobin15579 -> 12447 bytes
-rw-r--r--po/hi.po313
-rw-r--r--po/hr.gmobin596 -> 565 bytes
-rw-r--r--po/hr.po268
-rw-r--r--po/hu.gmobin11373 -> 9185 bytes
-rw-r--r--po/hu.po315
-rw-r--r--po/ia.gmobin11514 -> 9268 bytes
-rw-r--r--po/ia.po302
-rw-r--r--po/id.gmobin4424 -> 4136 bytes
-rw-r--r--po/id.po291
-rw-r--r--po/ilo.gmobin523 -> 0 bytes
-rw-r--r--po/ilo.po568
-rw-r--r--po/is.gmobin525 -> 494 bytes
-rw-r--r--po/is.po268
-rw-r--r--po/it.gmobin11285 -> 11823 bytes
-rw-r--r--po/it.po381
-rw-r--r--po/ja.gmobin12397 -> 9940 bytes
-rw-r--r--po/ja.po313
-rw-r--r--po/ka.gmobin3350 -> 3293 bytes
-rw-r--r--po/ka.po285
-rw-r--r--po/kk.gmobin14216 -> 11518 bytes
-rw-r--r--po/kk.po314
-rw-r--r--po/km.gmobin12592 -> 10771 bytes
-rw-r--r--po/km.po295
-rw-r--r--po/kn.gmobin17598 -> 13861 bytes
-rw-r--r--po/kn.po301
-rw-r--r--po/ko.gmobin11366 -> 9240 bytes
-rw-r--r--po/ko.po301
-rw-r--r--po/kw.gmobin459 -> 0 bytes
-rw-r--r--po/kw@kkcor.gmobin486 -> 0 bytes
-rw-r--r--po/kw@kkcor.po565
-rw-r--r--po/kw@uccor.gmobin487 -> 0 bytes
-rw-r--r--po/kw@uccor.po565
-rw-r--r--po/kw_GB.gmobin479 -> 448 bytes
-rw-r--r--po/kw_GB.po264
-rw-r--r--po/ky.gmobin515 -> 484 bytes
-rw-r--r--po/ky.po268
-rw-r--r--po/lt.gmobin589 -> 558 bytes
-rw-r--r--po/lt.po268
-rw-r--r--po/lv.gmobin558 -> 527 bytes
-rw-r--r--po/lv.po268
-rw-r--r--po/mai.gmobin526 -> 0 bytes
-rw-r--r--po/mai.po568
-rw-r--r--po/mk.gmobin556 -> 525 bytes
-rw-r--r--po/mk.po268
-rw-r--r--po/ml.gmobin20368 -> 15749 bytes
-rw-r--r--po/ml.po301
-rw-r--r--po/mn.gmobin525 -> 494 bytes
-rw-r--r--po/mn.po268
-rw-r--r--po/mr.gmobin16727 -> 13288 bytes
-rw-r--r--po/mr.po301
-rw-r--r--po/ms.gmobin563 -> 532 bytes
-rw-r--r--po/ms.po279
-rw-r--r--po/my.gmobin516 -> 485 bytes
-rw-r--r--po/my.po268
-rw-r--r--po/nb.gmobin10769 -> 11581 bytes
-rw-r--r--po/nb.po324
-rw-r--r--po/nds.gmobin507 -> 0 bytes
-rw-r--r--po/nds.po567
-rw-r--r--po/ne.gmobin522 -> 491 bytes
-rw-r--r--po/ne.po268
-rw-r--r--po/nl.gmobin11265 -> 11750 bytes
-rw-r--r--po/nl.po374
-rw-r--r--po/nn.gmobin504 -> 473 bytes
-rw-r--r--po/nn.po268
-rw-r--r--po/nso.gmobin531 -> 0 bytes
-rw-r--r--po/nso.po568
-rw-r--r--po/or.gmobin17799 -> 18696 bytes
-rw-r--r--po/or.po327
-rw-r--r--po/pa.gmobin15741 -> 12506 bytes
-rw-r--r--po/pa.po301
-rw-r--r--po/pl.gmobin11837 -> 12236 bytes
-rw-r--r--po/pl.po350
-rw-r--r--po/pt.gmobin11579 -> 12413 bytes
-rw-r--r--po/pt.po356
-rw-r--r--po/pt_BR.gmobin11156 -> 11561 bytes
-rw-r--r--po/pt_BR.po335
-rw-r--r--po/ro.gmobin565 -> 534 bytes
-rw-r--r--po/ro.po268
-rw-r--r--po/ru.gmobin15084 -> 15994 bytes
-rw-r--r--po/ru.po335
-rw-r--r--po/si.gmobin12255 -> 10236 bytes
-rw-r--r--po/si.po316
-rw-r--r--po/sk.gmobin11328 -> 11788 bytes
-rw-r--r--po/sk.po325
-rw-r--r--po/sl.gmobin577 -> 546 bytes
-rw-r--r--po/sl.po268
-rw-r--r--po/sq.gmobin524 -> 493 bytes
-rw-r--r--po/sq.po268
-rw-r--r--po/sr.gmobin14351 -> 11558 bytes
-rw-r--r--po/sr.po302
-rw-r--r--po/sr@latin.gmobin10986 -> 8742 bytes
-rw-r--r--po/sr@latin.po303
-rw-r--r--po/sv.gmobin11041 -> 11832 bytes
-rw-r--r--po/sv.po338
-rw-r--r--po/ta.gmobin17474 -> 13871 bytes
-rw-r--r--po/ta.po315
-rw-r--r--po/te.gmobin17419 -> 13868 bytes
-rw-r--r--po/te.po301
-rw-r--r--po/tg.gmobin521 -> 490 bytes
-rw-r--r--po/tg.po268
-rw-r--r--po/th.gmobin513 -> 482 bytes
-rw-r--r--po/th.po268
-rw-r--r--po/tr.gmobin11229 -> 11983 bytes
-rw-r--r--po/tr.po358
-rw-r--r--po/tw.gmobin413 -> 0 bytes
-rw-r--r--po/tw.po564
-rw-r--r--po/uk.gmobin15111 -> 15849 bytes
-rw-r--r--po/uk.po327
-rw-r--r--po/ur.gmobin499 -> 468 bytes
-rw-r--r--po/ur.po268
-rw-r--r--po/vi.gmobin11675 -> 9369 bytes
-rw-r--r--po/vi.po302
-rw-r--r--po/wba.gmobin414 -> 0 bytes
-rw-r--r--po/wba.po564
-rw-r--r--po/yo.gmobin423 -> 392 bytes
-rw-r--r--po/yo.po269
-rw-r--r--po/zh_CN.gmobin10276 -> 8433 bytes
-rw-r--r--po/zh_CN.po316
-rw-r--r--po/zh_HK.gmobin507 -> 476 bytes
-rw-r--r--po/zh_HK.po268
-rw-r--r--po/zh_TW.gmobin10386 -> 11086 bytes
-rw-r--r--po/zh_TW.po329
-rw-r--r--po/zu.gmobin7853 -> 6904 bytes
-rw-r--r--po/zu.po313
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/Makefile.in187
-rw-r--r--tests/confdir1
-rw-r--r--tests/tst-pam_get_item.c10
-rw-r--r--tests/tst-pam_mkargv.c8
-rw-r--r--tests/tst-pam_set_data.c2
-rw-r--r--tests/tst-pam_set_item.c8
-rw-r--r--tests/tst-pam_start_confdir.c99
-rw-r--r--xtests/Makefile.am10
-rw-r--r--xtests/Makefile.in220
-rwxr-xr-xxtests/run-xtests.sh8
-rw-r--r--xtests/tst-pam_motd.c69
-rwxr-xr-xxtests/tst-pam_motd.sh8
-rw-r--r--xtests/tst-pam_motd1.pamd3
-rwxr-xr-xxtests/tst-pam_motd1.sh36
-rw-r--r--xtests/tst-pam_motd2.pamd3
-rwxr-xr-xxtests/tst-pam_motd2.sh53
-rw-r--r--xtests/tst-pam_motd3.pamd3
-rwxr-xr-xxtests/tst-pam_motd3.sh53
-rw-r--r--xtests/tst-pam_motd4.pamd3
-rwxr-xr-xxtests/tst-pam_motd4.sh27
-rw-r--r--xtests/tst-pam_pwhistory1.c12
-rw-r--r--xtests/tst-pam_time1.c7
679 files changed, 48284 insertions, 34379 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e135be7..78690bfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,3738 @@
+2020-06-04 Dmitry V. Levin <ldv@altlinux.org>
+
+ maint: document release procedure.
+ * maint/README-release: New file.
+
+ maint: introduce gen-tag-message.
+ * maint/gen-tag-message: New script for preparing tag message.
+
+ maint: introduce make-dist.
+ * maint/make-dist: New script for preparing release tarballs.
+
+2020-06-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ gitlog-to-changelog: update from gnulib.
+
+2020-05-29 Josef Möllers <jmoellers@suse.de>
+ Tomáš Mráz <tmraz@redhat.com>
+ Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: skip mountpoints equal to the user's $HOME.
+ Matthias Gerstner found the following issue:
+
+ <quote>
+ So this pam_setquota module iterates over all mounted file systems using
+ `setmntent()` and `getmntent()`. It tries to find the longest match of
+ a file system mounted on /home/$USER or above (except when the
+ fs=/some/path parameter is passed to the pam module).
+
+ The thing is that /home/$USER is owned by the unprivileged user. And
+ there exist tools like fusermount from libfuse which is by default
+ installed setuid-root for everybody. fusermount allows to mount a FUSE
+ file system using an arbitrary "source device name" as the unprivileged
+ user.
+
+ Thus considering the following use case:
+
+ 1) there is only the root file system (/) or a file system is mounted on
+ /home, but not on /home/$USER.
+ 2) the attacker mounts a fake FUSE file system over its own home directory:
+
+ ```
+ user $ export _FUSE_COMMFD=0
+ user $ fusermount $HOME -ononempty,fsname=/dev/sda1
+ ```
+
+ This will result in a mount entry in /proc/mounts looking like this:
+
+ ```
+ /dev/sda1 on /home/$USER type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
+ ```
+ 3) when the attacker now logs in with pam_setquota configured then
+ pam_setquota will identify /dev/sda1 and the file system where
+ to apply the user's quota on.
+
+ As a result an unprivileged user has full control over onto which block
+ device the quota is applied.
+ </quote>
+
+ If the user's $HOME is on a separate partition, setting a quota on the
+ user's $HOME does not really make sense, so this patch skips mountpoints
+ equal to the user's $HOME, preventing the above mentioned bug as
+ a side-effect (or vice-versa).
+
+ Reported-by: Matthias Gerstner <mgerstner@suse.de>
+ Resolves: https://github.com/linux-pam/linux-pam/pull/230
+
+2020-05-25 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_debug: do not invoke pam_get_user and do not set PAM_USER.
+ pam_debug used to invoke pam_get_user and set PAM_USER to "nobody" when
+ pam_get_user returns an empty string as the user name. When either of
+ these functions returned an error value, it used to return that error
+ value. This hasn't been documented, and I couldn't find any rationale
+ for this behaviour.
+
+ * modules/pam_debug/pam_debug.c (pam_sm_authenticate): Do not invoke
+ pam_get_user and pam_set_item.
+
+2020-05-24 Yi-Jyun Pan <pan93412@gmail.com>
+
+ Translated using Weblate (Chinese (Traditional))
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/zh_TW/
+
+2020-05-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules: downgrade syslog level for errors related to pam_get_user.
+ * modules/pam_faillock/pam_faillock.c (get_pam_user): Downgrade
+ the syslog level for diagnostics of errors returned by
+ pam_modutil_getpwnam for users returned by pam_get_user
+ from LOG_ERR to LOG_NOTICE.
+ * modules/pam_keyinit/pam_keyinit.c (do_keyinit): Likewise.
+ * modules/pam_lastlog/pam_lastlog.c (pam_sm_authenticate): Likewise.
+ * modules/pam_listfile/pam_listfile.c (pam_sm_authenticate): Likewise.
+ * modules/pam_loginuid/pam_loginuid.c (_pam_loginuid): Likewise.
+ * modules/pam_mail/pam_mail.c (_do_mail): Likewise.
+ * modules/pam_sepermit/pam_sepermit.c (sepermit_lock): Likewise.
+ * modules/pam_tally/pam_tally.c (pam_get_uid): Likewise.
+ * modules/pam_tally2/pam_tally2.c (pam_get_uid): Likewise.
+ * modules/pam_umask/pam_umask.c (pam_sm_open_session): Likewise.
+ * modules/pam_xauth/pam_xauth.c (pam_sm_open_session,
+ pam_sm_close_session): Likewise.
+ * modules/pam_tty_audit/pam_tty_audit.c (pam_sm_open_session): Downgrade
+ the syslog level for diagnostics of errors returned by
+ pam_modutil_getpwnam for users returned by pam_get_user
+ from LOG_WARNING to LOG_NOTICE.
+
+ Suggested-by: Tomáš Mráz <tmraz@fedoraproject.org>
+
+2020-05-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules: downgrade syslog level for pam_get_user errors.
+ * modules/pam_access/pam_access.c (pam_sm_authenticate): Downgrade
+ the syslog level for pam_get_user errors from LOG_ERR to LOG_NOTICE.
+ * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass): Likewise.
+ * modules/pam_ftp/pam_ftp.c (pam_sm_authenticate): Likewise.
+ * modules/pam_group/pam_group.c (pam_sm_setcred): Likewise.
+ * modules/pam_lastlog/pam_lastlog.c (pam_sm_authenticate): Likewise.
+ * modules/pam_loginuid/pam_loginuid.c (_pam_loginuid): Likewise.
+ * modules/pam_mail/pam_mail.c (_do_mail): Likewise.
+ * modules/pam_nologin/pam_nologin.c (perform_check): Likewise.
+ * modules/pam_rhosts/pam_rhosts.c (pam_sm_authenticate): Likewise.
+ * modules/pam_sepermit/pam_sepermit.c (pam_sm_authenticate): Likewise.
+ * modules/pam_succeed_if/pam_succeed_if.c (pam_sm_authenticate): Likewise.
+ * modules/pam_tally/pam_tally.c (pam_get_uid): Likewise.
+ * modules/pam_tally2/pam_tally2.c (pam_get_uid): Likewise.
+ * modules/pam_time/pam_time.c (pam_sm_acct_mgmt): Likewise.
+ * modules/pam_tty_audit/pam_tty_audit.c (pam_sm_open_session): Likewise.
+ * modules/pam_umask/pam_umask.c (pam_sm_open_session): Likewise.
+ * modules/pam_userdb/pam_userdb.c (pam_sm_authenticate,
+ pam_sm_acct_mgmt): Likewise.
+ * modules/pam_usertype/pam_usertype.c (pam_usertype_get_uid): Likewise.
+ * modules/pam_xauth/pam_xauth.c (pam_sm_open_session,
+ pam_sm_close_session): Likewise.
+ * modules/pam_securetty/pam_securetty.c (securetty_perform_check):
+ Downgrade the syslog level for pam_get_user errors from LOG_WARNING
+ to LOG_NOTICE.
+ * modules/pam_stress/pam_stress.c (pam_sm_authenticate): Likewise.
+
+ Suggested-by: Tomáš Mráz <tmraz@fedoraproject.org>
+
+2020-05-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: add a test for return values.
+ * modules/pam_localuser/tst-pam_localuser-retval.c: New file.
+ * modules/pam_localuser/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_localuser_retval_LDADD): New variables.
+
+ pam_localuser: refactor pam_sm_authenticate.
+ * modules/pam_localuser/pam_localuser.c (check_user_in_passwd): New
+ function.
+ (pam_sm_authenticate): Use it.
+
+2020-05-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: downgrade syslog level for errors related to user input.
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Downgrade
+ the syslog level for errors related to pam_get_user from LOG_ERR to
+ LOG_NOTICE.
+
+ Suggested-by: Tomáš Mráz <tmraz@fedoraproject.org>
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: re-format pam_sm_* function declarations.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: remove unused includes.
+ Also, remove unused MODULE_NAME macro.
+
+ * modules/pam_localuser/pam_localuser.c: Stop including unused header
+ files.
+ (MODULE_NAME): Remove.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: forward error values returned by pam_get_user.
+ Starting with commit c2c601f5340a59c5c62193d55b555d384380ea38,
+ pam_get_user is guaranteed to return one of the following values:
+ PAM_SUCCESS, PAM_BUF_ERR, PAM_CONV_AGAIN, or PAM_CONV_ERR.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Do not
+ replace non-PAM_CONV_AGAIN error values returned by pam_get_user with
+ PAM_SERVICE_ERR.
+ * modules/pam_localuser/pam_localuser.8.xml (RETURN VALUES): Document
+ new return values.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: return PAM_INCOMPLETE when pam_get_user returns PAM_CONV_AGAIN
+ Give the application a chance to handle PAM_INCOMPLETE.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Return
+ PAM_INCOMPLETE instead of PAM_SERVICE_ERR when pam_get_user returns
+ PAM_CONV_AGAIN.
+ * modules/pam_localuser/pam_localuser.8.xml (RETURN VALUES): Document
+ it.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: open the passwd file after user name validation.
+ Since user name is untrusted input, it should be validated earlier
+ rather than later.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Open
+ the passwd file after user name validation.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: use BUFSIZ as the line buffer size.
+ As BUFSIZ is the buffer size used in stdio, it must be an efficient size
+ for the line buffer. Also, it's larger than LINE_MAX used as the line
+ buffer size before this change, effectively raising the maximum user
+ name length supported by this module.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Replace
+ LINE_MAX with BUFSIZ.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: handle long lines in passwd files properly.
+ Before this change, a long line in the passwd file used to be treated as
+ several lines which could potentially result to false match and,
+ consequently, to incorrect PAM_SUCCESS return value.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Handle
+ long lines in passwd files properly.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: get rid of a temporary buffer.
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Do not
+ copy the user name into a temporary buffer, use the user name itself in
+ comparisons.
+
+ pam_localuser: log unrecognized options.
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Log
+ unrecognized options.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: return PAM_SERVICE_ERR instead of PAM_SYSTEM_ERR.
+ When passwd file cannot be opened or the user name either cannot be
+ obtained or is not valid, return PAM_SERVICE_ERR instead of
+ PAM_SYSTEM_ERR.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Return
+ PAM_SERVICE_ERR instead of PAM_SYSTEM_ERR.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: reject user names that are too long.
+ Too long user names used to be truncated which could potentially result
+ to false match and, consequently, to incorrect PAM_SUCCESS return value.
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Return
+ PAM_SERVICE_ERR if the user name is too long.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_localuser: reject user names containing a colon.
+ "root:x" is not a local user name even if the passwd file contains
+ a line starting with "root:x:".
+
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Return
+ PAM_PERM_DENIED if the user name contains a colon.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_mkhomedir: add a test for return values.
+ * modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c: New file.
+ * modules/pam_mkhomedir/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_mkhomedir_retval_LDADD): New variables.
+
+ pam_faildelay: add a test for return values.
+ * modules/pam_faildelay/tst-pam_faildelay-retval.c: New file.
+ * modules/pam_faildelay/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_faildelay_retval_LDADD): New variables.
+
+ pam_rootok: add a test for return values.
+ * modules/pam_rootok/tst-pam_rootok-retval.c: New file.
+ * modules/pam_rootok/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_rootok_retval_LDADD): New variables.
+
+ pam_nologin: add a test for return values.
+ * modules/pam_nologin/tst-pam_nologin-retval.c: New file.
+ * modules/pam_nologin/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_nologin_retval_LDADD): New variables.
+
+ pam_echo: add a test for return values.
+ * modules/pam_echo/tst-pam_echo-retval.c: New file.
+ * modules/pam_echo/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_echo_retval_LDADD): New variables.
+
+ pam_warn: add a test for return values.
+ * modules/pam_warn/tst-pam_warn-retval.c: New file.
+ * modules/pam_warn/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_warn_retval_LDADD): New variables.
+
+ pam_debug: add a test for return values.
+ * modules/pam_debug/tst-pam_debug-retval.c: New file.
+ * modules/pam_debug/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_debug_retval_LDADD): New variables.
+
+ pam_permit: add a test for return values.
+ * modules/pam_permit/tst-pam_permit-retval.c: New file.
+ * modules/pam_permit/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_permit_retval_LDADD): New variables.
+
+ pam_deny: add a test for return values.
+ * modules/pam_deny/tst-pam_deny-retval.c: New file.
+ * modules/pam_deny/Makefile.am (TESTS): Add $(check_PROGRAMS).
+ (check_PROGRAMS, tst_pam_deny_retval_LDADD): New variables.
+
+2020-05-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ Introduce test_assert.h.
+ Introduce a new internal header file for definitions of handy macros
+ providing convenient assertion testing functionality.
+
+ * libpam/include/test_assert.h: New file.
+ * libpam/Makefile.am (noinst_HEADERS): Add include/test_assert.h.
+
+2020-05-21 Andreas Henriksson <andreas+fedora@fatal.se>
+
+ Translated using Weblate (Swedish)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/sv/
+
+2020-05-17 Dmitry V. Levin <ldv@altlinux.org>
+
+ doc: fix the description of stack jump effects.
+ Every stack jump, besides the jump itself, has a side effect which is
+ one of 'ignore', 'ok', or 'bad'. Unfortunately, the side effect is far
+ from obvious because it depends on the PAM function call, and the
+ documentation that contradicts the implementation does not help either.
+
+ * doc/man/pam.conf-syntax.xml (actionN): Rewrite the description
+ of stack jump effects to match the implementation.
+
+ Fixes: 871a6e14d65c3c446ae0af51166dabc7a47a2b56
+
+2020-05-17 Weblate (bot) <noreply@weblate.org>
+ Allan Nordhøy <epost@anotheragency.no>
+ Dmitry V. Levin <ldv@altlinux.org>
+
+ Translations update from Weblate (#227)
+ * Translated using Weblate (Norwegian Bokmål)
+
+ Currently translated at 99.1% (121 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/nb_NO/
+
+ * Translated using Weblate (Catalan)
+
+ Currently translated at 98.3% (120 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ca/
+
+2020-05-16 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules: do not check user name for emptyness before passing it to pam_modutil_getpwnam
+ pam_modutil_getpwnam is perfectly capable of handling empty strings as
+ user names, no need to double check that.
+
+ * modules/pam_access/pam_access.c (pam_sm_authenticate): Do not check
+ the user name for emptyness before passing it to pam_modutil_getpwnam.
+ * modules/pam_lastlog/pam_lastlog.c (pam_sm_authenticate): Likewise.
+ * modules/pam_pwhistory/pam_pwhistory.c (pam_sm_chauthtok): Likewise.
+ * modules/pam_shells/pam_shells.c (perform_check): Likewise.
+ * modules/pam_tally/pam_tally.c (pam_get_uid): Likewise.
+ * modules/pam_tally2/pam_tally2.c (pam_get_uid): Likewise.
+ * modules/pam_umask/pam_umask.c (pam_sm_open_session): Likewise.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_usertype: Document return values forwarded from pam_get_user.
+ * modules/pam_usertype/pam_usertype.8.xml (RETURN VALUES): Document
+ PAM_BUF_ERR and PAM_CONV_ERR return values.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_usertype: return PAM_INCOMPLETE when pam_get_user returns PAM_CONV_AGAIN
+ Give the application a chance to handle PAM_INCOMPLETE.
+
+ * modules/pam_usertype/pam_usertype.c (pam_usertype_get_uid): Return
+ PAM_INCOMPLETE instead of PAM_CONV_AGAIN when pam_get_user returns
+ PAM_CONV_AGAIN.
+ * modules/pam_usertype/pam_usertype.8.xml (RETURN VALUES): Document it.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_faillock: Document return values forwarded from pam_get_user.
+ * modules/pam_faillock/pam_faillock.8.xml (RETURN VALUES): Document
+ PAM_BUF_ERR and PAM_CONV_ERR return values.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_faillock: return PAM_INCOMPLETE when pam_get_user returns PAM_CONV_AGAIN
+ Give the application a chance to handle PAM_INCOMPLETE.
+
+ * modules/pam_faillock/pam_faillock.c (get_pam_user): Return
+ PAM_INCOMPLETE instead of PAM_CONV_AGAIN when pam_get_user returns
+ PAM_CONV_AGAIN.
+ * modules/pam_faillock/pam_faillock.8.xml (RETURN VALUES): Document it.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_securetty: forward error values returned by pam_get_user.
+ Starting with commit c2c601f5340a59c5c62193d55b555d384380ea38,
+ pam_get_user is guaranteed to return one of the following values:
+ PAM_SUCCESS, PAM_BUF_ERR, PAM_CONV_AGAIN, or PAM_CONV_ERR.
+
+ * modules/pam_securetty/pam_securetty.c (pam_sm_authenticate): Do not
+ replace non-PAM_CONV_AGAIN error values returned by pam_get_user with
+ PAM_SERVICE_ERR.
+ * modules/pam_securetty/pam_securetty.8.xml (RETURN VALUES): Document
+ new return values.
+
+2020-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules: do not check user name for NULL if pam_get_user returned PAM_SUCCESS
+ If pam_get_user returned PAM_SUCCESS, the user name is guaranteed
+ to be a valid C string, no need to double check that.
+
+ * modules/pam_access/pam_access.c (pam_sm_authenticate): Do not check
+ for NULL the user name returned by pam_get_user when the latter returned
+ PAM_SUCCESS.
+ * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass): Likewise.
+ * modules/pam_debug/pam_debug.c (pam_sm_authenticate): Likewise.
+ * modules/pam_filter/pam_filter.c (process_args): Likewise.
+ * modules/pam_ftp/pam_ftp.c (pam_sm_authenticate): Likewise.
+ * modules/pam_group/pam_group.c (pam_sm_setcred): Likewise.
+ * modules/pam_lastlog/pam_lastlog.c (pam_sm_authenticate): Likewise.
+ * modules/pam_listfile/pam_listfile.c (pam_sm_authenticate): Likewise.
+ * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Likewise.
+ * modules/pam_mail/pam_mail.c (_do_mail): Likewise.
+ * modules/pam_nologin/pam_nologin.c (perform_check): Likewise.
+ * modules/pam_permit/pam_permit.c (pam_sm_authenticate): Likewise.
+ * modules/pam_pwhistory/pam_pwhistory.c (pam_sm_chauthtok): Likewise.
+ * modules/pam_rhosts/pam_rhosts.c (pam_sm_authenticate): Likewise.
+ * modules/pam_securetty/pam_securetty.c (pam_sm_authenticate): Likewise.
+ * modules/pam_sepermit/pam_sepermit.c (pam_sm_authenticate): Likewise.
+ * modules/pam_shells/pam_shells.c (perform_check): Likewise.
+ * modules/pam_stress/pam_stress.c (pam_sm_authenticate): Likewise.
+ * modules/pam_succeed_if/pam_succeed_if.c (pam_sm_authenticate): Likewise.
+ * modules/pam_time/pam_time.c (pam_sm_acct_mgmt): Likewise.
+ * modules/pam_timestamp/pam_timestamp.c (get_timestamp_name): Likewise.
+ * modules/pam_umask/pam_umask.c (pam_sm_open_session): Likewise.
+ * modules/pam_unix/pam_unix_auth.c (pam_sm_authenticate): Likewise.
+ * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Likewise.
+ * modules/pam_usertype/pam_usertype.c (pam_usertype_get_uid): Likewise.
+ * modules/pam_wheel/pam_wheel.c (perform_check): Likewise.
+ * modules/pam_userdb/pam_userdb.c (pam_sm_authenticate, pam_sm_acct_mgmt):
+ Likewise.
+
+2020-05-14 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_umask: Document return values forwarded from pam_get_user.
+ * modules/pam_umask/pam_umask.8.xml (RETURN VALUES): Document
+ PAM_BUF_ERR, PAM_CONV_ERR, and PAM_INCOMPLETE return values.
+
+ pam_exec: Document return values forwarded from pam_get_user.
+ * modules/pam_exec/pam_exec.8.xml (RETURN VALUES): Document
+ PAM_BUF_ERR, PAM_CONV_ERR, and PAM_INCOMPLETE return values.
+
+2020-05-13 Dmitry V. Levin <ldv@altlinux.org>
+
+ Deprecate pam_cracklib, pam_tally, and pam_tally2.
+ Deprecate pam_cracklib, there are two better alternatives to this
+ obsolete module: pam_passwdqc from passwdqc project and pam_pwquality
+ from libpwquality project.
+
+ Deprecate pam_tally and pam_tally2 in favour of pam_faillock.
+
+ * configure.ac: Implement --enable-cracklib=check that enables build
+ of pam_cracklib when libcrack is available.
+ Disable build of pam_cracklib, pam_tally, and pam_tally2 by default.
+ * NEWS: Mention this change.
+ * ci/run-build-and-tests.sh (DISTCHECK_CONFIGURE_FLAGS): Add
+ --enable-tally, --enable-tally2, and --enable-cracklib=check
+ to check build of these deprecated modules.
+
+2020-05-13 Dmitry V. Levin <ldv@altlinux.org>
+
+ NEWS: update.
+
+2020-05-12 Thorsten Kukuk <5908016+thkukuk@users.noreply.github.com>
+
+ Use correct path for pam_namespace.service file (#223)
+
+2020-05-09 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: fix return value when the user is unknown.
+ Following the bad example in pam_mkhomedir module, from the very
+ beginning pam_setquota module used to return PAM_CRED_INSUFFICIENT
+ when pam_modutil_getpwnam() returned an error. Fix this now
+ by changing the return value to PAM_USER_UNKNOWN.
+
+ * modules/pam_setquota/pam_setquota.c (pam_sm_open_session): Return
+ PAM_USER_UNKNOWN instead of PAM_CRED_INSUFFICIENT.
+ * modules/pam_setquota/pam_setquota.8.xml (PAM_CRED_INSUFFICIENT):
+ Replace with PAM_USER_UNKNOWN.
+
+2020-05-09 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_mkhomedir: fix return value when the user is unknown.
+ From the very beginning pam_mkhomedir module used to return
+ PAM_CRED_INSUFFICIENT when getpwnam() or pam_modutil_getpwnam()
+ returned an error. Fix this now by changing the return value
+ to PAM_USER_UNKNOWN.
+
+ * modules/pam_mkhomedir/mkhomedir_helper.c (main): Return
+ PAM_USER_UNKNOWN instead of PAM_CRED_INSUFFICIENT.
+ * modules/pam_mkhomedir/pam_mkhomedir.c (pam_sm_open_session): Likewise.
+ * modules/pam_mkhomedir/pam_mkhomedir.8.xml (PAM_CRED_INSUFFICIENT):
+ Remove.
+
+2020-05-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_get_user: do not override valid values returned by the conversation function
+ When the conversation function returned a value different from
+ PAM_CONV_AGAIN and provided no response, pam_get_user used to replace
+ the return value with PAM_CONV_ERR. Fix this and replace the return
+ value only if it was PAM_SUCCESS.
+
+ * libpam/pam_item.c (pam_get_user): Do not override valid values
+ returned by the conversation function.
+
+2020-05-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_get_user: filter conversation function return values.
+ Do not assume that the conversation function provided by the application
+ strictly follows the return values guidelines, replace undocumented
+ return values with PAM_CONV_ERR.
+
+ * libpam/pam_item.c (pam_get_user): If the value returned by the
+ conversation function is not one of PAM_SUCCESS, PAM_BUF_ERR,
+ PAM_CONV_AGAIN, or PAM_CONV_ERR, replace it with PAM_CONV_ERR.
+
+2020-05-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ man: document other valid pam_get_user return values.
+ * doc/man/pam_get_user.3.xml (pam_get_user-return_values): Add
+ PAM_BUF_ERR, PAM_ABORT, and PAM_CONV_AGAIN.
+
+2020-05-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_get_user: consistently return PAM_SYSTEM_ERR if user specified a NULL pointer
+ pam_get_user returns PAM_SYSTEM_ERR in case of pamh == NULL.
+ In case of user == NULL, however, it used to return PAM_PERM_DENIED,
+ and in case of NULL conversation function it used to return
+ PAM_SERVICE_ERR.
+
+ According to the documentation, PAM_SYSTEM_ERR shall be returned
+ if a NULL pointer was submitted.
+
+ Fix this inconsistency and return PAM_SYSTEM_ERR in each of these
+ programming error cases.
+
+ * libpam/pam_item.c (pam_get_user): Return PAM_SYSTEM_ERR instead of
+ PAM_PERM_DENIED if user == NULL. Return PAM_SYSTEM_ERR instead of
+ PAM_SERVICE_ERR if pamh->pam_conversation == NULL.
+
+2020-05-06 Weblate (bot) <noreply@weblate.org>
+
+ Translations update from Weblate.
+ * Translated using Weblate (Spanish)
+
+ Currently translated at 81.9% (100 of 122 strings)
+
+ * Translated using Weblate (Portuguese)
+
+ Currently translated at 100.0% (122 of 122 strings)
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ doc: remove references to PAM_SM_* macros.
+ Starting with commit a684595c0bbd88df71285f43fb27630e3829121e aka
+ Linux-PAM-1.3.0~14 (Remove "--enable-static-modules" option and support
+ from Linux-PAM), PAM_SM_* macros have no effect.
+
+ modules: remove PAM_SM_* macros.
+ Starting with commit a684595c0bbd88df71285f43fb27630e3829121e aka
+ Linux-PAM-1.3.0~14 (Remove "--enable-static-modules" option and support
+ from Linux-PAM), PAM_SM_* macros have no effect.
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_usertype: do not override the default prompt.
+ Following the bad example in pam_succeed_if module, from the very
+ beginning pam_usertype used to override the default prompt used by
+ pam_get_user() with "login: ". Fix this now.
+
+ * modules/pam_usertype/pam_usertype.c (pam_sm_authenticate): Do not
+ request PAM_USER_PROMPT item, invoke pam_get_user() with the default
+ prompt.
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_succeed_if: do not override the default prompt.
+ From the very beginning pam_succeed_if used to override the default
+ prompt used by pam_get_user() with "login: ". Fix this now.
+
+ * modules/pam_succeed_if/pam_succeed_if.c (pam_sm_authenticate): Do not
+ request PAM_USER_PROMPT item, invoke pam_get_user() with the default
+ prompt.
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: rename TESTS to dist_check_SCRIPTS.
+ ... and remove $(TESTS) from EXTRA_DIST.
+
+ The change is performed automatically using the following script:
+ sed -i -e 's/^TESTS = \(tst.*\)/dist_check_SCRIPTS = \1\nTESTS = $(dist_check_SCRIPTS)/' \
+ -e '/^EXTRA_DIST/ s/ \$(TESTS)//' modules/*/Makefile.am
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: rename man_MANS to dist_man_MANS.
+ ... and remove $(MANS) from EXTRA_DIST.
+
+ The change is performed automatically using the following script:
+ sed -i 's/^man_MANS/dist_&/; /^EXTRA_DIST/ s/ \$(MANS)//' modules/*/Makefile.am
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_namespace: cleanup pam_namespace.service installation.
+ * modules/pam_namespace/Makefile.am (service_DATA): New variable.
+ (install-data-local): Remove all commands related to servicedir.
+ (uninstall-local): Remove.
+
+ Fixes: 59812d1cf ("pam_namespace: secure tmp-inst directories")
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: add dist_ prefix to *_DATA.
+ ... and remove $(DATA) from EXTRA_DIST.
+
+ The change is performed automatically using the following script:
+ sed -i 's/^[a-z]*_DATA/dist_&/; /^EXTRA_DIST/ s/ \$(DATA)//' modules/*/Makefile.am
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_timestamp/Makefile.am: rename noinst_PROGRAMS to check_PROGRAMS
+ ... and remove nodist_TESTS.
+
+ * modules/pam_timestamp/Makefile.am (nodist_TESTS): Remove.
+ (TESTS): Replace $(nodist_TESTS) with $(check_PROGRAMS).
+ (noinst_PROGRAMS): Rename to check_PROGRAMS.
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_timestamp/Makefile.am: rename dist_TESTS to dist_check_SCRIPTS
+ ... and remove it from EXTRA_DIST
+
+ * modules/pam_timestamp/Makefile.am (EXTRA_DIST): Remove $(dist_TESTS).
+ (dist_TESTS): Rename to dist_check_SCRIPTS.
+ (TESTS): Replace $(dist_TESTS) with $(dist_check_SCRIPTS).
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_namespace/Makefile.am: add dist_ prefix to secureconf_SCRIPTS
+ ... and remove $(SCRIPTS) from EXTRA_DIST.
+
+ * modules/pam_namespace/Makefile.am (EXTRA_DIST): Remove $(SCRIPTS).
+ (secureconf_SCRIPTS): Rename to dist_secureconf_SCRIPTS.
+
+2020-05-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ Translated using Weblate (Russian)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ru/
+
+2020-05-03 Yuri Chornoivan <yurchor@ukr.net>
+
+ Translated using Weblate (Ukrainian)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/uk/
+
+2020-05-03 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+
+2020-05-03 Julien Humbert <julroy67@gmail.com>
+
+ Translated using Weblate (French)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
+
+2020-05-03 scootergrisen <scootergrisen@gmail.com>
+
+ Translated using Weblate (Danish)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/da/
+
+2020-05-03 Piotr Drąg <piotrdrag@gmail.com>
+
+ Translated using Weblate (Polish)
+ Currently translated at 100.0% (122 of 122 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+2020-04-30 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Update .po and .pot files after adding pam_faillock.
+
+ pam_faillock: Correct the grammar of translated strings.
+ Also make the message the same as in pam_tally2.
+
+ pam_faillock: Add conf option to use a different config file.
+
+ pam_faillock: New module for locking after multiple auth failures.
+
+2020-04-29 Weblate (bot) <noreply@weblate.org>
+ Alesker Abdullayev - FEDORA Azerbaijan <tech@abdullaeff.com>
+ Allan Nordhøy <epost@anotheragency.no>
+
+ Translations update from Weblate (#215)
+ Updated translation using Weblate
+
+ * Translated using Weblate (Azerbaijani)
+
+ Currently translated at 15.8% (19 of 120 strings)
+
+ * Translated using Weblate (Norwegian Bokmål)
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+2020-04-28 Dmitry V. Levin <ldv@altlinux.org>
+
+ build: rework vendordir substitution.
+ Since Make.xml.rules is the only place where XSLTPROC_CUSTOM was used,
+ remove stereotypic definitions from other Makefiles, this way we no
+ longer have to worry about vendordir being used somewhere else in
+ documentation files.
+
+ Likewise, define VENDORDIR in config.h and remove stereotypic
+ -DVENDORDIR= additions from other Makefiles, this way we no longer
+ have to worry about VENDORDIR being used somewhere else in the code.
+
+ * configure.ac (AM_CONDITIONAL): Remove HAVE_VENDORDIR.
+ (AC_DEFINE_UNQUOTED): Add VENDORDIR.
+ (AC_SUBST): Remove VENDORDIR, add STRINGPARAM_VENDORDIR.
+ * Make.xml.rules.in: Replace $(XSLTPROC_CUSTOM) with
+ @STRINGPARAM_VENDORDIR@.
+ * doc/man/Makefile.am (XSLTPROC_CUSTOM): Remove.
+ * libpam/Makefile.am [HAVE_VENDORDIR]: Remove.
+ * modules/pam_securetty/Makefile.am [HAVE_VENDORDIR]: Remove.
+ (XSLTPROC_CUSTOM): Remove.
+ * modules/pam_securetty/pam_securetty.c: Move definitions of local
+ macros after config.h to benefit from macros defined there.
+
+2020-04-28 Dmitry V. Levin <ldv@altlinux.org>
+
+ Make.xml.rules: prepare for configure substitutions.
+ * Make.xml.rules: Rename to ...
+ * Make.xml.rules.in: ... new file.
+ * Makefile.am (EXTRA_DIST): Remove Make.xml.rules.
+ * configure.ac (AC_CONFIG_FILES): Add Make.xml.rules.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_namespace: replace namespace.init with $(SCRIPTS) in EXTRA_DIST.
+ As namespace.init is listed in secureconf_SCRIPTS which is part of
+ generated SCRIPTS variable.
+
+ * modules/pam_namespace/Makefile.am (EXTRA_DIST): Replace namespace.init
+ with $(SCRIPTS).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_env: remove environment from EXTRA_DIST.
+ * modules/pam_env/Makefile.am (EXTRA_DIST): Remove environment as it is
+ listed in sysconf_DATA which is part of DATA which is already listed in
+ EXTRA_DIST.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: remove $(secureconf_DATA) from EXTRA_DIST.
+ Since the whole $(DATA) is listed in EXTRA_DIST, $(secureconf_DATA)
+ can be safely de-listed.
+
+ * modules/pam_access/Makefile.am (EXTRA_DIST): Remove
+ $(secureconf_DATA).
+ * modules/pam_env/Makefile.am: Likewise.
+ * modules/pam_group/Makefile.am: Likewise.
+ * modules/pam_limits/Makefile.am: Likewise.
+ * modules/pam_namespace/Makefile.am: Likewise.
+ * modules/pam_sepermit/Makefile.am: Likewise.
+ * modules/pam_time/Makefile.am: Likewise.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: replace README with $(DATA) in EXTRA_DIST.
+ Since the GNU Automake distributes README files by default, the only
+ reason why README had to be listed in EXTRA_DIST was to make these
+ README files generated.
+
+ Since README is also listed in noinst_DATA, we can safely replace
+ README in EXTRA_DIST with $(DATA), this also opens the way for
+ further EXTRA_DIST cleanup.
+
+ * modules/*/Makefile.am (EXTRA_DIST): Replace README with $(DATA).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: reorder lines to promote uniformity.
+ This is essentially a no-op change that makes modules/*/Makefile.am
+ files less divergent.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ build: move README prerequisites rule from modules/*/Makefile.am to Make.xml.rules
+ As the rule is now the same in every modules/*/Makefile.am file,
+ move it to Make.xml.rules.
+
+ * Make.xml.rules (README): New prerequisites rule.
+ * modules/pam_access/Makefile.am (README): Remove rule.
+ * modules/pam_cracklib/Makefile.am (README): Likewise.
+ * modules/pam_debug/Makefile.am (README): Likewise.
+ * modules/pam_deny/Makefile.am (README): Likewise.
+ * modules/pam_echo/Makefile.am (README): Likewise.
+ * modules/pam_env/Makefile.am (README): Likewise.
+ * modules/pam_exec/Makefile.am (README): Likewise.
+ * modules/pam_faildelay/Makefile.am (README): Likewise.
+ * modules/pam_filter/Makefile.am (README): Likewise.
+ * modules/pam_ftp/Makefile.am (README): Likewise.
+ * modules/pam_group/Makefile.am (README): Likewise.
+ * modules/pam_issue/Makefile.am (README): Likewise.
+ * modules/pam_keyinit/Makefile.am (README): Likewise.
+ * modules/pam_lastlog/Makefile.am (README): Likewise.
+ * modules/pam_limits/Makefile.am (README): Likewise.
+ * modules/pam_listfile/Makefile.am (README): Likewise.
+ * modules/pam_localuser/Makefile.am (README): Likewise.
+ * modules/pam_loginuid/Makefile.am (README): Likewise.
+ * modules/pam_mail/Makefile.am (README): Likewise.
+ * modules/pam_mkhomedir/Makefile.am (README): Likewise.
+ * modules/pam_motd/Makefile.am (README): Likewise.
+ * modules/pam_namespace/Makefile.am (README): Likewise.
+ * modules/pam_nologin/Makefile.am (README): Likewise.
+ * modules/pam_permit/Makefile.am (README): Likewise.
+ * modules/pam_pwhistory/Makefile.am (README): Likewise.
+ * modules/pam_rhosts/Makefile.am (README): Likewise.
+ * modules/pam_rootok/Makefile.am (README): Likewise.
+ * modules/pam_securetty/Makefile.am (README): Likewise.
+ * modules/pam_selinux/Makefile.am (README): Likewise.
+ * modules/pam_sepermit/Makefile.am (README): Likewise.
+ * modules/pam_setquota/Makefile.am (README): Likewise.
+ * modules/pam_shells/Makefile.am (README): Likewise.
+ * modules/pam_succeed_if/Makefile.am (README): Likewise.
+ * modules/pam_tally/Makefile.am (README): Likewise.
+ * modules/pam_tally2/Makefile.am (README): Likewise.
+ * modules/pam_time/Makefile.am (README): Likewise.
+ * modules/pam_timestamp/Makefile.am (README): Likewise.
+ * modules/pam_tty_audit/Makefile.am (README): Likewise.
+ * modules/pam_umask/Makefile.am (README): Likewise.
+ * modules/pam_unix/Makefile.am (README): Likewise.
+ * modules/pam_userdb/Makefile.am (README): Likewise.
+ * modules/pam_usertype/Makefile.am (README): Likewise.
+ * modules/pam_warn/Makefile.am (README): Likewise.
+ * modules/pam_wheel/Makefile.am (README): Likewise.
+ * modules/pam_xauth/Makefile.am (README): Likewise.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: list prerequisites of README target uniformly.
+ There is no need to list prerequisites of README targets manually as
+ all README targets depend on $(XMLS).
+
+ The change is performed automatically using the following script:
+ sed -i 's/^README: pam_.*/README: $(XMLS)/' modules/*/Makefile.am
+
+ * modules/pam_access/Makefile.am (README): Replace pam_access.8.xml
+ and access.conf.5.xml with $(XMLS).
+ * modules/pam_cracklib/Makefile.am (README): Replace pam_cracklib.8.xml
+ with $(XMLS).
+ * modules/pam_debug/Makefile.am (README): Replace pam_debug.8.xml
+ with $(XMLS).
+ * modules/pam_deny/Makefile.am (README): Replace pam_deny.8.xml
+ with $(XMLS).
+ * modules/pam_echo/Makefile.am (README): Replace pam_echo.8.xml
+ with $(XMLS).
+ * modules/pam_env/Makefile.am (README): Replace pam_env.8.xml and
+ pam_env.conf.5.xml with $(XMLS).
+ * modules/pam_exec/Makefile.am (README): Replace pam_exec.8.xml
+ with $(XMLS).
+ * modules/pam_faildelay/Makefile.am (README): Replace
+ pam_faildelay.8.xml with $(XMLS).
+ * modules/pam_filter/Makefile.am (README): Replace pam_filter.8.xml
+ with $(XMLS).
+ * modules/pam_ftp/Makefile.am (README): Replace pam_ftp.8.xml with
+ $(XMLS).
+ * modules/pam_group/Makefile.am (README): Replace pam_group.8.xml
+ and group.conf.5.xml with $(XMLS).
+ * modules/pam_issue/Makefile.am (README): Replace pam_issue.8.xml
+ with $(XMLS).
+ * modules/pam_keyinit/Makefile.am (README): Replace pam_keyinit.8.xml
+ with $(XMLS).
+ * modules/pam_lastlog/Makefile.am (README): Replace pam_lastlog.8.xml
+ with $(XMLS).
+ * modules/pam_limits/Makefile.am (README): Replace pam_limits.8.xml
+ and limits.conf.5.xml with $(XMLS).
+ * modules/pam_listfile/Makefile.am (README): Replace pam_listfile.8.xml
+ with $(XMLS).
+ * modules/pam_localuser/Makefile.am (README): Replace
+ pam_localuser.8.xml with $(XMLS).
+ * modules/pam_loginuid/Makefile.am (README): Replace pam_loginuid.8.xml
+ with $(XMLS).
+ * modules/pam_mail/Makefile.am (README): Replace pam_mail.8.xml
+ with $(XMLS).
+ * modules/pam_mkhomedir/Makefile.am (README): Replace
+ pam_mkhomedir.8.xml with $(XMLS).
+ * modules/pam_motd/Makefile.am (README): Replace pam_motd.8.xml
+ with $(XMLS).
+ * modules/pam_namespace/Makefile.am (README): Replace
+ pam_namespace.8.xml, namespace.conf.5.xml,
+ and pam_namespace_helper.8.xml with $(XMLS).
+ * modules/pam_nologin/Makefile.am (README): Replace pam_nologin.8.xml
+ with $(XMLS).
+ * modules/pam_permit/Makefile.am (README): Replace pam_permit.8.xml
+ with $(XMLS).
+ * modules/pam_pwhistory/Makefile.am (README): Replace
+ pam_pwhistory.8.xml with $(XMLS).
+ * modules/pam_rhosts/Makefile.am (README): Replace pam_rhosts.8.xml
+ with $(XMLS).
+ * modules/pam_rootok/Makefile.am (README): Replace pam_rootok.8.xml
+ with $(XMLS).
+ * modules/pam_securetty/Makefile.am (README): Replace
+ pam_securetty.8.xml with $(XMLS).
+ * modules/pam_selinux/Makefile.am (README): Replace pam_selinux.8.xml
+ with $(XMLS).
+ * modules/pam_sepermit/Makefile.am (README): Replace pam_sepermit.8.xml
+ with $(XMLS).
+ * modules/pam_setquota/Makefile.am (README): Replace pam_setquota.8.xml
+ with $(XMLS).
+ * modules/pam_shells/Makefile.am (README): Replace pam_shells.8.xml
+ with $(XMLS).
+ * modules/pam_succeed_if/Makefile.am (README): Replace
+ pam_succeed_if.8.xml with $(XMLS).
+ * modules/pam_tally/Makefile.am (README): Replace pam_tally.8.xml
+ with $(XMLS).
+ * modules/pam_tally2/Makefile.am (README): Replace pam_tally2.8.xml
+ with $(XMLS).
+ * modules/pam_time/Makefile.am (README): Replace pam_time.8.xml and
+ time.conf.5.xml with $(XMLS).
+ * modules/pam_timestamp/Makefile.am (README): Replace
+ pam_timestamp.8.xml with $(XMLS).
+ * modules/pam_tty_audit/Makefile.am (README): Replace
+ pam_tty_audit.8.xml with $(XMLS).
+ * modules/pam_umask/Makefile.am (README): Replace pam_umask.8.xml
+ with $(XMLS).
+ * modules/pam_unix/Makefile.am (README): Replace pam_unix.8.xml
+ with $(XMLS).
+ * modules/pam_userdb/Makefile.am (README): Replace pam_userdb.8.xml
+ with $(XMLS).
+ * modules/pam_usertype/Makefile.am (README): Replace pam_usertype.8.xml
+ with $(XMLS).
+ * modules/pam_warn/Makefile.am (README): Replace pam_warn.8.xml
+ with $(XMLS).
+ * modules/pam_wheel/Makefile.am (README): Replace pam_wheel.8.xml
+ with $(XMLS).
+ * modules/pam_xauth/Makefile.am (README): Replace pam_xauth.8.xml
+ with $(XMLS).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: list secureconf_DATA files in EXTRA_DIST uniformly
+ The change was prepared using the following script:
+ git grep -l secureconf_DATA modules/*/Makefile.am |while read m; do
+ t="$(sed '/^secureconf_DATA = /!d;s///;q' -- "$m")"
+ sed -i "/^EXTRA_DIST =/ s/\\<$t\\>/\$(secureconf_DATA)/" -- "$m"
+ done
+
+ * modules/pam_access/Makefile.am (EXTRA_DIST): Replace access.conf with
+ $(secureconf_DATA).
+ * modules/pam_env/Makefile.am (EXTRA_DIST): Replace pam_env.conf with
+ $(secureconf_DATA).
+ * modules/pam_group/Makefile.am (EXTRA_DIST): Replace group.conf with
+ $(secureconf_DATA).
+ * modules/pam_limits/Makefile.am (EXTRA_DIST): Replace limits.conf with
+ $(secureconf_DATA).
+ * modules/pam_namespace/Makefile.am (EXTRA_DIST): Replace namespace.conf
+ with $(secureconf_DATA).
+ * modules/pam_sepermit/Makefile.am (EXTRA_DIST): Replace sepermit.conf
+ with $(secureconf_DATA).
+ * modules/pam_time/Makefile.am (EXTRA_DIST): Replace time.conf with
+ $(secureconf_DATA).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: list manual pages in EXTRA_DIST uniformly.
+ List in EXTRA_DIST those manual pages that are listed in man_MANS
+ as $(MANS).
+
+ * modules/pam_cracklib/Makefile.am (EXTRA_DIST): Replace pam_cracklib.8
+ with $(MANS).
+ * modules/pam_keyinit/Makefile.am (EXTRA_DIST): Replace pam_keyinit.8
+ with $(MANS).
+ * modules/pam_selinux/Makefile.am (EXTRA_DIST): Replace pam_selinux.8
+ with $(MANS).
+ * modules/pam_sepermit/Makefile.am (EXTRA_DIST): Replace pam_sepermit.8
+ and sepermit.conf.5 with $(MANS).
+ * modules/pam_tty_audit/Makefile.am (EXTRA_DIST): Replace
+ pam_tty_audit.8 with $(MANS).
+ * modules/pam_userdb/Makefile.am (EXTRA_DIST): Replace pam_userdb.8 with
+ $(MANS).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: list tests in EXTRA_DIST uniformly.
+ The change was prepared using the following script:
+ git grep -l '^TESTS = tst-pam_' modules/ |while read m; do
+ t="$(sed '/^TESTS = tst-pam_/!d;s/^TESTS = //;q' -- "$m")"
+ sed -i "/^EXTRA_DIST =/ s/$t\\>/\$(TESTS)/" -- "$m"
+ done
+
+ * modules/pam_access/Makefile.am (EXTRA_DIST): Replace tst-pam_access
+ with $(TESTS).
+ * modules/pam_cracklib/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_cracklib with $(TESTS).
+ * modules/pam_debug/Makefile.am (EXTRA_DIST): Replace tst-pam_debug with
+ $(TESTS).
+ * modules/pam_deny/Makefile.am (EXTRA_DIST): Replace tst-pam_deny with
+ $(TESTS).
+ * modules/pam_echo/Makefile.am (EXTRA_DIST): Replace tst-pam_echo with
+ $(TESTS).
+ * modules/pam_env/Makefile.am (EXTRA_DIST): Replace tst-pam_env with
+ $(TESTS).
+ * modules/pam_exec/Makefile.am (EXTRA_DIST): Replace tst-pam_exec with
+ $(TESTS).
+ * modules/pam_faildelay/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_faildelay with $(TESTS).
+ * modules/pam_filter/Makefile.am (EXTRA_DIST): Replace tst-pam_filter
+ with $(TESTS).
+ * modules/pam_ftp/Makefile.am (EXTRA_DIST): Replace tst-pam_ftp with
+ $(TESTS).
+ * modules/pam_group/Makefile.am (EXTRA_DIST): Replace tst-pam_group with
+ $(TESTS).
+ * modules/pam_issue/Makefile.am (EXTRA_DIST): Replace tst-pam_issue with
+ $(TESTS).
+ * modules/pam_keyinit/Makefile.am (EXTRA_DIST): Replace tst-pam_keyinit
+ with $(TESTS).
+ * modules/pam_lastlog/Makefile.am (EXTRA_DIST): Replace tst-pam_lastlog
+ with $(TESTS).
+ * modules/pam_limits/Makefile.am (EXTRA_DIST): Replace tst-pam_limits
+ with $(TESTS).
+ * modules/pam_listfile/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_listfile with $(TESTS).
+ * modules/pam_localuser/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_localuser with $(TESTS).
+ * modules/pam_loginuid/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_loginuid with $(TESTS).
+ * modules/pam_mail/Makefile.am (EXTRA_DIST): Replace tst-pam_mail with
+ $(TESTS).
+ * modules/pam_mkhomedir/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_mkhomedir with $(TESTS).
+ * modules/pam_motd/Makefile.am (EXTRA_DIST): Replace tst-pam_motd with
+ $(TESTS).
+ * modules/pam_namespace/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_namespace with $(TESTS).
+ * modules/pam_nologin/Makefile.am (EXTRA_DIST): Replace tst-pam_nologin
+ with $(TESTS).
+ * modules/pam_permit/Makefile.am (EXTRA_DIST): Replace tst-pam_permit
+ with $(TESTS).
+ * modules/pam_pwhistory/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_pwhistory with $(TESTS).
+ * modules/pam_rhosts/Makefile.am (EXTRA_DIST): Replace tst-pam_rhosts
+ with $(TESTS).
+ * modules/pam_rootok/Makefile.am (EXTRA_DIST): Replace tst-pam_rootok
+ with $(TESTS).
+ * modules/pam_securetty/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_securetty with $(TESTS).
+ * modules/pam_sepermit/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_sepermit with $(TESTS).
+ * modules/pam_setquota/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_setquota with $(TESTS).
+ * modules/pam_shells/Makefile.am (EXTRA_DIST): Replace tst-pam_shells
+ with $(TESTS).
+ * modules/pam_stress/Makefile.am (EXTRA_DIST): Replace tst-pam_stress
+ with $(TESTS).
+ * modules/pam_succeed_if/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_succeed_if with $(TESTS).
+ * modules/pam_tally/Makefile.am (EXTRA_DIST): Replace tst-pam_tally with
+ $(TESTS).
+ * modules/pam_tally2/Makefile.am (EXTRA_DIST): Replace tst-pam_tally2
+ with $(TESTS).
+ * modules/pam_time/Makefile.am (EXTRA_DIST): Replace tst-pam_time with
+ $(TESTS).
+ * modules/pam_tty_audit/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_tty_audit with $(TESTS).
+ * modules/pam_umask/Makefile.am (EXTRA_DIST): Replace tst-pam_umask with
+ $(TESTS).
+ * modules/pam_userdb/Makefile.am (EXTRA_DIST): Replace tst-pam_userdb
+ with $(TESTS).
+ * modules/pam_usertype/Makefile.am (EXTRA_DIST): Replace
+ tst-pam_usertype with $(TESTS).
+ * modules/pam_warn/Makefile.am (EXTRA_DIST): Replace tst-pam_warn with
+ $(TESTS).
+ * modules/pam_wheel/Makefile.am (EXTRA_DIST): Replace tst-pam_wheel with
+ $(TESTS).
+ * modules/pam_xauth/Makefile.am (EXTRA_DIST): Replace tst-pam_xauth with
+ $(TESTS).
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_namespace: simplify distribution of manual pages.
+ * modules/pam_namespace/Makefile.am: Merge MAN5 and MAN8 into man_MANS.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/*/Makefile.am: remove manual pages from noinst_DATA.
+ Manual pages already belong to man_MANS, listing them also
+ in noinst_DATA does not help in any way.
+
+ * modules/pam_cracklib/Makefile.am (noinst_DATA): Remove pam_cracklib.8.
+ * modules/pam_selinux/Makefile.am (noinst_DATA): Remove pam_selinux.8.
+ * modules/pam_sepermit/Makefile.am (noinst_DATA): Remove pam_sepermit.8
+ and sepermit.conf.5.
+ * modules/pam_userdb/Makefile.am (noinst_DATA): Remove pam_userdb.8.
+
+2020-04-27 Dmitry V. Levin <ldv@altlinux.org>
+
+ configure: fix dlopen check.
+ * configure.ac: Check for the library providing dlopen using
+ AC_SEARCH_LIBS instead of AC_CHECK_LIB to handle the case when
+ dlopen is a part of libc.
+
+ configure: add --disable-tally and --disable-tally2 options.
+ * configure.ac (AC_ARG_ENABLE): Add tally and tally2.
+ (AM_CONDITIONAL): Add COND_BUILD_PAM_TALLY and COND_BUILD_PAM_TALLY2.
+ * modules/Makefile.am [COND_BUILD_PAM_TALLY] (MAYBE_PAM_TALLY): Define.
+ [COND_BUILD_PAM_TALLY2] (MAYBE_PAM_TALLY2): Likewise.
+ (SUBDIRS): Replace pam_tally with $(COND_BUILD_PAM_TALLY), pam_tally2
+ with $(COND_BUILD_PAM_TALLY2).
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ build: move pam_selinux and pam_sepermit build conditions to modules/Makefile.am
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_LIBSELINUX with
+ COND_BUILD_PAM_SELINUX and COND_BUILD_PAM_SEPERMIT.
+ * modules/Makefile.am [COND_BUILD_PAM_SELINUX] (MAYBE_PAM_SELINUX):
+ Define.
+ [COND_BUILD_PAM_SEPERMIT] (MAYBE_PAM_SEPERMIT): Likewise.
+ (SUBDIRS): Replace pam_selinux with $(MAYBE_PAM_SELINUX),
+ pam_sepermit with MAYBE_PAM_SEPERMIT.
+ * modules/pam_selinux/Makefile.am: Assume HAVE_LIBSELINUX.
+ * modules/pam_sepermit/Makefile.am: Likewise.
+
+ build: simplify the check for unshare function.
+ * configure.ac (AC_CHECK_FUNCS): Do not set UNSHARE when checking for
+ unshare function.
+ (COND_BUILD_PAM_NAMESPACE): Check for $ac_cv_func_unshare instead of
+ $UNSHARE.
+
+ build: move pam_namespace build condition to modules/Makefile.am.
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_UNSHARE with
+ COND_BUILD_PAM_NAMESPACE.
+ * modules/Makefile.am [COND_BUILD_PAM_NAMESPACE] (MAYBE_PAM_NAMESPACE):
+ Define.
+ (SUBDIRS): Replace pam_namespace with $(MAYBE_PAM_NAMESPACE).
+ * modules/pam_namespace/Makefile.am: Assume HAVE_UNSHARE.
+
+ build: move pam_userdb build condition to modules/Makefile.am.
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_LIBDB with
+ COND_BUILD_PAM_USERDB.
+ * modules/Makefile.am [COND_BUILD_PAM_USERDB] (MAYBE_PAM_USERDB):
+ Define.
+ (SUBDIRS): Replace pam_userdb with $(MAYBE_PAM_USERDB).
+ * modules/pam_userdb/Makefile.am: Assume HAVE_LIBDB.
+
+ build: remove unused HAVE_LIBCRACK.
+ * configure.ac (AC_DEFINE): Remove unused HAVE_LIBCRACK.
+
+ build: move pam_cracklib build condition to modules/Makefile.am.
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_LIBCRACK with
+ COND_BUILD_PAM_CRACKLIB.
+ * modules/Makefile.am [COND_BUILD_PAM_CRACKLIB] (MAYBE_PAM_CRACKLIB):
+ Define.
+ (SUBDIRS): Replace pam_cracklib with $(MAYBE_PAM_CRACKLIB).
+ * modules/pam_cracklib/Makefile.am: Assume HAVE_LIBCRACK.
+
+ build: remove unused HAVE_KEY_MANAGEMENT.
+ * configure.ac (AC_DEFINE, AC_SUBST): Remove unused HAVE_KEY_MANAGEMENT.
+ (AC_CHECK_DECL): Remove unused ENOKEY.
+
+ build: move pam_keyinit build condition to modules/Makefile.am.
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_KEY_MANAGEMENT with
+ COND_BUILD_PAM_KEYINIT.
+ * modules/Makefile.am [COND_BUILD_PAM_KEYINIT] (MAYBE_PAM_KEYINIT):
+ Define.
+ (SUBDIRS): Replace pam_keyinit with $(MAYBE_PAM_KEYINIT).
+ * modules/pam_keyinit/Makefile.am: Assume HAVE_KEY_MANAGEMENT.
+
+ build: remove unused AC_DEFINE([HAVE_AUDIT_TTY_STATUS])
+ * configure.ac (AC_DEFINE): Remove unused HAVE_AUDIT_TTY_STATUS.
+
+ build: move pam_tty_audit build condition to modules/Makefile.am.
+ * configure.ac (AM_CONDITIONAL): Replace HAVE_AUDIT_TTY_STATUS with
+ COND_BUILD_PAM_TTY_AUDIT.
+ * modules/Makefile.am [COND_BUILD_PAM_TTY_AUDIT] (MAYBE_PAM_TTY_AUDIT):
+ Define.
+ (SUBDIRS): Replace pam_tty_audit with $(MAYBE_PAM_TTY_AUDIT).
+ * modules/pam_tty_audit/Makefile.am: Assume HAVE_AUDIT_TTY_STATUS.
+
+ configure.ac: sort COND_BUILD_* conditionals.
+ ... and move them closer to the end of configure.ac.
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/Makefile.am: sort SUBDIRS.
+ Also list one element of SUBDIRS per line for the ease of maintenance.
+
+ * modules/Makefile.am (SUBDIRS): List one per line, sort.
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ ci: add gcc-10 jobs.
+ * .github/workflows/ci.yml (gcc10-x86_64, gcc10-x86, gcc10-x32):
+ New jobs.
+ * .travis.yml (matrix): Add gcc-10 jobs on x86_64, x86, x32,
+ and ppc64le.
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_issue: fix potential read out of bounds.
+ Reported by gcc-10 -Warray-bounds:
+
+ In file included from /usr/include/string.h:494,
+ from modules/pam_issue/pam_issue.c:19:
+ In function 'strncat',
+ inlined from 'read_issue_quoted' at modules/pam_issue/pam_issue.c:197:3:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: '__builtin___strncat_chk' offset [260, 389] from the object at 'uts' is out of the bounds of referenced subobject 'version' with type 'char[65]' at offset 195 [-Werror=array-bounds]
+ 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In file included from modules/pam_issue/pam_issue.c:26:
+ modules/pam_issue/pam_issue.c: In function 'read_issue_quoted':
+ /usr/include/x86_64-linux-gnu/sys/utsname.h:59:10: note: subobject 'version' declared here
+ 59 | char version[_UTSNAME_VERSION_LENGTH];
+ | ^~~~~~~
+ In file included from /usr/include/string.h:494,
+ from modules/pam_issue/pam_issue.c:19:
+ In function 'strncat',
+ inlined from 'read_issue_quoted' at modules/pam_issue/pam_issue.c:188:3:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: '__builtin___strncat_chk' offset [65, 389] from the object at 'uts' is out of the bounds of referenced subobject 'sysname' with type 'char[65]' at offset 0 [-Werror=array-bounds]
+ 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In file included from modules/pam_issue/pam_issue.c:26:
+ modules/pam_issue/pam_issue.c: In function 'read_issue_quoted':
+ /usr/include/x86_64-linux-gnu/sys/utsname.h:51:10: note: subobject 'sysname' declared here
+ 51 | char sysname[_UTSNAME_SYSNAME_LENGTH];
+ | ^~~~~~~
+ In file included from /usr/include/string.h:494,
+ from modules/pam_issue/pam_issue.c:19:
+ In function 'strncat',
+ inlined from 'read_issue_quoted' at modules/pam_issue/pam_issue.c:194:3:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: '__builtin___strncat_chk' offset [195, 389] from the object at 'uts' is out of the bounds of referenced subobject 'release' with type 'char[65]' at offset 130 [-Werror=array-bounds]
+ 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In file included from modules/pam_issue/pam_issue.c:26:
+ modules/pam_issue/pam_issue.c: In function 'read_issue_quoted':
+ /usr/include/x86_64-linux-gnu/sys/utsname.h:57:10: note: subobject 'release' declared here
+ 57 | char release[_UTSNAME_RELEASE_LENGTH];
+ | ^~~~~~~
+ In file included from /usr/include/string.h:494,
+ from modules/pam_issue/pam_issue.c:19:
+ In function 'strncat',
+ inlined from 'read_issue_quoted' at modules/pam_issue/pam_issue.c:191:3:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: '__builtin___strncat_chk' offset [130, 389] from the object at 'uts' is out of the bounds of referenced subobject 'nodename' with type 'char[65]' at offset 65 [-Werror=array-bounds]
+ 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In file included from modules/pam_issue/pam_issue.c:26:
+ modules/pam_issue/pam_issue.c: In function 'read_issue_quoted':
+ /usr/include/x86_64-linux-gnu/sys/utsname.h:54:10: note: subobject 'nodename' declared here
+ 54 | char nodename[_UTSNAME_NODENAME_LENGTH];
+ | ^~~~~~~~
+ In file included from /usr/include/string.h:494,
+ from modules/pam_issue/pam_issue.c:19:
+ In function 'strncat',
+ inlined from 'read_issue_quoted' at modules/pam_issue/pam_issue.c:200:3:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: '__builtin___strncat_chk' offset [325, 389] from the object at 'uts' is out of the bounds of referenced subobject 'machine' with type 'char[65]' at offset 260 [-Werror=array-bounds]
+ 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In file included from modules/pam_issue/pam_issue.c:26:
+ modules/pam_issue/pam_issue.c: In function 'read_issue_quoted':
+ /usr/include/x86_64-linux-gnu/sys/utsname.h:62:10: note: subobject 'machine' declared here
+ 62 | char machine[_UTSNAME_MACHINE_LENGTH];
+ | ^~~~~~~
+
+ * modules/pam_issue/pam_issue.c (read_issue_quoted): Rewrite to avoid
+ strncat from potentially not null-terminated string buffer fields
+ of struct utsname.
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: fix NULL dereference when at least one of motd directories is not available
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Do not assign -1U to
+ dirscans_sizes[i] when scandir(motd_dir_path_split[i]) returns an error.
+
+ Resolves: https://bugzilla.altlinux.org/38389
+ Fixes: d57ab221 ("pam_motd: Cleanup the code and avoid unnecessary logging")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: cleanup calloc invocations.
+ Apply the following calloc invocation idiom:
+ ptr = calloc(nmemb, sizeof(*ptr));
+
+ * modules/pam_motd/pam_motd.c (pam_split_string,
+ try_to_display_directories_with_overrides): Cleanup calloc invocations.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: fix NULL dereference on error path.
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Do not access
+ elements of dirscans_sizes array if dirscans_sizes == NULL
+ due to an earlier memory allocation error.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: remove redundant return statement.
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Remove return statement
+ at the end of the function returning void.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: remove redundant prefix from syslog messages.
+ pam_syslog already does all the prefixing we need.
+
+ * modules/pam_motd/pam_motd.c (pam_split_string,
+ try_to_display_directories_with_overrides): Remove "pam_motd: " prefix
+ from strings passed to pam_syslog.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: fix memory leak.
+ pam_motd used to leak memory allocated for each motd file
+ successfully opened in try_to_display_directories_with_overrides.
+
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Free abs_path.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: fix misleading error diagnostics.
+ Do not invoke calloc with the first argument equal to zero as the return
+ value can be NULL which is undistinguishable from memory allocation
+ error.
+
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Skip if there are no
+ directory entries (dirscans_size_total == 0).
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_motd: do not zero the memory allocated by calloc.
+ As dirnames_all is allocated with calloc, zeroing it out is pointless.
+
+ * modules/pam_motd/pam_motd.c
+ (try_to_display_directories_with_overrides): Remove redundant zeroing
+ of dirnames_all.
+
+ Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ build: cleanup: do not add -DWITH_SELINUX to CFLAGS.
+ As WITH_SELINUX is already AC_DEFINE'd in configure.ac,
+ there is no point in adding -DWITH_SELINUX to CFLAGS.
+
+ * libpam/Makefile.am [HAVE_LIBSELINUX] (AM_CFLAGS): Do not add
+ -DWITH_SELINUX.
+ * modules/pam_rootok/Makefile.am: Likewise.
+ * modules/pam_unix/Makefile.am: Likewise.
+
+2020-04-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ build: cleanup: replace "test ! -z" with "test -n"
+ * configure.ac: replace "test ! -z" with "test -n".
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_filter: fix potential off-by-one heap buffer overflow.
+ Reported by gcc-10 -Wstringop-overflow:
+
+ In file included from /usr/include/string.h:494,
+ from modules/pam_filter/pam_filter.c:14:
+ In function 'strcpy',
+ inlined from 'process_args' at modules/pam_filter/pam_filter.c:137:2,
+ inlined from 'need_a_filter.isra' at modules/pam_filter/pam_filter.c:618:12:
+ /usr/include/x86_64-linux-gnu/bits/string_fortified.h:90:10: warning: '__builtin_memcpy' writing 6 bytes into a region of size 5 [-Wstringop-overflow=]
+ 90 | return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ modules/pam_filter/pam_filter.c: In function 'need_a_filter.isra':
+ modules/pam_filter/pam_filter.c:128:21: note: at offset 0 to an object with size 5 allocated by 'malloc' here
+ 128 | levp[0] = (char *) malloc(size);
+ | ^~~~~~~~~~~~
+
+ * modules/pam_filter/pam_filter.c (process_args): Fix off-by-one heap
+ buffer overflow in case of a filter without arguments (argc == 0).
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: remove PAM_EXTERN and PAM_STATIC parts.
+ In other modules they were removed by commit Linux-PAM-1.3.0~14.
+
+ * modules/pam_setquota/pam_setquota.c: Remove PAM_EXTERN and PAM_STATIC
+ parts.
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: fix more harmless compilation warnings.
+ On ppc64le the compiler complains with the following diagnostics:
+
+ pam_setquota.c: In function 'debug':
+ pam_setquota.c:48:59: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+ ......
+ 51 | p->dqb_bsoftlimit, p->dqb_bhardlimit,
+ | ~~~~~~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:48:75: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 7 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+ ......
+ 51 | p->dqb_bsoftlimit, p->dqb_bhardlimit,
+ | ~~~~~~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 8 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ......
+ 52 | p->dqb_isoftlimit, p->dqb_ihardlimit,
+ | ~~~~~~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:49:46: note: format string is defined here
+ 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu",
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+ pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 9 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ......
+ 52 | p->dqb_isoftlimit, p->dqb_ihardlimit,
+ | ~~~~~~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:49:62: note: format string is defined here
+ 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu",
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+ pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 10 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ......
+ 53 | p->dqb_btime, p->dqb_itime);
+ | ~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:49:73: note: format string is defined here
+ 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu",
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+ pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type '__u64' {aka 'const long unsigned int'} [-Wformat=]
+ 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ......
+ 53 | p->dqb_btime, p->dqb_itime);
+ | ~~~~~~~~~~~~
+ | |
+ | __u64 {aka const long unsigned int}
+ pam_setquota.c:49:84: note: format string is defined here
+ 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu",
+ | ~~~^
+ | |
+ | long long unsigned int
+ | %lu
+
+ * modules/pam_setquota/pam_setquota.c (debug): Cast fields of type __u64
+ to unsigned long long.
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_timestamp: include "config.h" in hmacsha1.c as the first header.
+ This ensures "config.h" is included before any system header
+ which fixes the following bug reported by ALT diagnostics:
+
+ verify-elf: ERROR: ./lib/security/pam_timestamp.so: uses non-LFS functions: __fxstat open
+
+ * modules/pam_timestamp/hmacsha1.c: Include "config.h".
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ libpamc.h: include "config.h" as the first header.
+ This ensures "config.h" is included before any system header included by
+ libpamc.h, which fixes the following bug reported by ALT diagnostics:
+
+ verify-elf: ERROR: ./lib/libpamc.so.0.82.1: uses non-LFS functions: __xstat readdir
+
+ * libpamc/libpamc.h: Include "config.h".
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: apply WARN_CFLAGS.
+ All other modules already build with WARN_CFLAGS.
+
+ * modules/pam_setquota/Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS).
+
+2020-04-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_setquota: fix harmless compilation warnings.
+ Fix -Wunused-variable compilation warnings:
+
+ pam_setquota.c: In function 'pam_sm_open_session':
+ pam_setquota.c:173:9: warning: unused variable 'ep' [-Wunused-variable]
+ 173 | char *ep, *val, *mntdevice = NULL;
+ | ^~
+ pam_setquota.c:172:17: warning: unused variable 'ul' [-Wunused-variable]
+ 172 | unsigned long ul;
+ | ^~
+
+ Fix -Wunused-parameter compilation warnings:
+
+ pam_setquota.c: In function 'pam_sm_open_session':
+ pam_setquota.c:169:60: warning: unused parameter 'flags' [-Wunused-parameter]
+ 169 | PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc,
+ | ~~~~^~~~~
+ pam_setquota.c: In function 'pam_sm_close_session':
+ pam_setquota.c:382:40: warning: unused parameter 'pamh' [-Wunused-parameter]
+ 382 | int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc,
+ | ~~~~~~~~~~~~~~^~~~
+ pam_setquota.c:382:50: warning: unused parameter 'flags' [-Wunused-parameter]
+ 382 | int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc,
+ | ~~~~^~~~~
+ pam_setquota.c:382:61: warning: unused parameter 'argc' [-Wunused-parameter]
+ 382 | int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc,
+ | ~~~~^~~~
+ pam_setquota.c:383:39: warning: unused parameter 'argv' [-Wunused-parameter]
+ 383 | const char **argv) {
+ | ~~~~~~~~~~~~~^~~~
+
+ * modules/pam_setquota/pam_setquota.c (pam_sm_open_session): Mark
+ 'flags' parameter as unused. Remove unused 'ep' and 'ul' variables.
+ (pam_sm_close_session): Mark all parameters as unused.
+
+2020-04-18 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+ Resolves: https://github.com/linux-pam/linux-pam/pull/214
+
+2020-04-17 Sven Hartge <sven@svenhartge.de>
+
+ pam_setquota: new module to set or modify disk quotas on session start.
+ This makes disk quotas usable with central user databases, such as MySQL or
+ LDAP.
+
+ Resolves: https://github.com/linux-pam/linux-pam/issues/92
+
+2020-04-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_access, pam_issue: do not assume that getdomainname always exists.
+ * modules/pam_access/pam_access.c (netgroup_match): Place the code
+ that calls getdomainname under HAVE_GETDOMAINNAME guard.
+ * modules/pam_issue/pam_issue.c (read_issue_quoted): Likewise.
+
+ Resolves: https://github.com/linux-pam/linux-pam/issues/43
+
+2020-04-13 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+
+2020-04-13 Ankit Behera <proneon267@gmail.com>
+
+ Translated using Weblate (Odia)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/or/
+
+2020-04-12 Topi Miettinen <toiwoton@gmail.com>
+
+ pam_unix: modernize example in manual page.
+ According to crypt(5), md5 should not be used for new hashes. Let's
+ give a modern example with yescrypt.
+
+2020-04-10 Robert Antoni Buj Gelonch <robert.buj@gmail.com>
+
+ Translated using Weblate (Catalan)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ca/
+ Resolves: https://github.com/linux-pam/linux-pam/pull/207
+
+2020-04-07 Dmitry V. Levin <ldv@altlinux.org>
+
+ travis: remove faulty jobs.
+ * .travis.yml: Remove faulty gcc-9 jobs on aarch64 and s390x,
+ gcc-9 became uninstallable on these platforms several days ago
+ and hasn't been fixed yet.
+
+2020-04-07 Lucas Ramage <oxr463@gmx.us>
+
+ pam_access: add an example of using groups in access.conf to permit access
+ Resolves: https://github.com/linux-pam/linux-pam/issues/65
+ Resolves: https://github.com/linux-pam/linux-pam/pull/199
+
+2020-04-07 Dmitry V. Levin <ldv@altlinux.org>
+
+ github: add CI action.
+ Somewhat similar to Travis CI, this runs "make distcheck" on Ubuntu
+ 18.04 using gcc-9, gcc-8, gcc, clang-9, clang-8, and clang on x86_64,
+ x86, and x32 architectures.
+
+ Compared with Travis CI, GitHub Actions service currently provides
+ a significantly better parallelism as well as (unsurprisingly)
+ better integration with github.
+
+ However, GitHub Actions cannot replace Travis CI completely yet as
+ the latter can build on aarch64, s390x, and ppc64le architectures.
+
+ * .github/workflows/whitespace-errors-check.yml: Remove
+ * .github/workflows/ci.yml: New file.
+
+2020-04-07 scootergrisen <scootergrisen@gmail.com>
+
+ Translated using Weblate (Danish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/da/
+
+2020-04-07 scootergrisen <scootergrisen@gmail.com>
+
+ Translated using Weblate (Danish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/da/
+
+2020-03-31 Petr Lautrbach <plautrba@redhat.com>
+
+ pam_timestamp: Fix // in TIMESTAMPDIR.
+ _PATH_VARRUN already provides trailing slash for building paths
+
+ Fixes:
+ $ strings /usr/lib64/security/pam_timestamp.so | grep /run/
+ /var/run//pam_timestamp
+ /var/run//pam_timestamp/_pam_timestamp_key
+
+2020-03-30 James Ralston <ralston@pobox.com>
+
+ pam_unix: Return PAM_AUTHINFO_UNAVAIL when appropriate.
+ The pam_unix.so will never return PAM_AUTHINFO_UNAVAIL on systems
+ that use the unix_chkpwd helper.
+
+ The reason is that in unix_chkpwd.c, towards the end of main(), if
+ helper_verify_password() does not return PAM_SUCCESS, main() ignores
+ the actual error that helper_verify_password() returned and instead
+ returns PAM_AUTH_ERR.
+
+ This commit corrects this behavior. Specifically, if
+ helper_verify_password() returns PAM_USER_UNKNOWN, which it does
+ when /etc/passwd entry indicates that shadow information is present
+ but the /etc/shadow entry is missing, the unix_chkpwd now exits
+ with PAM_AUTHINFO_UNAVAIL. For any other error from
+ helper_verify_password(), unix_chkpwd continues to exit with
+ PAM_AUTH_ERR.
+
+ * modules/pam_unix/unix_chkpwd.c (main): Return PAM_AUTHINFO_UNAVAIL
+ when helper_verify_password() returns PAM_USER_UNKNOWN.
+
+2020-03-28 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix various typos found using codespell tool.
+
+ po: semi-automatically fix translations of pam_get_authtok default prompts
+ Complements: 4daceedd ("pam_get_authtok: fix i18n of default prompts")
+
+2020-03-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ _pam_load_module: reduce redundancy.
+ * libpam/pam_handlers.c (_pam_load_module): Reorganize $ISA handling
+ to reduce redundancy.
+
+ Resolves: https://github.com/linux-pam/linux-pam/pull/198
+
+2020-03-24 blueskycs2c <lili.ding@cs2c.com>
+
+ pam_time: add conffile option to specify an alternative configuration file
+ Resolves: https://github.com/linux-pam/linux-pam/pull/163
+ Resolves: https://github.com/linux-pam/linux-pam/pull/191
+
+2020-03-23 Alexander Zubkov <green@qrator.net>
+
+ pam_exec: require user name to be ready for the command.
+ pam_exec module can be called when a user name has not been prompted
+ yet. And thus the command is called without a user name available.
+ This fix asks PAM for the user name to ensure it is ready or to force
+ the prompt.
+
+ Resolves: https://github.com/linux-pam/linux-pam/issues/131
+ Resolves: https://github.com/linux-pam/linux-pam/pull/195
+
+2020-03-23 Christian Göttsche <cgzones@googlemail.com>
+
+ pam_selinux: fall back to log to syslog if audit logging fails.
+ Resolves: https://github.com/linux-pam/linux-pam/pull/194
+
+ pam_selinux: sanitize asprintf argument on failure.
+
+ pam_selinux: print additional information on failures.
+
+ pam_selinux: convert send_audit_message to void function.
+ The result is nowhere checked and other logging functions like
+ pam_syslog are also not checked.
+
+ pam_selinux: fix indentation.
+
+2020-03-23 Christian Göttsche <cgzones@googlemail.com>
+
+ pam_selinux: substitute legacy security_context_t type.
+ `security_context_t` is a legacy typedef to `char *`, substitute all usage.
+
+ See
+ https://github.com/SELinuxProject/selinux/commit/9eb9c9327563014ad6a807814e7975424642d5b9
+ https://github.com/SELinuxProject/selinux/blob/f8c110c8a615eb640510eab39640a0957a6ba19c/libselinux/include/selinux/selinux.h#L16
+
+2020-03-20 Jiri Grönroos <jiri.gronroos@iki.fi>
+
+ Translated using Weblate (Finnish)
+ Currently translated at 90.8% (109 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fi/
+
+2020-03-20 Dmitry V. Levin <ldv@altlinux.org>
+
+ Translated using Weblate (Slovak)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/sk/
+
+ Translated using Weblate (Czech)
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/cs/
+
+ Translated using Weblate (French)
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
+
+2020-03-20 Yuri Chornoivan <yurchor@ukr.net>
+
+ Translated using Weblate (Ukrainian)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/uk/
+
+2020-03-20 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+
+2020-03-20 Geert Warrink <geert.warrink@onsnet.nu>
+
+ Translated using Weblate (Dutch)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/nl/
+
+2020-03-20 Julien Humbert <julroy67@gmail.com>
+
+ Translated using Weblate (French)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
+
+2020-03-20 Dmitry V. Levin <ldv@altlinux.org>
+
+ Translated using Weblate (Russian)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ru/
+
+ Translated using Weblate (Portuguese (Brazil))
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pt_BR/
+
+ Translated using Weblate (Portuguese)
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pt/
+
+ Translated using Weblate (German)
+
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/de/
+
+2020-03-20 Piotr Drąg <piotrdrag@gmail.com>
+
+ Translated using Weblate (Polish)
+ Currently translated at 100.0% (120 of 120 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_userdb: use pam_str_skip_icase_prefix.
+ * modules/pam_userdb/pam_userdb.c: Include "pam_inline.h".
+ (_pam_parse, user_lookup): Use pam_str_skip_icase_prefix
+ instead of ugly strncasecmp invocations.
+
+ modules/pam_umask: use pam_str_skip_icase_prefix.
+ * modules/pam_umask/pam_umask.c: Include "pam_inline.h".
+ (parse_option, setup_limits_from_gecos): Use pam_str_skip_icase_prefix
+ instead of ugly strncasecmp invocations.
+
+ modules/pam_pwhistory: use pam_str_skip_icase_prefix.
+ * modules/pam_pwhistory/pam_pwhistory.c: Include "pam_inline.h".
+ (parse_option): Use pam_str_skip_icase_prefix instead of ugly
+ strncasecmp invocations.
+
+ modules/pam_exec: use pam_str_skip_icase_prefix.
+ * modules/pam_exec/pam_exec.c (call_exec): Use pam_str_skip_icase_prefix
+ instead of ugly strncasecmp invocations.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Introduce pam_str_skip_icase_prefix_len and pam_str_skip_icase_prefix.
+ Every time I see a code like
+ if (strncasecmp(argv, "remember=", 9) == 0)
+ options->remember = strtol(&argv[9], NULL, 10);
+ my eyes are bleeding.
+
+ Similar to pam_str_skip_prefix_len() and pam_str_skip_prefix(),
+ introduce a new helper inline function pam_str_skip_icase_prefix_len()
+ and a new macro pam_str_skip_icase_prefix() on top of it, to be used
+ in subsequent commits to cleanup the ugliness.
+
+ * libpam/include/pam_inline.h (pam_str_skip_icase_prefix_len): New
+ function.
+ (pam_str_skip_icase_prefix): New macro.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_xauth: use pam_str_skip_prefix.
+ * modules/pam_xauth/pam_xauth.c: Include "pam_inline.h".
+ (pam_sm_open_session, pam_sm_close_session): Use pam_str_skip_prefix
+ instead of ugly strncmp invocations.
+
+ modules/pam_wheel: use pam_str_skip_prefix.
+ * modules/pam_wheel/pam_wheel.c: Include "pam_inline.h".
+ (_pam_parse): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_unix: use pam_str_skip_prefix and pam_str_skip_prefix_len.
+ * modules/pam_unix/passverify.c: Include "pam_inline.h".
+ (verify_pwd_hash): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+ * modules/pam_unix/support.c: Include "pam_inline.h".
+ (_set_ctrl): Use pam_str_skip_prefix_len instead of hardcoding string
+ lengths.
+ * modules/pam_unix/md5_crypt.c: Include "pam_inline.h".
+ (crypt_md5): Use pam_str_skip_prefix_len.
+
+ squash! modules/pam_unix: use pam_str_skip_prefix and pam_str_skip_prefix_len
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_tty_audit: use pam_str_skip_prefix.
+ * modules/pam_tty_audit/pam_tty_audit.c: Include "pam_inline.h".
+ (pam_sm_open_session): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_timestamp: use pam_str_skip_prefix.
+ * modules/pam_timestamp/pam_timestamp.c: Include "pam_inline.h".
+ (check_tty, get_timestamp_name, pam_sm_authenticate): Use
+ pam_str_skip_prefix instead of ugly strncmp invocations.
+
+ modules/pam_tally: use pam_str_skip_prefix.
+ * modules/pam_tally/pam_tally.c: Include "pam_inline.h".
+ (tally_parse_args, getopts): Use pam_str_skip_prefix instead of ugly
+ strncmp invocations.
+
+ modules/pam_tally2: use pam_str_skip_prefix.
+ * modules/pam_tally2/pam_tally2.c: Include "pam_inline.h".
+ (tally_parse_args, getopts): Use pam_str_skip_prefix instead of ugly
+ strncmp invocations.
+
+ modules/pam_selinux: use pam_str_skip_prefix.
+ * modules/pam_selinux/pam_selinux.c: Include "pam_inline.h".
+ (compute_exec_context, compute_tty_context): Use pam_str_skip_prefix
+ instead of ugly strncmp invocations.
+
+ modules/pam_securetty: use pam_str_skip_prefix and pam_str_skip_prefix_len
+ * modules/pam_securetty/pam_securetty.c: Include "pam_inline.h".
+ (securetty_perform_check): Use pam_str_skip_prefix and
+ pam_str_skip_prefix_len instead of ugly strncmp invocations.
+
+ modules/pam_rhosts: use pam_str_skip_prefix.
+ * modules/pam_rhosts/pam_rhosts.c: Include "pam_inline.h".
+ (pam_sm_authenticate): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_nologin: use pam_str_skip_prefix.
+ * modules/pam_nologin/pam_nologin.c: Include "pam_inline.h".
+ (parse_args): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_namespace: use pam_str_skip_prefix.
+ * modules/pam_namespace/pam_namespace.c (root_shared): Use
+ pam_str_skip_prefix instead of ugly strncmp invocations.
+
+ modules/pam_motd: use pam_str_skip_prefix.
+ * modules/pam_motd/pam_motd.c: Include "pam_inline.h".
+ (pam_sm_open_session): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_mkhomedir: use pam_str_skip_prefix.
+ * modules/pam_mkhomedir/pam_mkhomedir.c: Include "pam_inline.h".
+ (_pam_parse): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_mail: use pam_str_skip_prefix.
+ * modules/pam_mail/pam_mail.c: Include "pam_inline.h".
+ (_pam_parse): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_localuser: use pam_str_skip_prefix.
+ * modules/pam_localuser/pam_localuser.c: Include "pam_inline.h".
+ (pam_sm_authenticate): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_listfile: use pam_str_skip_prefix.
+ * modules/pam_listfile/pam_listfile.c: Include "pam_inline.h".
+ (pam_sm_authenticate): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_limits: use pam_str_skip_prefix.
+ * modules/pam_limits/pam_limits.c: Include "pam_inline.h".
+ (_pam_parse, parse_kernel_limits): Use pam_str_skip_prefix instead of
+ ugly strncmp invocations.
+
+ modules/pam_lastlog: use pam_str_skip_prefix.
+ * modules/pam_lastlog/pam_lastlog.c: Include "pam_inline.h".
+ (_pam_auth_parse, get_tty): Use pam_str_skip_prefix instead of ugly
+ strncmp invocations.
+
+ modules/pam_issue: use pam_str_skip_prefix.
+ * modules/pam_issue/pam_issue.c: Include "pam_inline.h".
+ (pam_sm_authenticate, read_issue_quoted): Use pam_str_skip_prefix
+ instead of ugly strncmp invocations.
+
+ modules/pam_ftp: use pam_str_skip_prefix.
+ * modules/pam_ftp/pam_ftp.c: Include "pam_inline.h".
+ (_pam_parse): Use pam_str_skip_prefix instead of ugly strncmp invocations.
+
+ modules/pam_env: use pam_str_skip_prefix.
+ * modules/pam_env/pam_env.c: Include "pam_inline.h".
+ (_pam_parse, _parse_line): Use pam_str_skip_prefix instead of ugly
+ strncmp invocations.
+
+ modules/pam_echo: use pam_str_skip_prefix.
+ * modules/pam_echo/pam_echo.c: Include "pam_inline.h".
+ (pam_echo): Use pam_str_skip_prefix instead of ugly strncmp invocations.
+
+ modules/pam_cracklib: use pam_str_skip_prefix.
+ * modules/pam_cracklib/pam_cracklib.c: Include "pam_inline.h".
+ (_pam_parse): Use pam_str_skip_prefix instead of ugly strncmp
+ invocations.
+
+ modules/pam_access: use pam_str_skip_prefix.
+ * modules/pam_access/pam_access.c: Include "pam_inline.h".
+ (parse_args): Use pam_str_skip_prefix instead of ugly strncmp invocations.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Introduce pam_str_skip_prefix_len and pam_str_skip_prefix.
+ Every time I see a code like
+ if (!strncmp(*argv,"user_readenv=",13))
+ *user_readenv = atoi(13+*argv);
+ my eyes are bleeding.
+
+ Introduce a new helper inline function pam_str_skip_prefix_len() and
+ a new macro pam_str_skip_prefix() on top of it, to be used in subsequent
+ commits to cleanup the ugliness.
+
+ * libpam/include/pam_inline.h: Include <string.h>.
+ (pam_str_skip_prefix_len): New function.
+ (pam_str_skip_prefix): New macro.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Use PAM_ARRAY_SIZE.
+ Replace all instances of sizeof(x) / sizeof(*x) with PAM_ARRAY_SIZE(x)
+ which is less error-prone and implements an additional type check.
+
+ * libpam/pam_handlers.c: Include "pam_inline.h".
+ (_pam_open_config_file): Use PAM_ARRAY_SIZE.
+ * modules/pam_exec/pam_exec.c: Include "pam_inline.h".
+ (call_exec): Use PAM_ARRAY_SIZE.
+ * modules/pam_namespace/pam_namespace.c: Include "pam_inline.h".
+ (filter_mntopts): Use PAM_ARRAY_SIZE.
+ * modules/pam_timestamp/hmacfile.c: Include "pam_inline.h".
+ (testvectors): Use PAM_ARRAY_SIZE.
+ * modules/pam_xauth/pam_xauth.c: Include "pam_inline.h".
+ (run_coprocess, pam_sm_open_session): Use PAM_ARRAY_SIZE.
+ * tests/tst-pam_get_item.c: Include "pam_inline.h".
+ (main): Use PAM_ARRAY_SIZE.
+ * tests/tst-pam_set_item.c: Likewise.
+ * xtests/tst-pam_pwhistory1.c: Likewise.
+ * xtests/tst-pam_time1.c: Likewise.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Introduce pam_inline.h.
+ Introduce a new internal header file for definitions of handly inline
+ functions and macros providing some convenient functionality to libpam
+ and its modules.
+
+ * libpam/include/pam_cc_compat.h (PAM_SAME_TYPE): New macro.
+ * libpam/include/pam_inline.h: New file.
+ * libpam/Makefile.am (noinst_HEADERS): Add include/pam_inline.h.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_cracklib: fix parsing of options without arguments.
+ Prefix match for options without arguments such as use_first_pass
+ is not correct, there has to be an exact match for these options.
+
+ * modules/pam_cracklib/pam_cracklib.c (_pam_parse): Fix parsing
+ of reject_username, gecoscheck, enforce_for_root, use_authtok,
+ use_first_pass, and try_first_pass options.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ ci: enable -Werror for all builds.
+ The main purpose of fixing all compilation warnings in the current code
+ base was to enable -Werror in CI builds so that no new warnings would
+ creep in.
+
+ * ci/run-build-and-tests.sh (DISTCHECK_CONFIGURE_FLAGS): Add --enable-Werror.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ configure: implement --enable-Werror option.
+ When configure is invoked with --enable-Werror option,
+ -Werror compiler option is added to WARN_CFLAGS.
+
+ This new configure option is intended primarily for CI purposes.
+
+ * configure.ac (AC_ARG_ENABLE): Add Werror. Forward -Werror
+ to JAPHAR_GREP_CFLAGS.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix remaining clang -Wcast-align compilation warnings.
+ Introduce DIAG_PUSH_IGNORE_CAST_ALIGN and DIAG_POP_IGNORE_CAST_ALIGN
+ macros, use them to silence remaining clang -Wcast-align compilation
+ warnings.
+
+ * libpam/include/pam_cc_compat.h (DIAG_PUSH_IGNORE_CAST_ALIGN,
+ DIAG_POP_IGNORE_CAST_ALIGN): New macros.
+ * modules/pam_access/pam_access.c: Include "pam_cc_compat.h".
+ (from_match, network_netmask_match): Wrap inet_ntop invocations
+ in DIAG_PUSH_IGNORE_CAST_ALIGN and DIAG_POP_IGNORE_CAST_ALIGN.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix most of clang -Wcast-align compilation warnings.
+ Unlike gcc, clang is not smart enough to infer the alignment
+ of structure fields, so add some alignment hints to the code.
+
+ * libpam/include/pam_cc_compat.h (PAM_ATTRIBUTE_ALIGNED): New macro.
+ * modules/pam_namespace/md5.h: Include "pam_cc_compat.h".
+ (struct MD5Context): Add PAM_ATTRIBUTE_ALIGNED to "in" field.
+ * modules/pam_namespace/md5.c [!(__i386__ || __x86_64__)]
+ (uint8_aligned): New type.
+ [!(__i386__ || __x86_64__)] (byteReverse): Use it instead of
+ unsigned char.
+ * modules/pam_timestamp/sha1.h: Include "pam_cc_compat.h".
+ (struct sha1_context): Add PAM_ATTRIBUTE_ALIGNED to pending field.
+ * modules/pam_unix/md5.h: Include "pam_cc_compat.h".
+ (struct MD5Context): Add PAM_ATTRIBUTE_ALIGNED to "in" field.
+ * modules/pam_unix/md5.c [!HIGHFIRST] (uint8_aligned): New type.
+ [!HIGHFIRST] (byteReverse): Use it instead of unsigned char.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_tally, modules/pam_tally2: fix compilation warnings.
+ Fix the following compilation warnings reported by gcc
+ when sizeof(time_t) > sizeof(long), e.g. on x32:
+
+ modules/pam_tally/pam_tally.c:541:7: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘time_t’ {aka ‘long long int’} [-Wformat=]
+ 541 | _("The account is temporarily locked (%ld seconds left)."),
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ modules/pam_tally/pam_tally.c:546:40: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘time_t’ {aka ‘long long int’} [-Wformat=]
+ 546 | "user %s (%lu) has time limit [%lds left]"
+ | ~~^
+ | |
+ | long int
+ | %lld
+ ......
+ 549 | oldtime+lock_time-time(NULL));
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ | |
+ | time_t {aka long long int}
+
+ modules/pam_tally2/pam_tally2.c:592:27: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘time_t’ {aka ‘long long int’} [-Wformat=]
+ 592 | pam_info(pamh, _("The account is temporarily locked (%ld seconds left)."),
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ modules/pam_tally2/pam_tally2.c:597:50: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘time_t’ {aka ‘long long int’} [-Wformat=]
+ 597 | "user %s (%lu) has time limit [%lds left]"
+ | ~~^
+ | |
+ | long int
+ | %lld
+ ......
+ 600 | oldtime+opts->lock_time-time(NULL));
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ | |
+ | time_t {aka long long int}
+
+ This change doesn't attempt to fix handling of 64-bit time_t on 32-bit
+ systems in these modules.
+
+ * modules/pam_tally/pam_tally.c (tally_check): Cast time_t expressions
+ to long int before passing them to pam_info and pam_syslog.
+ * modules/pam_tally2/pam_tally2.c (tally_check): Likewise.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_timestamp: fix compilation warnings.
+ Fix the following compilation warnings reported by gcc on ilp32 platforms:
+
+ modules/pam_timestamp/hmacfile.c: In function ‘testvectors’:
+ modules/pam_timestamp/hmacfile.c:121:44: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
+ 121 | printf("Incorrect result for vector %lu\n", i + 1);
+ | ~~^ ~~~~~
+ | | |
+ | | size_t {aka unsigned int}
+ | long unsigned int
+ | %u
+ modules/pam_timestamp/hmacfile.c:128:30: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
+ 128 | printf("Error in vector %lu.\n", i + 1);
+ | ~~^ ~~~~~
+ | | |
+ | | size_t {aka unsigned int}
+ | long unsigned int
+ | %u
+ In function ‘strncpy’,
+ inlined from ‘pam_sm_open_session’ at modules/pam_timestamp/pam_timestamp.c:584:4:
+ /usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin___strncpy_chk’ output may be truncated copying between 1 and 4095 bytes from a string of length 4095 [-Wstringop-truncation]
+
+ * modules/pam_timestamp/hmacfile.c (testvectors): Cast the argument
+ of type size_t to unsigned long before passing it to printf.
+ * modules/pam_timestamp/pam_timestamp.c (pam_sm_open_session): Use
+ memcpy instead of strncpy as the source is not NUL-terminated, add an
+ extra check to ensure that iterator stays inside bounds.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_unix: fix gcc compilation warnings.
+ When setreuid() fails, there is no way to proceed any further: either
+ the process credentials are unchanged but inappropriate, or they are
+ in an inconsistent state and nothing good could be made out of it.
+ This fixes the following compilation warnings:
+
+ modules/pam_unix/passverify.c:209:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:211:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:213:6: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:214:6: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:222:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:224:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:225:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:226:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:209:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:211:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:213:6: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:214:6: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:222:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:224:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:225:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+ modules/pam_unix/passverify.c:226:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]
+
+ * modules/pam_unix/passverify.c (get_account_info) [HELPER_COMPILE]:
+ Always check setreuid return code and return PAM_CRED_INSUFFICIENT
+ if setreuid failed.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_access: fix compilation warning.
+ Fix the following compilation warning reported by gcc
+ when HAVE_LIBAUDIT is not set:
+
+ modules/pam_access/pam_access.c: In function ‘login_access’:
+ modules/pam_access/pam_access.c:338:13: warning: variable ‘nonall_match’ set but not used [-Wunused-but-set-variable]
+ 338 | int nonall_match = NO;
+ | ^~~~~~~~~~~~
+
+ * modules/pam_access/pam_access.c (login_access): Enclose nonall_match
+ variable with HAVE_LIBAUDIT #ifdef's.
+
+2020-03-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ conf/pam_conv1: fix clang compilation warnings.
+ Fix the following compilation warnings reported by clang:
+
+ pam_conv_y.y:12:23: warning: unused variable 'bisonid' [-Wunused-const-variable]
+ static const char bisonid[]=
+ ^
+ pam_conv_l.l:12:23: warning: unused variable 'lexid' [-Wunused-const-variable]
+ static const char lexid[]=
+ ^
+
+ These static variables lost their meaning after repository conversion
+ from cvs to git and can be safely removed.
+
+ * conf/pam_conv1/pam_conv_l.l (lexid): Remove.
+ * conf/pam_conv1/pam_conv_y.y (bisonid): Remove.
+
+2020-03-18 Dmitry V. Levin <ldv@altlinux.org>
+
+ modules/pam_timestamp: fix clang compilation warning.
+ modules/pam_timestamp/pam_timestamp.c:807:17: warning: logical not
+ is only applied to the left hand side of this comparison
+ [-Wlogical-not-parentheses]
+ } else if (!timestamp_good(st.st...
+ ^
+
+ * modules/pam_timestamp/pam_timestamp.c (main): Change timestamp_good
+ return code check to a more traditional form.
+
+2020-03-18 Dmitry V. Levin <ldv@altlinux.org>
+
+ github: check for whitespace errors on push and pull requests.
+ * .github/workflows/whitespace-errors-check.yml: New file.
+
+ modules/pam_timestamp: fix EXTRA_DIST.
+ * modules/pam_timestamp/Makefile.am (EXTRA_DIST): Replace "$(man_MANS)"
+ with "$(MANS)" as the former is conditional on HAVE_DOC.
+
+ modules/pam_namespace: fix EXTRA_DIST.
+ * modules/pam_namespace/Makefile.am (EXTRA_DIST): Replace
+ "$(MAN5) $(MAN8)" with "$(MANS)" as the former is conditional
+ on HAVE_DOC.
+
+2020-03-17 Christian Göttsche <cgzones@googlemail.com>
+
+ pam_usertype: exclude man-page generation when configured with --disable-doc
+ * modules/pam_usertype/Makefile.am (man_MANS): Make conditional
+ on HAVE_DOC.
+
+ Resolves: https://github.com/linux-pam/linux-pam/pull/193
+
+2020-03-17 Christian Göttsche <cgzones@googlemail.com>
+
+ pam_namespace: ignore pam_namespace_helper in git.
+ * modules/pam_namespace/.gitignore: New file.
+
+ Resolves: https://github.com/linux-pam/linux-pam/pull/192
+
+2020-03-13 Weblate <noreply@weblate.org>
+
+ Update translation files.
+ Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/
+
+2020-03-13 Ondrej Sulek <feonsu@gmail.com>
+
+ Translated using Weblate (Slovak)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/sk/
+
+2020-03-13 Yuri Chornoivan <yurchor@ukr.net>
+
+ Translated using Weblate (Ukrainian)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/uk/
+
+2020-03-13 Dmitry V. Levin <ldv@altlinux.org>
+
+ Translated using Weblate (Portuguese (Brazil))
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pt_BR/
+
+ Translated using Weblate (Portuguese)
+
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pt/
+
+ Translated using Weblate (German)
+
+ Currently translated at 91.4% (107 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/de/
+
+2020-03-13 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Adjust README with instructions for package prerequsities.
+ Also remove obsolete static modules instructions
+
+2020-03-11 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_get_authtok: fix i18n of default prompts.
+ Change formatting of default prompts, making them translatable
+ to those languages that use a different word order.
+ From non-i18n perspective this change is essentially a no-op.
+
+ * libpam/pam_get_authtok.c (PROMPTCURRENT): Replace with
+ PROMPT_CURRENT_ARG and PROMPT_CURRENT_NOARG.
+ (PROMPT1): Replace with PROMPT_NEW_ARG and PROMPT_NEW_NOARG.
+ (PROMPT2): Replace with PROMPT_RETYPE_ARG and PROMPT_RETYPE_NOARG.
+ (pam_get_authtok_internal, pam_get_authtok_verify): Use new macros.
+ * po/Linux-PAM.pot: Regenerated.
+
+ Resolves: https://github.com/linux-pam/linux-pam/issues/29
+
+2020-03-11 ikerexxe <ipedrosa@redhat.com>
+
+ pam_selinux: check unknown object classes or permissions in current policy
+ Explanation: check whether unknown object classes or permissions are allowed or denied in the current policy
+
+ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1680961
+
+2020-03-06 Weblate <noreply@weblate.org>
+
+ Update translation files.
+ Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/
+
+2020-03-06 Milo Casagrande <milo@milo.name>
+
+ Translated using Weblate (Italian)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/it/
+
+2020-03-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ Translated using Weblate (Zulu)
+ Currently translated at 63.2% (74 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/zu/
+
+ Translated using Weblate (Chinese (Traditional))
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/zh_TW/
+
+ Translated using Weblate (Chinese (Simplified))
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/zh_CN/
+
+ Translated using Weblate (Tamil)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ta/
+
+ Translated using Weblate (Sinhala)
+
+ Currently translated at 65.8% (77 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/si/
+
+ Translated using Weblate (Russian)
+
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ru/
+
+ Translated using Weblate (Portuguese (Brazil))
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pt_BR/
+
+ Translated using Weblate (Kazakh)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/kk/
+
+ Translated using Weblate (Japanese)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ja/
+
+ Translated using Weblate (Hungarian)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/hu/
+
+ Translated using Weblate (Hindi)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/hi/
+
+ Translated using Weblate (Spanish)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/es/
+
+ Translated using Weblate (German)
+
+ Currently translated at 81.1% (95 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/de/
+
+2020-03-06 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+
+2020-03-06 Geert Warrink <geert.warrink@onsnet.nu>
+
+ Translated using Weblate (Dutch)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/nl/
+
+2020-03-06 Julien Humbert <julroy67@gmail.com>
+
+ Translated using Weblate (French)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
+
+2020-03-06 Piotr Drąg <piotrdrag@gmail.com>
+
+ Translated using Weblate (Polish)
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+ Translated using Weblate (Polish)
+
+ Currently translated at 100.0% (117 of 117 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+2020-03-06 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Add missing file to EXTRA_DIST.
+ * tests/Makefile.am: Add confdir to EXTRA_DIST.
+
+ New API call pam_start_confdir()
+ To load PAM stack configurations from specified directory
+
+2020-03-05 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix remaining references to sourceforge.net.
+ Linux-PAM moved to github long time ago, update the remaining
+ bug tracking references to point to github issues tracker.
+
+ * README: Refer to https://github.com/linux-pam/linux-pam/issues
+ instead of sourceforge.net.
+ * po/Makevars: Refer to https://github.com/linux-pam/linux-pam/issues
+ instead of http://sourceforge.net/projects/pam .
+ * po/Linux-PAM.pot: Regenerated.
+
+2020-03-05 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_unix: fix --disable-nis compilation warnings.
+ When the build is configured using --disable-nis option, gcc complains:
+
+ pam_unix_passwd.c: In function '_do_setpass':
+ pam_unix_passwd.c:398:8: warning: unused variable 'master' [-Wunused-variable]
+
+ support.c: In function '_unix_getpwnam':
+ support.c:305:21: warning: parameter 'nis' set but not used [-Wunused-but-set-parameter]
+
+ * modules/pam_unix/pam_unix_passwd.c (_do_setpass): Move the definition
+ of "master" variable to [HAVE_NIS].
+ * modules/pam_unix/support.c (_unix_getpwnam) [!(HAVE_YP_GET_DEFAULT_DOMAIN
+ && HAVE_YP_BIND && HAVE_YP_MATCH && HAVE_YP_UNBIND)]: Do not assign
+ the unused parameter but mark it as used.
+
+2020-03-05 Dmitry V. Levin <ldv@altlinux.org>
+
+ Sort NEWS entries.
+ * NEWS (1.4.0): Sort module-related news entries.
+
+2020-03-05 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix whitespace issues.
+ Remove trailing whitespace introduced by commit
+ f9c9c72121eada731e010ab3620762bcf63db08f.
+ Remove blank lines at EOF introduced by commit
+ 65d6735c5949ec233df9813f734e918a93fa36cf.
+
+ This makes the project free of warnings reported by
+ git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD
+
+ * doc/custom-html.xsl: Remove blank line at EOF.
+ * doc/custom-man.xsl: Likewise.
+ * modules/pam_motd/pam_motd.c: Remove trailing whitespace.
+
+2020-03-04 ed@s5h.net <ed@s5h.net>
+
+ Adding package dependency hints to README.
+
+2020-03-04 Mark Wutzke <mark.wutzke@alliedtelesis.co.nz>
+
+ Use cached 'crypt' library result correctly.
+ Configure script incorrectly used a non-cached variable (ac_lib) in the
+ cached code path. This results in no -lcrypt being defined resulting in
+ link errors on a re-build.
+
+ Update configure.ac to use ac_cv_search_crypt (via ac_res) to setup the
+ correct library arguments.
+
+2020-03-03 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Prepare for the 1.4.0 release.
+
+ Updated LINGUAS to remove completely untranslated languages.
+ Updated pot and po files
+
+2020-03-03 Tomáš Mráz <tmraz@redhat.com>
+
+ Translated using Weblate (Czech)
+ Currently translated at 100.0% (116 of 116 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/cs/
+
+2020-03-03 Oğuz Ersen <oguzersen@protonmail.com>
+
+ Translated using Weblate (Turkish)
+ Currently translated at 100.0% (121 of 121 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/tr/
+
+2020-03-03 Julien Humbert <julroy67@gmail.com>
+
+ Translated using Weblate (French)
+ Currently translated at 100.0% (121 of 121 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
+
+2020-03-03 Piotr Drąg <piotrdrag@gmail.com>
+
+ Translated using Weblate (Polish)
+ Currently translated at 100.0% (121 of 121 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+ Translated using Weblate (Polish)
+
+ Currently translated at 100.0% (121 of 121 strings)
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/pl/
+
+2020-03-03 Jean-Baptiste Holcroft <jean-baptiste@holcroft.fr>
+
+ Deleted translation using Weblate (Cornish)
+ Deleted translation using Weblate (German (Low))
+
+ Deleted translation using Weblate (Angika)
+
+ Deleted translation using Weblate (English (United Kingdom))
+
+ Deleted translation using Weblate (Asturian)
+
+ Deleted translation using Weblate (bal (generated))
+
+ Deleted translation using Weblate (Bodo)
+
+ Deleted translation using Weblate (Breton)
+
+ Deleted translation using Weblate (Cornish)
+
+ Deleted translation using Weblate (Cornish)
+
+ Deleted translation using Weblate (ilo (generated))
+
+ Deleted translation using Weblate (Maithili)
+
+ Deleted translation using Weblate (Pedi)
+
+ Deleted translation using Weblate (Tibetan)
+
+ Deleted translation using Weblate (Twi)
+
+ Deleted translation using Weblate (wba (generated))
+
+2020-03-03 Weblate <noreply@weblate.org>
+
+ Update translation files.
+ Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
+
+ Translation: linux-pam/master
+ Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/
+
+2020-02-27 Iker Pedrosa <ikerpedrosam@gmail.com>
+
+ pam_tty_audit: if kernel audit is disabled return PAM_IGNORE.
+ If kernel audit is disabled the socket open will return
+ EPROTONOSUPPORT.
+ Return PAM_IGNORE from pam_tty_audit and log a warning
+ in this situation so login is not blocked by the module.
+
+2020-02-26 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_modutil_sanitize_helper_fds: fix SIGPIPE effect of PAM_MODUTIL_PIPE_FD
+ When pam_modutil_sanitize_helper_fds() is invoked with
+ PAM_MODUTIL_PIPE_FD to provide a dummy pipe descriptor for stdout
+ or stderr, it closes the read end of the newly created dummy pipe.
+ The negative side effect of this approach is that any write to such
+ descriptor triggers a SIGPIPE. Avoid this by closing the write end of
+ the dummy pipe and using its read end as a dummy pipe descriptor for
+ output. Any read from such descriptor returns 0, and any write just
+ fails with EBADF, which should work better with unprepared writers.
+
+ * libpam/pam_modutil_sanitize.c (redirect_out_pipe): Remove.
+ (redirect_out): Call redirect_in_pipe instead of redirect_out_pipe.
+
+ Fixes: b0ec5d1e ("Introduce pam_modutil_sanitize_helper_fds")
+
+2020-02-26 TBK <tbk@jjtc.eu>
+
+ libpamc: Use ISO C99 uintX_t types instead of u_intX_t.
+ u_intX_t is a glibcism this fixes the issue of compiling against musl libc.
+
+2020-02-25 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_group, pam_time: Fix regression in documentation from last change.
+ * modules/pam_group/group.conf.5.xml: Replace bare & with &amp;.
+ * modules/pam_time/time.conf.5.xml: Likewise.
+
+2020-02-24 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_limits: Document the unwanted effect of set_all with systemd.
+
+ misc_conv: Use PAM_MAX_RESP_SIZE to limit the length of the input.
+
+ pam_group, pam_time: Fix logical error with multiple ! operators.
+ * modules/pam_group/group.conf.5.xml: Document what logic list means.
+ * modules/pam_time/time.conf.5.xml: Likewise.
+ * modules/pam_group/pam_group.c (logic_field): Clear the not operator for the
+ further operations.
+ * modules/pam_time/pam_time.c (logic_field): Likewise.
+
+2020-02-24 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_shells: Recognize /bin/sh as the default shell.
+ If the shell is empty in /etc/passwd entry it means /bin/sh.
+
+ * modules/pam_shells/pam_shells.c (perform_check): Use /bin/sh as default shell.
+
+2020-02-24 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_env: Change the default to not read the user .pam_environment file.
+ * modules/pam_env/pam_env.8.xml: Document the change.
+ * modules/pam_env/pam_env.c: Set DEFAULT_USER_READ_ENVFILE to 0.
+
+2020-02-24 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_env: code cleanups.
+ Raise BUF_SIZE to 8192 bytes.
+
+ * modules/pam_env/pam_env.c (_parse_env_file): Ignore lines starting with '='.
+ (_assemble_line): Detect long lines and binary files.
+ (_check_var): Avoid overwriting global variable.
+ (_expand_arg): Avoid repeated strlen calls.
+
+2020-02-18 Topi Miettinen <toiwoton@gmail.com>
+
+ pam_namespace: secure tmp-inst directories.
+ When using polyinstantiation for /tmp and/or /var/tmp, pam_namespace
+ creates subdirectories with fixed name tmp-inst. These paths should be
+ secured as early as possible to avoid that somehow these directories
+ could created and controlled by for example a malicious user or
+ service.
+
+ Ship a systemd service, which creates the directories early in
+ boot sequence with correct permissions and ownership.
+
+ Closes #111.
+
+2020-02-18 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Fix warnings from the recent PR merges.
+ * modules/pam_succeed_if/pam_succeed_if.c: Fix const issues.
+ * modules/pam_usertype/pam_usertype.c: Avoid maybe used uninitialized warning.
+
+2020-02-18 Pavel Březina <pbrezina@redhat.com>
+
+ pam_unix: add nullresetok option to allow reset blank passwords.
+ Adding nullresetok to auth phase of pam_unix module will allow users
+ with blank password to authenticate in order to immediatelly change
+ their password even if nullok is not set.
+
+ This allows to have blank password authentication disabled but still
+ allows administrator to create new user accounts with expired blank
+ password that must be change on the first login.
+
+2020-02-18 Serghei Anicheev <serghei.anicheev@gmail.com>
+
+ pam_succeed_if: Add list support for group membership checks.
+ Examples:
+ account requisite pam_succeed_if.so user ingroup group1:group2
+ OR
+ account requisite pam_succeed_if.so user notingroup group1:group2
+ OR
+ account requisite pam_succeed_if.so user ingroup wheel
+ OR
+ account requisite pam_succeed_if.so user notingroup wheel
+
+ Can be very convenient to grant access based on complex group memberships (LDAP, etc)
+
+2020-02-18 MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
+
+ Remove redundant header file inclusion.
+ There are some source code including the same header file redundantly.
+ We remove these redundant header file inclusion.
+
+2020-01-29 edneville <ed-github@s5h.net>
+
+ pam_tally[2]: Updating man pages to indicate account leakage without silent
+ * modules/pam_tally/pam_tally.8.xml: Mention account leakage without silent
+ * modules/pam_tally2/pam_tally2.8.xml: Mention account leakage without silent
+
+2020-01-29 Jakub Wilk <jwilk@jwilk.net>
+
+ pam_keyinit.8: add missing comma.
+
+2020-01-28 Pavel Březina <pbrezina@redhat.com>
+
+ pam_usertype: new module to tell if uid is in login.defs ranges.
+ This module will check if the user account type is system or regular based
+ on its uid. To evaluate the condition it will use 0-99 reserved range
+ together with `SYS_UID_MIN` and `SYS_UID_MAX` values from `/etc/login.defs`.
+
+ If these values are not set, it uses configure-time defaults
+ `--with-sys-uid-min` and `--with-uid-min` (according to `login.defs` man page
+ `SYS_UID_MAX` defaults to `UID_MIN - 1`.
+
+ This information can be used to skip specific module in pam stack
+ based on the account type. `pam_succeed_if uid < 1000` is used at the moment
+ however it does not reflect changes to `login.defs`.
+
+2020-01-27 Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+ configure.ac: add --enable-doc option.
+ Allow the user to disable documentation through --disable-doc (enabled
+ by default), this is especially useful when cross-compiling for embedded
+ targets
+
+2020-01-20 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix remaining -Wcast-qual compilation warnings.
+ Introduce a new internal header file with definitions of
+ DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL macros,
+ use them to temporary silence -Wcast-qual compilation warnings
+ in various modules.
+
+ * libpam/include/pam_cc_compat.h: New file.
+ * libpam/Makefile.am (noinst_HEADERS): Add include/pam_cc_compat.h.
+ * modules/pam_mkhomedir/pam_mkhomedir.c: Include "pam_cc_compat.h".
+ (create_homedir): Wrap execve invocation in DIAG_PUSH_IGNORE_CAST_QUAL
+ and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_namespace/pam_namespace.c: Include "pam_cc_compat.h".
+ (pam_sm_close_session): Wrap the cast that discards ‘const’ qualifier
+ in DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_tty_audit/pam_tty_audit.c: Include "pam_cc_compat.h".
+ (nl_send): Wrap the cast that discards ‘const’ qualifier in
+ DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_unix/pam_unix_acct.c: Include "pam_cc_compat.h".
+ (_unix_run_verify_binary): Wrap execve invocation in
+ DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_unix/pam_unix_passwd.c: Include "pam_cc_compat.h".
+ (_unix_run_update_binary): Wrap execve invocation in
+ DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_unix/passverify.c: Include "pam_cc_compat.h".
+ (unix_update_shadow): Wrap the cast that discards ‘const’ qualifier
+ in DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_unix/support.c: Include "pam_cc_compat.h".
+ (_unix_run_helper_binary): Wrap execve invocation in
+ DIAG_PUSH_IGNORE_CAST_QUAL and DIAG_POP_IGNORE_CAST_QUAL.
+ * modules/pam_xauth/pam_xauth.c: Include "pam_cc_compat.h".
+ (run_coprocess): Wrap execv invocation in DIAG_PUSH_IGNORE_CAST_QUAL
+ and DIAG_POP_IGNORE_CAST_QUAL.
+
+2020-01-20 Dmitry V. Levin <ldv@altlinux.org>
+
+ _pam_mkargv: add const qualifier to the first argument.
+ Also fix the following compilation warning:
+
+ tests/tst-pam_mkargv.c:21:22: warning: initialization discards ‘const’
+ qualifier from pointer target type [-Wdiscarded-qualifiers]
+ char *argvstring = "user = XENDT\\userα user=XENDT\\user1";
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ * libpam/pam_misc.c (_pam_mkargv): Add const qualifier to the first
+ argument.
+ * libpam/pam_private.h (_pam_mkargv): Likewise.
+ * tests/tst-pam_mkargv.c (main): Convert argvstring from a pointer into
+ a static const string, make argvresult array static const.
+
+2020-01-20 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Fix miscellaneous const issues.
+ * libpam/pam_modutil_searchkey.c: Avoid assigning empty string literal to
+ non-const char *.
+ * modules/pam_filter/pam_filter.c: Avoid using const char **.
+ * modules/pam_mkhomedir/pam_mkhomedir.c: Properly cast out const for execve().
+ * modules/pam_namespace/pam_namespace.c: Properly cast out const from pam data.
+ * modules/pam_tally2/pam_tally2.c: String literal must be assigned to
+ const char *.
+
+2020-01-17 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Return NULL instead of calling crypt_md5_wrapper().
+ If the call to the crypt(3) function failed for some reason during
+ hashing a new login passphrase, the wrapper function for computing
+ a hash with the md5crypt method was called internally by the pam_unix
+ module in previous versions of linux-pam.
+
+ With CVE-2012-3287 in mind, the md5crypt method is not considered to
+ be a safe nor recommended hashing method for a new login passphrase
+ since at least 2012. Thus pam_unix should error out in case of a
+ failure in crypt(3) instead of silently computing a hashed passphrase
+ using a potentially unsafe method.
+
+ * modules/pam_unix/pam_unix.8.xml: Update documentation.
+ * modules/pam_unix/passverify.c (create_password_hash): Return NULL
+ on error instead of silently invoke crypt_md5_wrapper().
+
+2020-01-15 Hulto <jack.m.mckenna@gmail.com>
+
+ Changed variable salt to hash.
+ helper_verify_password's variable salt is not just the salt but the whole hash. Renamed for clarity and conformity with the rest of the code.
+
+2020-01-15 Josef Moellers <jmoellers@suse.de>
+
+ Add two missing va_end() calls According to the man pages, "Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function."
+
+2020-01-15 Steve Langasek <steve.langasek@canonical.com>
+
+ Further grammar fixes.
+
+ Bug-Debian: https://bugs.debian.org/651560
+
+2020-01-15 Steve Langasek <steve.langasek@canonical.com>
+
+ Miscellaneous spelling fixes.
+
+ Miscellaneous grammar fixes.
+
+2020-01-10 Andreas Henriksson <andreas@fatal.se>
+
+ pam_umask: document the 'nousergroups' option.
+ Add a short description of the nousergroups to the pam_umask(8)
+ man-page.
+
+2020-01-10 Andreas Henriksson <andreas@fatal.se>
+
+ pam_umask: add new 'nousergroups' module argument.
+ This is particularly useful when pam has been built with the new
+ --enable-usergroups configure switch, allowing users to override
+ the default-enabled state and disabling usergroups at runtime.
+
+ This is synonymous but opposite to current and previous pam_umask
+ default that could be changed to enabled at runtime with the usergroups
+ argument.
+
+2020-01-10 Andreas Henriksson <andreas@fatal.se>
+
+ pam_umask: build-time usergroups option default.
+ This change adds a configure option to set the default value of the
+ usergroups option (of the pam_umask module) at build-time.
+
+ Distributions usually makes the decision if usergroups should be used or
+ not. This allows them to control the built-in default value, without
+ having to ship the value in a config file (cluttering up the view
+ of actually relevant user/system configuration overrides).
+
+2020-01-02 msalle <mischa.salle@gmail.com>
+
+ pam_access: Fix (IPv6) address prefix size matching.
+ IPv6 address prefix sizes larger than 128 (i.e. not larger or equal to) should
+ be discarded. Additionally, for IPv4 addresses, the largest valid prefix size
+ should be 32.
+
+ Fixes #161
+
+2019-12-18 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Do not use CFLAGS for warning flags set from configure.
+ To be able to set CFLAGS from make command-line but not to lose the
+ warning flags.
+
+ * configure.ac: Put warning flags to WARN_CFLAGS instead of CFLAGS.
+ * */Makefile.am: Apply WARN_CFLAGS to AM_CFLAGS.
+
+2019-12-17 Balint Reczey <balint.reczey@canonical.com>
+
+ Return only PAM_IGNORE or error from pam_motd.
+ Follow-up for c81280b16e1831ab0bdd0383486c7e2d1eaf1b5e.
+ * modules/pam_motd/pam_motd.c: Return PAM_IGNORE if pam_putenv succeeds.
+ * modules/pam_motd/pam_motd.8.xml: Document additional possible return values of the module.
+
+2019-12-16 Dmitry V. Levin <ldv@altlinux.org>
+
+ Add initial Travis CI support.
+ This runs "make distcheck" using gcc-9, gcc-8, gcc-7, and clang
+ on x86_64, x86, x32, aarch64, s390x, and ppc64le architectures.
+
+ * .travis.yml: New file.
+ * ci/install-dependencies.sh: Likewise.
+ * ci/run-build-and-tests.sh: Likewise.
+
+ Resolves: https://github.com/linux-pam/linux-pam/issues/28
+
+2019-12-16 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_pwhistory: fix build when -lxcrypt is not available.
+ When xcrypt.h is available but -lxcrypt is not, pam_pwhistory fails to
+ build with the following diagnostics:
+ modules/pam_pwhistory/opasswd.c:111: undefined reference to `xcrypt_r'
+
+ Fix this by using the same check for xcrypt as in other modules.
+
+ * modules/pam_pwhistory/opasswd.c: Replace HAVE_XCRYPT_H with
+ HAVE_LIBXCRYPT.
+
+2019-12-16 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Fix or suppress various warnings when compiling with -Wall -Wextra.
+ * conf/pam_conv1/Makefile.am: Add -Wno-unused-function -Wno-sign-compare to CFLAGS.
+ * doc/specs/Makefile.am: Likewise.
+
+ * libpamc/include/security/pam_client.h: Explicitly compare old_p with NULL.
+
+ * modules/pam_access/pam_access.c: Avoid double const.
+
+ * modules/pam_filter/pam_filter.c: Avoid arbitrary constants. Avoid strncpy()
+ without copying the NUL byte.
+
+ * modules/pam_group/pam_group.c: Mark switch fallthrough with comment.
+ * modules/pam_time/pam_time.c: Likewise.
+
+ * modules/pam_limits/pam_limits.c: Remove unused units variable.
+
+ * modules/pam_listfile/pam_listfile.c: Avoid unnecessary strncpy, use pointers.
+
+ * modules/pam_rootok/pam_rootok.c (log_callback): Mark unused parameter.
+
+ * modules/pam_selinux/pam_selinux.c: Use string_to_security_class() instead
+ of hardcoded value.
+
+ * modules/pam_sepermit/pam_sepermit.c: Properly cast when comparing.
+
+ * modules/pam_succeed_if/pam_succeed_if.c: Mark unused parameters.
+
+ * modules/pam_unix/pam_unix_passwd.c: Remove unused variables and properly
+ cast for comparison.
+
+ * modules/pam_unix/support.c: Remove unused function.
+
+2019-12-04 Balint Reczey <balint@balintreczey.hu>
+
+ pam_motd: Export MOTD_SHOWN=pam after showing MOTD.
+ This is a useful indication for update-motd profile.d snippet which can
+ also try to show MOTD when it is not already shown.
+
+ The use-case for that is showing MOTD in shells in containers without
+ PAM being involved.
+
+ * modules/pam_motd/pam_motd.c: Export MOTD_SHOWN=pam after showing MOTD
+ * modules/pam_motd/pam_motd.8.xml: Mention setting MOTD_SHOWN=pam in the man page
+
+2019-11-28 ppkarwasz <piotr.github@karwasz.org>
+
+ Adds an auth module to pam_keyinit (#150)
+ Adds an auth module to pam_keyinit, whose implementation of
+ pam_sm_setcred
+ is identical to the implementation of pam_sm_open_session.
+
+ It is useful with PAM applications, which call pam_setcred,
+ before calling pam_open_session.
+
+ * modules/pam_keyinit/pam_keyinit.c: Add an auth module to pam_keyinit.
+
+ * modules/pam_keyinit/pam_keyinit.8.xml: Update the manpage
+ to describe the new functionality.
+
+2019-11-28 Sophie Herold <sophie@hemio.de>
+
+ Lower "bad username" log priority (#154)
+ * modules/pam_unix/pam_unix_auth.c: Use LOG_NOTICE instead of LOG_ERR.
+ * modules/pam_unix/pam_unix_passwd.c: Likewise.
+ * modules/pam_umask/pam_umask.c: Likewise.
+
+2019-11-04 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_namespace: Support for noexec, nosuid and nodev flags for tmpfs mounts
+ * modules/pam_namespace/namespace.conf.5.xml: Add documentation for the
+ noexec, nosuid, and nodev flags support.
+ * modules/pam_namespace/pam_namespace.c (filter_mntopts): New function to
+ filter out the flags.
+ (parse_method): Call the function.
+ (ns_setup): Apply the flags to the tmpfs mount.
+ * modules/pam_namespace/pam_namespace.h: Add mount_flags to polydir_s struct.
+
+2019-11-04 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Optimize the checkgrouplist function.
+ There is no point in rising the allocation size by doubling when
+ we can allocate required memory size at once in the second pass.
+
+ * libpam/pam_modutil_ingroup.c (checkgrouplist): Allocate some reasonable
+ default size in first pass and required size in the second pass.
+
+2019-10-15 MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
+
+ doc: fix module type written in MODULE TYPES PROVIDED.
+
+2019-10-14 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_unix: Add logging useful for debugging problems.
+ Two messages added about obtaining the username are guarded
+ by the debug option as these should not be normally
+ logged - they can be useful for debugging but they do not
+ indicate any special condition.
+
+ The message about authenticating user with blank password is
+ still just LOG_DEBUG priority but it is logged unconditionally
+ because it is somewhat extraordinary condition to have an user
+ with blank password.
+
+ * modules/pam_unix/pam_unix_auth.c (pam_sm_authenticate): Replace
+ D() macro calls which are not enabled on production builds with
+ regular pam_syslog() calls.
+
+2019-10-10 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_unix: Fix the spelling of Jan Rękorajski's name.
+
+2019-10-08 MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
+
+ doc: fix typo in manpage.
+
+2019-10-03 MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
+
+ pam_mkhomedir: Add debug option to pam_mkhomedir(8) man page.
+
+2019-09-23 Marek Černocký <marek@manet.cz>
+
+ Fixed missing quotes in configure script.
+
+2019-09-16 Thorsten Kukuk <5908016+thkukuk@users.noreply.github.com>
+
+ Add support for a vendor directory and libeconf (#136)
+ With this, it is possible for Linux distributors to store their
+ supplied default configuration files somewhere below /usr, while
+ /etc only contains the changes made by the user. The new option
+ --enable-vendordir defines where Linux-PAM should additional look
+ for pam.d/*, login.defs and securetty if this files are not in /etc.
+ libeconf is a key/value configuration file reading library, which
+ handles the split of configuration files in different locations
+ and merges them transparently for the application.
+
+2019-09-12 Carlos Santos <casantos@redhat.com>
+
+ pam_lastlog: document the 'unlimited' option.
+
+2019-09-12 Carlos Santos <casantos@redhat.com>
+
+ pam_lastlog: prevent crash due to reduced 'fsize' limit.
+ It a reduced fsize limit is set in /etc/security/limits.conf and
+ pam_limits is in use pam_lastlog may cause a crash, e.g.
+
+ ----- begin /etc/pam.d/su ----
+ auth sufficient pam_rootok.so
+ auth required pam_wheel.so use_uid
+ auth required pam_env.so
+ auth required pam_unix.so nullok
+ account required pam_unix.so
+ password required pam_unix.so nullok
+ session required pam_limits.so
+ session required pam_env.so
+ session required pam_unix.so
+ session optional pam_lastlog.so
+ ----- end /etc/pam.d/su -----
+
+ ----- begin /etc/security/limits.d/fsize.conf -----
+ * soft fsize 1710
+ * hard fsize 1710
+ ----- end /etc/security/limits.d/fsize.conf -----
+
+ # id user1
+ uid=1000(user1) gid=1000(user1) groups=1000(user1)
+ # su - user1
+ Last login: Wed Sep 11 01:52:44 UTC 2019 on console
+ $ exit
+ # id user2
+ uid=60000(user2) gid=60000(user2) groups=60000(user2)
+ # su - user2
+ File size limit exceeded
+
+ This happens because pam_limits sets RLIMIT_FSIZE before pam_lastlog
+ attempts to write /var/log/lastlog, leading to a SIGXFSZ signal.
+
+ In order to fix this, and an 'unlimited' option, which leads to saving
+ the 'fsize' limit and set it to unlimited before writing lastlog. After
+ that, restore the saved value. If 'fsize' is already unlimited nothing
+ is done.
+
+ Failing to set the 'fsize' limit is not a fatal error. With luck the
+ configured limit will suffice, so we try to write lastlog anyway, even
+ under the risk of dying due to a SIGXFSZ.
+
+ Failing to restore the 'fsize' limit is a fatal error, since we don't
+ want to keep it unlimited.
+
+2019-09-11 ed <ed@s5h.net>
+
+ pam_unix_sess.c add uid for opening session.
+ This adds the UID of the target user to the session open log.
+
+ Also fixing tabulation in pam_unix_sess.c.
+
+2019-09-09 lifecrisis <15251574+lifecrisis@users.noreply.github.com>
+
+ Fix the man page for "pam_fail_delay()"
+ This man page contained the incorrect statement that setting the
+ PAM_FAIL_DELAY item to NULL would disable any form of delay on
+ authentication failure.
+
+ I removed the incorrect statement and added a paragraph explaining
+ how an application should properly avoid delays.
+
+ Closes #137.
+
+2019-09-06 lifecrisis <15251574+lifecrisis@users.noreply.github.com>
+
+ Fix a typo.
+ There is an extra space where there should not be one.
+
+2019-09-06 lifecrisis <15251574+lifecrisis@users.noreply.github.com>
+
+ Update a function comment.
+ The function comment for "_pam_await_timer()" does not mention the
+ intended behavior of prioritizing the "PAM_FAIL_DELAY" item.
+
+ I updated the comment to make this intention clear.
+
+2019-09-02 Matt Cowell <matt.cowell@nokia.com>
+
+ pwhistory: fix read of uninitialized data and memory leak when modifying opasswd
+ The glibc implementation of getline/getdelim does not guarantee a NUL
+ terminator in lineptr if getline returns failure (-1). This occurs when
+ the opasswd file exists but is empty. Since strdup is called
+ immediately afterwards, this causes strdup to read uninitialized memory
+ and possibly buffer overrun / crash.
+
+ This also fixes a memory leak which always occurs when reading the last
+ line of the opasswd file. Since the strdup is called before checking
+ the return code from getline, getdelim, or fgets+strlen, it will
+ duplicate and never free either:
+ - The last successfully read line (for getline or getdelim)
+ - Uninitialized data (if the file is empty)
+ - A 0 byte string (for fgets+strlen)
+
+ Fix by always checking the return code of getline, getdelim, or
+ fgets+strlen before calling strdup.
+
+2019-08-26 Christophe Besson <cbesson@redhat.com>
+
+ libpam/pam_modutil_sanitize.c: optimize the way to close fds.
+
+2019-08-07 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_tty_audit: Manual page clarification about password logging.
+ * modules/pam_tty_audit/pam_tty_audit.8.xml: Explanation why passwords
+ can be sometimes logged even when the option is not set.
+
+2019-08-07 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_get_authtok_verify: Avoid duplicate password verification.
+ If password was already verified by previous modules in the stack
+ it does not need to be verified by pam_get_authtok_verify either.
+
+ * libpam/pam_get_authtok.c (pam_get_authtok_internal): Set the authtok_verified
+ appropriately.
+ (pam_get_authtok_verify): Do not prompt if authtok_verified is set and
+ set it when the password is verified.
+ * libpam/pam_private.h: Add authtok_verified to the pam handle struct.
+ * libpam/pam_start.c (pam_start): Initialize authtok_verified.
+
+2019-07-16 2*yo <yohann@lepage.info>
+
+ Mention that ./autogen.sh is needeed to be run if you check out the sources from git
+
+2019-06-27 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_unix: Correct MAXPASS define name in the previous two commits.
+ * modules/pam_unix/pam_unix_passwd.c: Change MAX_PASS to MAXPASS.
+ * modules/pam_unix/support.c: Likewise.
+
+2019-06-27 Florian Best <best@univention.de>
+
+ Restrict password length when changing password.
+
+ Trim password at PAM_MAX_RESP_SIZE chars.
+ Issue #118: Protect against Denial of Service attacks.
+ To prevent hashsum generation via crypt of very long passwords the
+ password is now stripped to 512 characters. This is equivalent behavior
+ to unix_chkpwd.
+
+2019-05-23 Olaf Mandel <o.mandel@menlosystems.com>
+
+ pam_succeed_if: Request user data only when needed.
+ Allow for conditions that just check the user field to also work for
+ users not known to the system. Before this caused a PAM_USER_UNKNOWN
+ even if no extra data for an existing user was needed. E.g.
+
+ auth sufficient pam_succeed_if.so user = NotKnownToSystem
+
+ modules/pam_succeed_if/pam_succeed_if.c (evaluate): Change the pwd
+ parameter to an input/output parameter. Lazily request pwd with
+ pam_modutil_getpwnam() if needed and return PAM_USER_UNKNOWN on failure.
+
+ modules/pam_succeed_if/pam_succeed_if.c (pam_sm_authenticate): Don't
+ request the pwd if !use_uid anymore and shift the output from audit to
+ after the evaluate() call. Also make sure not to give the normal failure
+ message if the lazy pwd loading failed.
+
+2019-02-26 Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+
+ pam_tally2: Remove unnecessary fsync()
+ pam_tally2 does fsync() after writing to a tally file.
+ This causes hard drive cache flushes on every failed SSH login on many
+ (if not most) filesystems.
+ And an internet-exposed machine can have a lot of these failed logins.
+
+ This operation however doesn't seem to be necessary - the pam_tally2
+ module does not do any operation which would need explicit post-crash
+ ordering, it just does simple file reads and writes.
+ And doing a fsync() after them doesn't close any race if the system happens
+ to crash between a write being posted and its fsync() completion.
+
+ Let's remove this operation to get rid of all these extra cache flushes.
+
+2019-02-19 vkwitshana <vkwitshana@gmail.com>
+
+ Fixed a grammer mistake.
+
+2019-01-10 Christopher Head <chead@chead.ca>
+
+ Fix documentation for pam_wheel.
+ By default, pam_wheel checks for applicant membership in the wheel group
+ for *all* access requests, regardless of whether the target user is root
+ or non-root. Only if root_only is provided does it limit the membership
+ check to cases when the target user is root. Update the documentation to
+ reflect this.
+
+2019-01-10 Louis Sautier <sautier.louis@gmail.com>
+
+ Fix a typo in the documentation.
+
+2019-01-10 Nir Soffer <nsoffer@redhat.com>
+
+ pam_lastlog: Improve silent option documentation.
+ The silent option explicitly silents only the last login message and not
+ bad logins. Add a note to the manual to make this clear.
+
+ * modules/pam_lastlog/pam_lastlog.8.xml: Clearify "silent showfailed"
+
+2019-01-10 Nir Soffer <nsoffer@redhat.com>
+
+ pam_lastlog: Respect PAM_SILENT flag.
+ pam_lastlog module will not log info about failed login if the session
+ was opened with PAM_SILENT flag.
+
+ Example use case enabled by this change:
+
+ sudo --non-interactive program
+
+ If this command is run by another program expecting specific output from
+ the command run by sudo, the unexpected info about failed logins will
+ break this program.
+
+ * modules/pam_lastlog/pam_lastlog.c: Respect silent option.
+ (_pam_session_parse): Unset LASTLOG_BTMP if PAM_SILENT is set.
+
+2019-01-04 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Fix regressions from the last commits.
+ * configure.ac: Test for logwtmp needs -lutil in LIBS.
+ * modules/Makefile.am: Fix indentation of variable assignments causing
+ creation of incorrect Makefile.
+
+2019-01-04 Rosen Penev <rosenp@gmail.com>
+
+ Replace strndupa with strncpy.
+ glibc only. A static string is better.
+
+2019-01-04 Yousong Zhou <yszhou4tech@gmail.com>
+
+ build: ignore pam_lastlog when logwtmp is not available.
+ * configure.ac: check logwtmp and set COND_BUILD_PAM_LASTLOG
+ * modules/pam_lastlog/Makefile.am: check COND_BUILD_PAM_LASTLOG
+
+ build: ignore pam_rhosts if neither ruserok nor ruserok_af is available.
+ * configure.ac: check for ruserok and ruserok_af
+ * modules/Makefile.am: ignore pam_rhosts/ if it's disabled
+ * modules/pam_rhosts/pam_rhosts.c: include stdlib.h for malloc and free
+
+2018-12-20 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_motd: Cleanup the code and avoid unnecessary logging.
+ The pam_motd module will not log if the default motd.d directories
+ are missing.
+
+ Also cleanup some code cleanliness issues and fix compilation
+ warnings.
+
+ * modules/pam_motd/pam_motd.c: Constification of constant strings.
+ (try_to_display_directory): Removed unused function.
+ (pam_split_string): Replace uint with unsigned int. Fix warnings.
+ (compare_strings): Fix warnings by proper constification.
+ (try_to_display_directories_with_overrides): Cleanups. Switch
+ off the logging if the motd.d directories are missing and they
+ are default ones.
+ (pam_sm_open_session): Cleanup warnings. Pass the information
+ to try_to_display_directories_with_overrides() that non-default
+ motd options are used.
+
+2018-12-20 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_lastlog: Limit lastlog file use by LASTLOG_UID_MAX option in login.defs.
+ * modules/pam_lastlog/pam_lastlog.8.xml: Add the documentation of the
+ LASTLOG_UID_MAX option.
+ * modules/pam_lastlog/pam_lastlog.c: New function get_lastlog_uid_max().
+ (last_login_date): Check the uid against the get_lastlog_uid_max().
+ (pam_authenticate): Likewise.
+
+2018-12-11 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Move the duplicated search_key function to pam_modutil.
+ * libpam/pam_modutil_searchkey.c: New source file with pam_modutil_search_key().
+ * libpam/Makefile.am: Add the pam_modutil_searchkey.c.
+ * libpam/include/security/pam_modutil.h: Add the pam_modutil_search_key() prototype.
+ * libpam/libpam.map: Add the pam_modutil_search_key() into a new version.
+ * modules/pam_faildelay/pam_faildelay.c: Drop search_key() and use
+ pam_modutil_search_key().
+ * modules/pam_umask/pam_umask.c: Likewise.
+ * modules/pam_unix/support.c: Likewise.
+
+2018-11-27 Tomas Mraz <tmraz@fedoraproject.org>
+
+ pam_unix: Use pam_syslog instead of helper_log_err.
+ * modules/pam_unix/passverify.c (verify_pwd_hash): Add pamh argument via
+ PAMH_ARG_DECL. Call pam_syslog() instead of helper_log_err().
+ * modules/pam_unix/passverify.h: Adjust the declaration of verify_pwd_hash().
+ * modules/pam_unix/support.c (_unix_verify_password): Add the pamh argument
+ to verify_pwd_hash() call.
+
+2018-11-27 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Report unusable hashes found by checksalt to syslog.
+ libxcrypt can be build-time configured to support (or not support)
+ various hashing methods. Future versions will also have support for
+ runtime configuration by the system's vendor and/or administrator.
+
+ For that reason adminstrator should be notified by pam if users cannot
+ log into their account anymore because of such a change in the system's
+ configuration of libxcrypt.
+
+ Also check for malformed hashes, like descrypt hashes starting with
+ "$2...", which might have been generated by unsafe base64 encoding
+ functions as used in glibc <= 2.16.
+ Such hashes are likely to be rejected by many recent implementations
+ of libcrypt.
+
+ * modules/pam_unix/passverify.c (verify_pwd_hash): Report unusable
+ hashes found by checksalt to syslog.
+
+2018-11-27 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Revert "pam_unix: Add crypt_default method, if supported."
+ This reverts commit ad435b386b22b456724dc5c5b8d9f2d1beffc558.
+
+2018-11-27 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Add crypt_default method, if supported.
+ libxcrypt since v4.4.0 supports a default method for its
+ gensalt function on most system configurations. As the
+ default method is to be considered the strongest available
+ hash method, it should be preferred over all other hash
+ methods supported by pam.
+
+ * modules/pam_unix/pam_unix.8.xml: Documentation for crypt_default.
+ * modules/pam_unix/passverify.c: Add crypt_default method.
+ * modules/pam_unix/support.h: Likewise.
+
+2018-11-26 Tomas Mraz <tmraz@fedoraproject.org>
+
+ Revert part of the commit 4da9febc.
+ pam_unix: Do not return a hard failure on invalid or disabled salt
+ as in some cases the failure actually is not interesting and can
+ broke things such as password-less sudo.
+
+ * modules/pam_unix/passverify.c (check_shadow_expiry): Revert checking
+ of disabled or invalid salt.
+
+2018-11-23 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Add support for (gost-)yescrypt hashing methods.
+ libxcrypt (v4.2 and later) has added support for the yescrypt
+ hashing method; gost-yescrypt has been added in v4.3.
+
+ * modules/pam_unix/pam_unix.8.xml: Documentation for (gost-)yescrypt.
+ * modules/pam_unix/pam_unix_acct.c: Use 64 bit type for control flags.
+ * modules/pam_unix/pam_unix_auth.c: Likewise.
+ * modules/pam_unix/pam_unix_passwd.c: Likewise.
+ * modules/pam_unix/pam_unix_sess.c: Likewise.
+ * modules/pam_unix/passverify.c: Add support for (gost-)yescrypt.
+ * modules/pam_unix/passverify.h: Use 64 bit type for control flags.
+ * modules/pam_unix/support.c: Set sane rounds for (gost-)yescrypt.
+ * modules/pam_unix/support.h: Add support for (gost-)yescrypt.
+
+2018-11-22 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Fix closing curly brace. (#77)
+ This has been overlooked during review of commit dce80b3f11b3.
+
+ * modules/pam_unix/support.c (_set_ctrl): Fix closing curly brace.
+
+ Closes: https://github.com/linux-pam/linux-pam/issues/77
+
+2018-11-22 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Add support for crypt_checksalt, if libcrypt supports it.
+ libxcrypt v4.3 has added the crypt_checksalt function to whether
+ the prefix at the begining of a given hash string refers to a
+ supported hashing method.
+
+ Future revisions of this function will add support to check whether
+ the hashing method, the prefix refers to, was disabled or considered
+ deprecated by the system's factory presets or system administrator.
+ Furthermore it will be able to detect whether the parameters, which
+ are used by the corresponding hashing method, being encoded in the
+ hash string are not considered to be strong enough anymore.
+
+ *modules/pam_unix/passverify.c: Add support for crypt_checksalt.
+
+2018-11-22 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Prefer a gensalt function, that supports auto entropy.
+ * modules/pam_unix/pam_unix_passwd.c: Initialize rounds parameter to 0.
+ * modules/pam_unix/passverify.c: Prefer gensalt with auto entropy.
+ * modules/pam_unix/support.c: Fix sanitizing of rounds parameter.
+
+2018-11-21 Robert Fairley <rfairley@users.noreply.github.com>
+
+ pam_motd: Fix segmentation fault when no motd_dir specified (#76)
+ This fixes a regression introduced by #69, where motd_path was set
+ to NULL and passed into strdup() if the motd_dir argument was
+ not specified in the configuration file. This caused a segmentation
+ fault.
+
+ * modules/pam_motd/pam_motd.c: fix checks for NULL in arguments
+ * xtests/Makefile.am: add test scripts and config file
+ * xtests/tst-pam_motd.sh: add running tst-pam_motd4.sh
+ * xtests/tst-pam_motd4.pamd: create
+ * xtests/tst-pam_motd4.sh: create
+
+2018-11-19 Robert Fairley <rfairley@users.noreply.github.com>
+
+ pam_motd: Support multiple motd paths specified, with filename overrides (#69)
+ Adds specifying multiple paths to motd files and motd.d
+ directories to be displayed. A colon-separated list of
+ paths is specified as arguments motd and motd_dir to the
+ pam_motd module.
+
+ This gives packages several options to install motd files to.
+ By default, the paths are, with highest priority first:
+ /etc/motd
+ /run/motd
+ /usr/lib/motd
+ /etc/motd.d/
+ /run/motd.d/
+ /usr/lib/motd.d/
+
+ Which is equivalent to the following arguments:
+ motd=/etc/motd:/run/motd:/usr/lib/motd
+ motd_dir=/etc/motd.d:/run/motd.d:/usr/lib/motd.d
+
+ Files with the same filename in a lower-priority directory,
+ as specified by the order in the colon-separated list, are
+ overridden, meaning PAM will not display them.
+
+ This allows a package to contain motd files under
+ /usr/lib instead of the host configuration in /etc.
+ A service may also write a dynamically generated motd in
+ /run/motd.d/ and have PAM display it without needing a
+ symlink from /etc/motd.d/ installed.
+
+ Closes #68
+
+ * modules/pam_motd/pam_motd.8.xml: update documentation
+ * modules/pam_motd/pam_motd.c: add specifying multiple motd paths
+ * xtests/.gitignore: add generated test script
+ * xtests/Makefile.am: add test source, scripts and config files
+ * xtests/tst-pam_motd.c: create
+ * xtests/tst-pam_motd.sh: create
+ * xtests/tst-pam_motd1.pamd: create
+ * xtests/tst-pam_motd1.sh: create
+ * xtests/tst-pam_motd2.pamd: create
+ * xtests/tst-pam_motd2.sh: create
+ * xtests/tst-pam_motd3.pamd: create
+ * xtests/tst-pam_motd3.sh: create
+
+2018-11-16 Björn Esser <besser82@fedoraproject.org>
+
+ pam_unix: Use bcrypt b-variant for computing new hashes.
+ Bcrypt hashes used the "$2a$" prefix since 1997.
+ However, in 2011 an implementation bug was discovered in bcrypt
+ affecting the handling of characters in passphrases with the 8th
+ bit set.
+
+ Besides fixing the bug, OpenBSD 5.5 introduced the "$2b$" prefix
+ for a behavior that exactly matches crypt_blowfish's "$2y$", and
+ the crypt_blowfish implementation supports it as well since v1.1.
+
+ That said new computed bcrypt hashes should use the "$2b$" prefix.
+
+ * modules/pam_unix/passverify.c: Use bcrypt b-variant.
+
+2018-06-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_tally, pam_tally2: fix grammar and spelling (#54)
+ * modules/pam_tally/pam_tally.c (tally_check): Replace
+ "Account is temporary locked" with "The account is temporarily locked"
+ in translated messages.
+ * modules/pam_tally2/pam_tally2.c (tally_check): Likewise.
+ * po/Linux-PAM.pot: Update pam_tally and pam_tally2 messages.
+
+ Closes: https://github.com/linux-pam/linux-pam/issues/54
+
+2018-06-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ Fix grammar of messages printed via pam_prompt.
+ Turn into proper sentences those messages that are printed without
+ further modifications using pam_prompt in contexts where proper
+ sentences are expected.
+
+ * libpam/pam_get_authtok.c (pam_get_authtok_internal): Fix grammar
+ of the message passed to pam_error.
+ * modules/pam_limits/pam_limits.c (pam_sm_open_session): Likewise.
+ * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass): Fix
+ grammar of error messages passed to pam_error.
+ * modules/pam_mail/pam_mail.c (report_mail): Fix grammar of a message
+ passed to pam_info.
+ * modules/pam_timestamp/pam_timestamp.c (verbose_success): Likewise.
+ * modules/pam_selinux/pam_selinux.c (config_context, send_text): Fix
+ grammar of messages passed to pam_prompt.
+ * modules/pam_tally/pam_tally.c (tally_check): Fix grammar of messages
+ passed to pam_info.
+ * modules/pam_tally2/pam_tally2.c (tally_check): Likewise.
+ * modules/pam_unix/pam_unix_acct.c (pam_sm_acct_mgmt): Fix grammar
+ of messages passed to _make_remark.
+ * modules/pam_unix/pam_unix_passwd.c (_pam_unix_approve_pass,
+ pam_sm_chauthtok): Likewise.
+ * po/Linux-PAM.pot: Regenerate.
+
+2018-06-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_stress: do not mark messages for translation.
+ pam_stress is not a regular module that needs to be translated.
+ Besides that, its messages are not easy to understand
+ and even harder to translate properly.
+
+ * modules/pam_stress/pam_stress.c (pam_sm_chauthtok): Do not mark
+ messages for translation.
+ * po/Linux-PAM.pot: Remove pam_stress messages.
+
+2018-05-31 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_unix: remove obsolete _UNIX_AUTHTOK, _UNIX_OLD_AUTHTOK, and _UNIX_NEW_AUTHTOK macros
+ The last use of these macros was removed by commit Linux-PAM-1.3.0~5
+ so their definitions should go as well.
+
+ * modules/pam_unix/pam_unix_auth.c (_UNIX_AUTHTOK): Remove.
+ * modules/pam_unix/pam_unix_passwd.c (_UNIX_OLD_AUTHTOK,
+ _UNIX_NEW_AUTHTOK): Likewise.
+
+ Complements: 7e09188c5dc4 ("pam_unix: Use pam_get_authtok() instead of
+ direct pam_prompt() calls.")
+
+2018-05-31 Dmitry V. Levin <ldv@altlinux.org>
+
+ pam_unix: remove obsolete _unix_read_password prototype.
+ The function was removed by commit Linux-PAM-1.3.0~5
+ so the function prototype should go as well.
+
+ * modules/pam_unix/support.h (_unix_read_password): Remove.
+
+ Complements: 7e09188c5dc4 ("pam_unix: Use pam_get_authtok() instead of
+ direct pam_prompt() calls.")
+
2018-05-18 Thorsten Kukuk <kukuk@thkukuk.de>
Release version 1.3.1.
@@ -213,7 +3948,7 @@
with LOG_NOTICE.
* modules/pam_xauth/pam_xauth.c: Make memory allocation failures LOG_CRIT.
-2016-06-15 Dmitry V. Levin <ldv@altlinux.org>
+2016-06-14 Dmitry V. Levin <ldv@altlinux.org>
pam_timestamp: fix typo in strncmp usage.
Before this fix, a typo in check_login_time resulted to ruser and
@@ -295,6 +4030,8 @@
* modules/pam_unix/support.c (_unix_read_password): Remove.
* modules/pam_unix/support.h: Remove UNIX_NOT_SET_PASS add UNIX_AUTHTOK_TYPE.
+2016-04-06 Tomas Mraz <tmraz@fedoraproject.org>
+
pam_get_authtok(): Add authtok_type support to current password prompt.
* libpam/pam_get_authtok.c (pam_get_authtok_internal): When changing password,
use different prompt for current password allowing for authtok_type to be
@@ -437,6 +4174,8 @@
* modules/pam_tally2/pam_tally2.c (print_one): Check for localtime returning
NULL.
+2016-03-04 Tomas Mraz <tmraz@fedoraproject.org>
+
pam_unix: Silence warnings and fix a minor bug.
Fixes a minor bug in behavior when is_selinux_enabled()
returned negative value.
@@ -646,6 +4385,8 @@
* configure.in: Rename to configure.ac.
+2015-01-07 Dmitry V. Levin <ldv@altlinux.org>
+
Remove unmodified GNU gettext files installed by autopoint.
These files are part of GNU gettext; we have not modified them, they are
installed by autopoint which is called by autoreconf, so they had to be
@@ -713,7 +4454,7 @@
doc: fix a trivial typo in pam_authenticate return values (ticket #38)
* doc/man/pam_authenticate.3.xml: Fix a typo in PAM_AUTHINFO_UNAVAIL.
-2014-12-09 Ronny Chevalier <chevalier.ronny@gmail.com>
+2014-12-08 Ronny Chevalier <chevalier.ronny@gmail.com>
doc: fix typo in pam_authenticate.3.xml.
* doc/man/pam_authenticate.3.xml: Fix typo.
@@ -724,6 +4465,8 @@
modules/pam_succeed_if/pam_succeed_if.c (evaluate): Use PAM_RHOST
and PAM_TTY properly for the rhost and tty values.
+2014-10-17 Tomas Mraz <tmraz@fedoraproject.org>
+
pam_succeed_if: Use long long type for numeric values.
The currently used long with additional conversion to int is
too small for uids and gids.
@@ -814,7 +4557,7 @@
* modules/pam_unix/passverify.c (save_old_password): Test for missing fields
in opasswd entry and skip it.
-2014-07-01 Dmitry V. Levin <ldv@altlinux.org>
+2014-06-30 Dmitry V. Levin <ldv@altlinux.org>
doc: add missing build dependencies for soelim stubs.
* doc/man/Makefile.am [ENABLE_REGENERATE_MAN]: Add dependencies for
@@ -948,16 +4691,22 @@
* modules/pam_xauth/pam_xauth.c (run_coprocess): Likewise.
* modules/pam_unix/support.h (MAX_FD_NO): Remove.
+2014-01-27 Dmitry V. Levin <ldv@altlinux.org>
+
pam_xauth: avoid potential SIGPIPE when writing to xauth process.
Similar issue in pam_unix was fixed by commit Linux-PAM-0-73~8.
* modules/pam_xauth/pam_xauth.c (run_coprocess): In the parent process,
close the read end of input pipe after writing to its write end.
+2014-01-27 Dmitry V. Levin <ldv@altlinux.org>
+
pam_loginuid: log significant loginuid write errors.
* modules/pam_loginuid/pam_loginuid.c (set_loginuid): Log those errors
during /proc/self/loginuid update that are not ignored.
+2014-01-27 Dmitry V. Levin <ldv@altlinux.org>
+
Fix gratuitous use of strdup and x_strdup.
There is no need to copy strings passed as arguments to execve,
the only potentially noticeable effect of using strdup/x_strdup
@@ -982,6 +4731,8 @@
* modules/pam_xauth/pam_xauth.c (run_coprocess): Do not use strdup for
strings passed as arguments to execv.
+2014-01-27 Dmitry V. Levin <ldv@altlinux.org>
+
pam_userdb: fix password hash comparison.
Starting with commit Linux-PAM-0-77-28-g0b3e583 that introduced hashed
passwords support in pam_userdb, hashes are compared case-insensitively.
@@ -1013,6 +4764,8 @@
* modules/pam_loginuid/pam_loginuid.c (set_loginuid): Move loginuid
buffer initialization closer to its first use.
+2014-01-22 Dmitry V. Levin <ldv@altlinux.org>
+
libpam_misc: fix an inconsistency in handling memory allocation errors.
When misc_conv fails to allocate memory for pam_response array, it
returns PAM_CONV_ERR. However, when read_string fails to allocate
@@ -1034,6 +4787,8 @@
a null-terminated string and consistently use it where a null-terminated
string is expected.
+2014-01-20 Dmitry V. Levin <ldv@altlinux.org>
+
pam_mkhomedir: check and create home directory for the same user (ticket #22)
Before pam_mkhomedir helper was introduced in commit
7b14630ef39e71f603aeca0c47edf2f384717176, pam_mkhomedir was checking for
@@ -1166,6 +4921,8 @@
pam_sm_acct_mgmt, pam_sm_open_session, pam_sm_close_session): Pass
"flags" argument to log_items.
+2013-11-20 Dmitry V. Levin <ldv@altlinux.org>
+
Modernize AM_INIT_AUTOMAKE invocation.
Before this change, automake complained that two- and three-arguments
forms of AM_INIT_AUTOMAKE are deprecated.
@@ -1173,12 +4930,16 @@
* configure.in: Pass PACKAGE and VERSION arguments to AC_INIT instead
of AM_INIT_AUTOMAKE.
+2013-11-20 Dmitry V. Levin <ldv@altlinux.org>
+
Fix autoconf warnings.
Before this change, autoconf complained that AC_COMPILE_IFELSE
and AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS.
* configure.in: Call AC_USE_SYSTEM_EXTENSIONS before LT_INIT.
+2013-11-20 Dmitry V. Levin <ldv@altlinux.org>
+
pam_securetty: check return value of fgets.
Checking return value of fgets not only silences the warning from glibc
but also leads to a cleaner code.
@@ -1186,6 +4947,8 @@
* modules/pam_securetty/pam_securetty.c (securetty_perform_check):
Check return value of fgets.
+2013-11-20 Dmitry V. Levin <ldv@altlinux.org>
+
pam_lastlog: fix format string.
gcc -Wformat justly complains:
format '%d' expects argument of type 'int', but argument 5 has type 'time_t'
@@ -1287,7 +5050,7 @@
Updated translations from Transifex.
* po/*.po: Updated translations from Transifex.
-2013-07-02 Dmitry V. Levin <ldv@altlinux.org>
+2013-07-01 Dmitry V. Levin <ldv@altlinux.org>
pam_rootok: fix linking in --enable-audit mode.
pam_rootok.c explicitly uses functions from libaudit, so the module has
@@ -1911,6 +5674,8 @@
Rename all .cvsignore files to .gitignore.
+2011-10-26 Dmitry V. Levin <ldv@altlinux.org>
+
Fix whitespace issues.
Cleanup trailing whitespaces, indentation that uses spaces before tabs,
and blank lines at EOF. Make the project free of warnings reported by
diff --git a/INSTALL b/INSTALL
index 007e9396..8865734f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
Basic Installation
==================
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
+ Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
+'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
- The `configure' shell script attempts to guess correct values for
+ The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
The simplest way to compile this package is:
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
- Running `configure' might take a while. While running, it prints
+ Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
- 2. Type `make' to compile the package.
+ 2. Type 'make' to compile the package.
- 3. Optionally, type `make check' to run any self-tests that come with
+ 3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
- 4. Type `make install' to install the programs and any data files and
+ 4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
+ user, and only the 'make install' phase executed with root
privileges.
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
+ regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
- 7. Often, you can also type `make uninstall' to remove the installed
+ 7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
- 8. Some packages, particularly those that use Automake, provide `make
+ 8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
+ targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
+the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
@@ -113,21 +112,21 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
+own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
- With a non-GNU `make', it is safer to compile the package for one
+ With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
+installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -136,105 +135,104 @@ this:
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
+using the 'lipo' tool if you have problems.
Installation Names
==================
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
+correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
+'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
-affected directory. For example, `make install
+affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
- For packages that use the X Window System, `configure' can usually
+ For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
+execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
+overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
+overridden with 'make V=0'.
Particular systems
==================
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
./configure CC="cc"
@@ -242,26 +240,26 @@ and if that doesn't work, try
./configure CC="cc -nodtk"
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
- There may be some features `configure' cannot figure out
+ There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
+_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
@@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
OS
KERNEL-OS
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
+eventually be run) with '--host=TYPE'.
Sharing Defaults
================
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
+environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
+them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
-causes the specified `gcc' to be used as the C compiler (unless it is
+causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation. Until the limitation is lifted, you can use
-this workaround:
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-`configure' Invocation
+'configure' Invocation
======================
- `configure' recognizes the following options to control how it
+ 'configure' recognizes the following options to control how it
operates.
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
-`--help=short'
-`--help=recursive'
+'--help=short'
+'--help=recursive'
Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
script, and exit.
-`--cache-file=FILE'
+'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
-`--quiet'
-`--silent'
-`-q'
+'--quiet'
+'--silent'
+'-q'
Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
+ suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
-`--srcdir=DIR'
+'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
+ 'configure' can determine that directory automatically.
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
-`--no-create'
-`-n'
+'--no-create'
+'-n'
Run the configure checks, but stop before creating any output
files.
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.
diff --git a/Make.xml.rules b/Make.xml.rules
deleted file mode 100644
index bee30cda..00000000
--- a/Make.xml.rules
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
-#
-
-README: README.xml
- $(XSLTPROC) --path $(srcdir) --xinclude --stringparam generate.toc "none" --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< | $(BROWSER) > $(srcdir)/$@
-
-%.1: %.1.xml
- $(XMLLINT) --nonet --xinclude --postvalid --noout $<
- $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-%.3: %.3.xml
- $(XMLLINT) --nonet --xinclude --postvalid --noout $<
- $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-%.5: %.5.xml
- $(XMLLINT) --nonet --xinclude --postvalid --noout $<
- $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-%.8: %.8.xml
- $(XMLLINT) --nonet --xinclude --postvalid --noout $<
- $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-#CLEANFILES += $(man_MANS) README
diff --git a/Make.xml.rules.in b/Make.xml.rules.in
new file mode 100644
index 00000000..daa1b97b
--- /dev/null
+++ b/Make.xml.rules.in
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
+#
+
+README: $(XMLS)
+
+README: README.xml
+ $(XSLTPROC) --path $(srcdir) --xinclude --stringparam generate.toc "none" @STRINGPARAM_VENDORDIR@ --nonet $(top_srcdir)/doc/custom-html.xsl $< | $(BROWSER) > $(srcdir)/$@
+
+%.1: %.1.xml
+ $(XMLLINT) --nonet --xinclude --postvalid --noout $<
+ $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude @STRINGPARAM_VENDORDIR@ --nonet $(top_srcdir)/doc/custom-man.xsl $<
+
+%.3: %.3.xml
+ $(XMLLINT) --nonet --xinclude --postvalid --noout $<
+ $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude @STRINGPARAM_VENDORDIR@ --nonet $(top_srcdir)/doc/custom-man.xsl $<
+
+%.5: %.5.xml
+ $(XMLLINT) --nonet --xinclude --postvalid --noout $<
+ $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude @STRINGPARAM_VENDORDIR@ --nonet $(top_srcdir)/doc/custom-man.xsl $<
+
+%.8: %.8.xml
+ $(XMLLINT) --nonet --xinclude --postvalid --noout $<
+ $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude @STRINGPARAM_VENDORDIR@ --nonet $(top_srcdir)/doc/custom-man.xsl $<
+
+#CLEANFILES += $(man_MANS) README
diff --git a/Makefile.am b/Makefile.am
index 40b300da..6571e2f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,11 +4,15 @@
AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 dist-xz check-news
-SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
+
+if HAVE_DOC
+SUBDIRS += doc
+endif
CLEANFILES = *~
-EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright Make.xml.rules
+EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright
ACLOCAL_AMFLAGS = -I m4
diff --git a/Makefile.in b/Makefile.in
index 759061df..e9603c1a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
# Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de>
#
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -81,21 +91,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@HAVE_DOC_TRUE@am__append_1 = doc
subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
- $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.h.in ABOUT-NLS COPYING build-aux/compile \
- build-aux/config.guess build-aux/config.rpath \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/missing build-aux/ylwrap build-aux/ltmain.sh \
- $(top_srcdir)/build-aux/compile \
- $(top_srcdir)/build-aux/config.guess \
- $(top_srcdir)/build-aux/config.rpath \
- $(top_srcdir)/build-aux/config.sub \
- $(top_srcdir)/build-aux/install-sh \
- $(top_srcdir)/build-aux/ltmain.sh \
- $(top_srcdir)/build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
@@ -111,11 +108,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = Make.xml.rules
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -151,7 +150,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- cscope distdir dist dist-all distcheck
+ cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
@@ -173,7 +172,20 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf \
+ examples xtests doc
+am__DIST_COMMON = $(srcdir)/Make.xml.rules.in $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(top_srcdir)/build-aux/compile \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.rpath \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/ltmain.sh \
+ $(top_srcdir)/build-aux/missing ABOUT-NLS AUTHORS COPYING \
+ ChangeLog INSTALL NEWS README build-aux/compile \
+ build-aux/config.guess build-aux/config.rpath \
+ build-aux/config.sub build-aux/install-sh build-aux/ltmain.sh \
+ build-aux/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -243,6 +255,8 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+ECONF_CFLAGS = @ECONF_CFLAGS@
+ECONF_LIBS = @ECONF_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
@@ -251,7 +265,6 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
-HAVE_KEY_MANAGEMENT = @HAVE_KEY_MANAGEMENT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -287,6 +300,7 @@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@@ -323,11 +337,13 @@ SECUREDIR = @SECUREDIR@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRINGPARAM_VENDORDIR = @STRINGPARAM_VENDORDIR@
STRIP = @STRIP@
TIRPC_CFLAGS = @TIRPC_CFLAGS@
TIRPC_LIBS = @TIRPC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
@@ -395,9 +411,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 dist-xz check-news
-SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples \
+ xtests $(am__append_1)
CLEANFILES = *~
-EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright Make.xml.rules
+EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright
ACLOCAL_AMFLAGS = -I m4
gen_changelog_start_date = 2011-10-26
all: config.h
@@ -419,15 +436,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -440,8 +456,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -453,6 +469,8 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+Make.xml.rules: $(top_builddir)/config.status $(srcdir)/Make.xml.rules.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
@@ -569,7 +587,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@case `sed 15q $(srcdir)/NEWS` in \
*"$(VERSION)"*) : ;; \
*) \
@@ -643,7 +664,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@@ -657,11 +678,17 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -679,7 +706,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -689,22 +716,23 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -882,6 +910,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
release: dist releasedocs
diff --git a/NEWS b/NEWS
index 810a39e5..e8c0de87 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,55 @@
Linux-PAM NEWS -- history of user-visible changes.
+Release 1.4.0
+* Multiple minor bug fixes and documentation improvements
+* Fixed grammar of messages printed via pam_prompt
+* Added support for a vendor directory and libeconf
+* configure: Added --enable-Werror option to enable -Werror build
+* configure: Allowed disabling documentation through --disable-doc
+* pam_get_authtok_verify: Avoid duplicate password verification
+* pam_cracklib: Fixed parsing of options without arguments
+* pam_env: Changed the default to not read the user .pam_environment file
+* pam_exec: Require a user name to be specified before the command is executed
+* pam_faillock: New module for locking after multiple auth failures
+* pam_group, pam_time: Fixed logical error with multiple ! operators
+* pam_keyinit: In pam_sm_setcred do the same as in pam_sm_open_session
+* pam_lastlog: Do not log info about failed login if the session was opened
+ with PAM_SILENT flag
+* pam_lastlog: Limit lastlog file use by LASTLOG_UID_MAX option in login.defs
+* pam_lastlog: With 'unlimited' option prevent SIGXFSZ due to reduced 'fsize'
+ limit
+* pam_mkhomedir: Fixed return value when the user is unknown
+* pam_motd: Export MOTD_SHOWN=pam after showing MOTD
+* pam_motd: Support multiple motd paths specified, with filename overrides
+* pam_namespace: Added a systemd service, which creates the namespaced
+ instance parent directories during boot
+* pam_namespace: Support for noexec, nosuid and nodev flags for tmpfs mounts
+* pam_selinux: Check unknown object classes or permissions in current policy
+* pam_selinux: Fall back to log to syslog if audit logging fails
+* pam_setquota: New module to set or modify disk quotas on session start
+* pam_shells: Recognize /bin/sh as the default shell
+* pam_succeed_if: Fixed potential override of the default prompt
+* pam_succeed_if: Support lists in group membership checks
+* pam_time: Added conffile= option to specify an alternative configuration file
+* pam_tty_audit: If kernel audit is disabled return PAM_IGNORE
+* pam_umask: Added new 'nousergroups' module argument and allowed specifying
+ the default for usergroups at build-time
+* pam_unix: Added 'nullresetok' option to allow resetting blank passwords
+* pam_unix: Report unusable hashes found by checksalt to syslog
+* pam_unix: Return PAM_AUTHINFO_UNAVAIL when shadow entry is unavailable
+* pam_unix: Support for (gost-)yescrypt hashing methods
+* pam_unix: Use bcrypt b-variant when it bcrypt is chosen
+* pam_usertype: New module to tell if uid is in login.defs ranges
+* Fixed and documented possible values returned by pam_get_user()
+* Added new API call pam_start_confdir() for special applications that
+ cannot use the system-default PAM configuration paths and need to
+ explicitly specify another path
+* Deprecated pam_cracklib: this module is no longer built by default and will
+ be removed in the next release, use pam_passwdqc (from passwdqc project)
+ or pam_pwquality (from libpwquality project) instead
+* Deprecated pam_tally and pam_tally2: these modules are no longer built
+ by default and will be removed in the next release, use pam_faillock instead
+
Release 1.3.1
* pam_motd: add support for a motd.d directory
* pam_umask: Fix documentation to align with order of loading umask
@@ -82,8 +132,8 @@ Release 1.1.4
Release 1.1.3
-* pam_namespace: Clean environment for childs (CVE-2010-3853)
-* libpam: New interface to drop/regain privilegs
+* pam_namespace: Clean environment for child processes (CVE-2010-3853)
+* libpam: New interface to drop/regain privileges
* Drop root privilegs in pam_env, pam_mail and pam_xauth before
accessing user files (CVE-2010-3430, CVE-2010-3431)
* pam_unix: Add minlen option, change default from 6 to 0
@@ -189,7 +239,7 @@ Release 0.99.10.0
SELinux mode.
* Improved functionality of pam_namespace.so module (method flags,
namespace.d configuration directory, new options).
-* Finaly removed deprecated pam_rhosts_auth module.
+* Finally removed deprecated pam_rhosts_auth module.
Release 0.99.9.0
@@ -283,7 +333,7 @@ Release 0.99.4.0
* Add test suite
* Fix building of static variants of libpam, libpamc and libpam_misc
* pam_listfile: Add support for password and session management
-* pam_exec: New PAM module to execute arbitary commands
+* pam_exec: New PAM module to execute arbitrary commands
* Fix building of a static libpam including all PAM modules
* New/updated translations for: nl, pt, pl, fi, km, tr, uk, fr
* pam_access: Add network(address) / netmask and IPv6 support
diff --git a/README b/README
index 994dd95a..21af8c4c 100644
--- a/README
+++ b/README
@@ -1,4 +1,3 @@
-
Hello!
Thanks for downloading Linux-PAM.
@@ -7,6 +6,19 @@ NOTES:
How to use it is as follows:
+Please look at the ci/install_dependencies.sh for the necessary
+prerequisite packages to be able to build the Linux-PAM. The script
+is targeted at Debian based Linux distributions so the package
+names and availability might differ on other distributions.
+
+If you check out the sources from git, install Autotools and generate
+configuration scripts, ensuring you have the minimum packages installed,
+the ci scripts may help here:
+
+ ./autogen.sh
+
+Then compile:
+
./configure --help | less
./configure <your-options>
make
@@ -34,7 +46,7 @@ box may stop working..)
make install
That said, please report problems to the bug reporting database
-on sourceforge.net.
+at https://github.com/linux-pam/linux-pam/issues .
You can run additional checks after installing by executing
@@ -46,16 +58,6 @@ WARNING: Running "make xtests" can overwrite configuration data
or make the system insecure/unfunctional for a short time!
Backup all important data before!
-
-If you do not wish to make the modules dynamically loadable, but
-build a static libpam including all PAM modules, you have to call:
-
- ./configure --enable-static-modules --disable-pie
-
-To run the build checks with static modules, you need to run the
-following command: make -C test check && make check
-
-
To regenerate manual pages from the XML source files you need the
docbook-xsl stylesheets in version 1.69.1 or newer, older versions had
a bug which generates a broken layout.
diff --git a/aclocal.m4 b/aclocal.m4
index 44614c9a..8ab8da24 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,32 +20,63 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@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 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl 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; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -67,18 +98,19 @@ if test -n "$PKG_CONFIG"; then
PKG_CONFIG=""
fi
fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+])dnl PKG_PROG_PKG_CONFIG
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
@@ -88,8 +120,10 @@ m4_ifvaln([$3], [else
$3])dnl
fi])
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
@@ -101,10 +135,11 @@ m4_define([_PKG_CONFIG],
else
pkg_failed=untried
fi[]dnl
-])# _PKG_CONFIG
+])dnl _PKG_CONFIG
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -112,26 +147,24 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
else
_pkg_short_errors_supported=no
fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -141,11 +174,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
- else
+ else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
@@ -162,7 +195,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -178,16 +211,40 @@ else
AC_MSG_RESULT([yes])
$3
fi[]dnl
-])# PKG_CHECK_MODULES
+])dnl PKG_CHECK_MODULES
-# PKG_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable pkgconfigdir as the location where a module
-# should install pkg-config .pc files. By default the directory is
-# $libdir/pkgconfig, but the default can be changed by passing
-# DIRECTORY. The user can override through the --with-pkgconfigdir
-# parameter.
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -198,16 +255,18 @@ AC_ARG_WITH([pkgconfigdir],
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
-]) dnl PKG_INSTALLDIR
+])dnl PKG_INSTALLDIR
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable noarch_pkgconfigdir as the location where a
-# module should install arch-independent pkg-config .pc files. By
-# default the directory is $datadir/pkgconfig, but the default can be
-# changed by passing DIRECTORY. The user can override through the
-# --with-noarch-pkgconfigdir parameter.
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -218,13 +277,15 @@ AC_ARG_WITH([noarch-pkgconfigdir],
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
-]) dnl PKG_NOARCH_INSTALLDIR
+])dnl PKG_NOARCH_INSTALLDIR
-# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------
-# Retrieves the value of the pkg-config variable for the given module.
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
@@ -233,9 +294,9 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])# PKG_CHECK_VAR
+])dnl PKG_CHECK_VAR
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -247,10 +308,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.13'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.13.4], [],
+m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -266,14 +327,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.4])dnl
+[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -325,7 +386,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -356,7 +417,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -547,13 +608,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -561,49 +621,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. Try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -612,18 +664,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -632,6 +683,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -704,11 +761,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -740,6 +797,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -748,7 +850,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -770,7 +871,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -781,7 +882,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -791,7 +892,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -810,7 +911,7 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
-# Copyright (C) 1998-2013 Free Software Foundation, Inc.
+# Copyright (C) 1998-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -830,7 +931,7 @@ fi])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -838,81 +939,42 @@ fi])
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -951,7 +1013,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -980,9 +1042,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1063,7 +1189,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1123,7 +1249,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1151,7 +1277,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1170,7 +1296,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/build-aux/compile b/build-aux/compile
index 531136b0..99e50524 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,9 +340,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/config.guess b/build-aux/config.guess
index c6fad2f5..28bec27b 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2018-12-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2013-06-10'
# 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 <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -24,12 +24,12 @@ timestamp='2013-06-10'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,8 +84,6 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
-
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -132,14 +134,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,23 +151,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- ;;
-esac
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
-case "${UNAME_MACHINE}" in
- i?86)
- test -z "$VENDOR" && VENDOR=pc
- ;;
- *)
- test -z "$VENDOR" && VENDOR=unknown
- ;;
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
+ ;;
esac
-test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -178,21 +177,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -207,44 +216,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-${VENDOR}-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -261,63 +293,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-${VENDOR}-sysv4
+ echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -329,10 +352,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-${VENDOR}-riscos
+ echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
@@ -356,38 +379,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
+ set_cc_for_build
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -396,25 +419,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -425,44 +448,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-${VENDOR}-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -471,23 +494,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -513,17 +536,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -540,7 +563,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -552,14 +575,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -570,7 +593,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -584,26 +607,27 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -618,28 +642,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -672,13 +696,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -689,23 +713,23 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -730,11 +754,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -743,7 +767,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -751,9 +775,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-${VENDOR}-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -778,127 +802,120 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
- echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-${VENDOR}-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-${VENDOR}-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-${VENDOR}-cygwin
+ echo x86_64-pc-cygwin
exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -911,58 +928,64 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -976,64 +999,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-${VENDOR}-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-${VENDOR}-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-${VENDOR}-linux-${LIBC} ;;
- PA8*) echo hppa2.0-${VENDOR}-linux-${LIBC} ;;
- *) echo hppa-${VENDOR}-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-${VENDOR}-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-${VENDOR}-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-${VENDOR}-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-${VENDOR}-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1047,34 +1076,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-${VENDOR}-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-${VENODR}-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1084,12 +1113,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1099,9 +1128,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1109,7 +1138,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1121,9 +1150,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1143,9 +1172,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1154,28 +1183,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1186,7 +1215,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1206,23 +1235,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-${VENDOR}-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1238,70 +1267,96 @@ EOF
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
- echo x86_64-${VENDOR}-haiku
+ echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1310,24 +1365,25 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ # shellcheck disable=SC2154
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-${VENDOR}-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
- echo pdp10-${VENDOR}-tops10
+ echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
- echo pdp10-${VENDOR}-tenex
+ echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
@@ -1336,20 +1392,20 @@ EOF
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
- echo pdp10-${VENDOR}-tops20
+ echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
- echo pdp10-${VENDOR}-its
+ echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1358,182 +1414,51 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-${VENDOR}-esx
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
exit ;;
esac
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
+echo "$0: unable to guess system type" >&2
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+ ;;
+esac
cat >&2 <<EOF
-$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1552,16 +1477,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 8b612ab8..9542f985 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2018-12-16'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2013-04-24'
# 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 <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -25,7 +25,7 @@ timestamp='2013-04-24'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2013-04-24'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,12 +53,11 @@ timestamp='2013-04-24'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -90,12 +89,12 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- echo "$me: invalid option $1$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -111,1209 +110,1160 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
-# Decode aliases for certain CPU-COMPANY combinations.
+# Decode 1-component or ad-hoc basic machines
case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
;;
- xscaleeb)
- basic_machine=armeb-unknown
+ ibm*)
+ cpu=i370
+ vendor=ibm
;;
-
- xscaleel)
- basic_machine=armel-unknown
+ orion105)
+ cpu=clipper
+ vendor=highlevel
;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
;;
+
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
+ cpu=m68000
+ vendor=att
;;
3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=we32k
+ vendor=att
;;
bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
;;
decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
+ cpu=pdp10
+ vendor=dec
+ os=tops10
;;
decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
+ cpu=pdp10
+ vendor=dec
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
+ cpu=m68k
+ vendor=motorola
;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ os=sysv3
;;
encore | umax | mmax)
- basic_machine=ns32k-encore
+ cpu=ns32k
+ vendor=encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
;;
fx2800)
- basic_machine=i860-alliant
+ cpu=i860
+ vendor=alliant
;;
genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
+ cpu=ns32k
+ vendor=ns
;;
h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
+ cpu=m68000
+ vendor=hp
;;
hp9k3[2-9][0-9])
- basic_machine=m68k-hp
+ cpu=m68k
+ vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
+ cpu=hppa1.0
+ vendor=hp
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
;;
iris | iris4d)
- basic_machine=mips-sgi
+ cpu=mips
+ vendor=sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i386-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
+ cpu=m68000
+ vendor=convergent
;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
;;
news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
+ cpu=mips
+ vendor=sony
+ os=newsos
;;
- next | m*-next )
- basic_machine=m68k-next
+ next | m*-next)
+ cpu=m68k
+ vendor=next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
+ cpu=np1
+ vendor=gould
;;
op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
;;
pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
pbd)
- basic_machine=sparc-tti
+ cpu=sparc
+ vendor=tti
;;
pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
+ cpu=m68k
+ vendor=tti
;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ pc532)
+ cpu=ns32k
+ vendor=pc532
;;
pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
+ cpu=pn
+ vendor=gould
;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ power)
+ cpu=power
+ vendor=ibm
;;
ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
+ cpu=i386
+ vendor=ibm
;;
rm[46]00)
- basic_machine=mips-siemens
+ cpu=mips
+ vendor=siemens
;;
rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
+ cpu=romp
+ vendor=ibm
;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
;;
- sequent)
- basic_machine=i386-sequent
+ w65)
+ cpu=w65
+ vendor=wdc
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
;;
- sh5el)
- basic_machine=sh5le-unknown
+ none)
+ cpu=none
+ vendor=none
;;
- sh64)
- basic_machine=sh64-unknown
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+
+ *-*)
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
;;
- spur)
- basic_machine=spur-unknown
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
;;
- st2000)
- basic_machine=m68k-tandem
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
;;
- sun2)
- basic_machine=m68000-sun
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ os=${os:-unicosmp}
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
+ c90-unknown | c90-cray)
+ vendor=cray
+ os=${os:-unicos}
;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
+ fx80-unknown)
+ vendor=alliant
;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
+ romp-unknown)
+ vendor=ibm
;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
+ mmix-unknown)
+ vendor=knuth
;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
+ rs6000-unknown)
+ vendor=ibm
;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
+ vax-unknown)
+ vendor=dec
;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
+ pdp11-unknown)
+ vendor=dec
;;
- sun4)
- basic_machine=sparc-sun
+ we32k-unknown)
+ vendor=att
;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
+ cydra-unknown)
+ vendor=cydrome
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
+ i370-ibm*)
+ vendor=ibm
;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
+ orion-unknown)
+ vendor=highlevel
;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
;;
- t90)
- basic_machine=t90-cray
- os=-unicos
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ os=${os:-bosx}
;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
;;
- tx39)
- basic_machine=mipstx39-unknown
+ blackfin-*)
+ cpu=bfin
+ os=linux
;;
- tx39el)
- basic_machine=mipstx39el-unknown
+ c54x-*)
+ cpu=tic54x
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
+ c55x-*)
+ cpu=tic55x
;;
- tower | tower-32)
- basic_machine=m68k-ncr
+ c6x-*)
+ cpu=tic6x
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
+ e500v[12]-*)
+ cpu=powerpc
+ os=$os"spe"
;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
+ mips3*-*)
+ cpu=mips64
;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
+ ms1-*)
+ cpu=mt
;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
+ m68knommu-*)
+ cpu=m68k
+ os=linux
;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
;;
- vms)
- basic_machine=vax-dec
- os=-vms
+ openrisc-*)
+ cpu=or32
;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
+ parisc-*)
+ cpu=hppa
+ os=linux
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
;;
- w65*)
- basic_machine=w65-wdc
- os=-none
+ pentium4-*)
+ cpu=i786
;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
+ pc98-*)
+ cpu=i386
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ ppc-* | ppcbe-*)
+ cpu=powerpc
;;
- xps | xps100)
- basic_machine=xps100-honeywell
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ppc64-*)
+ cpu=powerpc64
;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
+ sb1-*)
+ cpu=mipsisa64sb1
;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ sb1el-*)
+ cpu=mipsisa64sb1el
;;
- none)
- basic_machine=none-none
- os=-none
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
+ spur-*)
+ cpu=spur
;;
- op50n)
- basic_machine=hppa1.1-oki
+ strongarm-* | thumb-*)
+ cpu=arm
;;
- op60c)
- basic_machine=hppa1.1-oki
+ tx39-*)
+ cpu=mipstx39
;;
- romp)
- basic_machine=romp-ibm
+ tx39el-*)
+ cpu=mipstx39el
;;
- mmix)
- basic_machine=mmix-knuth
+ x64-*)
+ cpu=x86_64
;;
- rs6000)
- basic_machine=rs6000-ibm
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
- vax)
- basic_machine=vax-dec
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ os=${os:-elf}
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
;;
- pdp11)
- basic_machine=pdp11-dec
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
;;
- we32k)
- basic_machine=we32k-att
+ crx-*)
+ os=${os:-elf}
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
;;
- cydra)
- basic_machine=cydra-cydrome
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
;;
- orion)
- basic_machine=orion-highlevel
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
;;
- orion105)
- basic_machine=clipper-highlevel
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
+ s390-*)
+ cpu=s390
+ vendor=ibm
;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
+ tile*-*)
+ os=${os:-linux-gnu}
;;
+
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb \
+ | arm | armh | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv64 \
+ | rl78 | romp | rs6000 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | wasm32 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+case $vendor in
+ digital*)
+ vendor=dec
;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ commodore*)
+ vendor=cbm
;;
*)
;;
@@ -1321,197 +1271,246 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ bluegene*)
+ os=cnk
;;
- -solaris)
- os=-solaris2
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -svr4*)
- os=-sysv4
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
+ qnx*)
+ case $cpu in
+ x86 | i*86)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ nto-qnx*)
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ linux-dietlibc)
+ os=linux-dietlibc
;;
- -linux*)
+ linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ lynx*)
+ os=lynxos
;;
- -opened*)
- os=-openedition
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -os400*)
- os=-os400
+ opened*)
+ os=openedition
;;
- -wince*)
- os=-wince
+ os400*)
+ os=os400
;;
- -osfrose*)
- os=-osfrose
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -osf*)
- os=-osf
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -utek*)
- os=-bsd
+ wince*)
+ os=wince
;;
- -dynix*)
- os=-bsd
+ utek*)
+ os=bsd
;;
- -acis*)
- os=-aos
+ dynix*)
+ os=bsd
;;
- -atheos*)
- os=-atheos
+ acis*)
+ os=aos
;;
- -syllable*)
- os=-syllable
+ atheos*)
+ os=atheos
;;
- -386bsd)
- os=-bsd
+ syllable*)
+ os=syllable
;;
- -ctix* | -uts*)
- os=-sysv
+ 386bsd)
+ os=bsd
;;
- -nova*)
- os=-rtmk-nova
+ ctix* | uts*)
+ os=sysv
;;
- -ns2 )
- os=-nextstep2
+ nova*)
+ os=rtmk-nova
;;
- -nsk*)
- os=-nsk
+ ns2)
+ os=nextstep2
+ ;;
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- -tpf*)
- os=-tpf
+ tpf*)
+ os=tpf
;;
- -triton*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -oss*)
- os=-sysv3
+ oss*)
+ os=sysv3
;;
- -svr4)
- os=-sysv4
+ svr4*)
+ os=sysv4
;;
- -svr3)
- os=-sysv3
+ svr3)
+ os=sysv3
;;
- -sysvr4)
- os=-sysv4
+ sysvr4)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ # This must come after sysvr4.
+ sysv*)
;;
- -ose*)
- os=-ose
+ ose*)
+ os=ose
;;
- -es1800*)
- os=-ose
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -xenix)
- os=-xenix
+ zvmoe)
+ os=zvmoe
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ dicos*)
+ os=dicos
;;
- -aros*)
- os=-aros
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
;;
- -zvmoe)
- os=-zvmoe
+ nacl*)
;;
- -dicos*)
- os=-dicos
+ ios)
;;
- -nacl*)
+ none)
;;
- -none)
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1527,261 +1526,265 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-case $basic_machine in
+case $cpu-$vendor in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
- *-be)
- os=-beos
+ pru-*)
+ os=elf
;;
- *-haiku)
- os=-haiku
+ *-be)
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
- *-next )
- os=-nextstep
+ *-next)
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
+case $vendor in
+ unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$cpu-$vendor-$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 4ebd5b3a..65cbf709 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# 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
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 377bb868..8175c640 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -266,122 +271,113 @@ do
fi
dst=$dst_arg
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ # Note that $RANDOM variable is not portable (e.g. dash); Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p' feature.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -391,53 +387,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -450,8 +444,8 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -472,15 +466,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -493,24 +484,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@@ -519,9 +510,9 @@ do
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 63ae69dc..0a87cfdd 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -1,9 +1,12 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2019-02-19.15
-# libtool (GNU libtool) 2.4.2
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2019 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -23,881 +26,2296 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --no-quiet, --no-silent
-# print informational messages (default)
-# --no-warn don't display warning messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print more informational messages than default
-# --no-verbose don't print the extra informational messages
-# --version print version information
-# -h, --help, --help-all print short, long, or detailed help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.6
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# MODE-ARGS vary depending on the MODE. When passed as first option,
-# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+# Copyright (C) 2004-2019 Bootstrap Authors
#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 3 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
+
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4.2
-# automake: $automake_version
-# autoconf: $autoconf_version
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
#
-# Report bugs to <bug-libtool@gnu.org>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
-PROGRAM=libtool
-PACKAGE=libtool
-VERSION=2.4.2
-TIMESTAMP=""
-package_revision=1.3337
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
fi"
done
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
-
-$lt_unset CDPATH
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+ { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
+}
-: ${CP="cp -f"}
-test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
+# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
+func_unset CDPATH
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+# Make sure ${,E,F}GREP behave sanely.
+func_unset GREP_OPTIONS
-exit_status=$EXIT_SUCCESS
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
{
- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-} # func_dirname may be replaced by extended shell implementation
+ test -f "$1" && test -x "$1"
+}
-# func_basename file
-func_basename ()
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
{
- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-} # func_basename may be replaced by extended shell implementation
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-} # func_dirname_and_basename may be replaced by extended shell implementation
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
- esac
-} # func_stripname may be replaced by extended shell implementation
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
-# These SED scripts presuppose an absolute path with a trailing slash.
-pathcar='s,^/\([^/]*\).*$,\1,'
-pathcdr='s,^/[^/]*,,'
-removedotparts=':dotsl
- s@/\./@/@g
- t dotsl
- s,/\.$,/,'
-collapseslashes='s@/\{1,\}@/@g'
-finalslash='s,/*$,/,'
+ func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
-# func_normal_abspath PATH
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-# value returned in "$func_normal_abspath_result"
-func_normal_abspath ()
-{
- # Start from root dir and reassemble the path.
- func_normal_abspath_result=
- func_normal_abspath_tpath=$1
- func_normal_abspath_altnamespace=
- case $func_normal_abspath_tpath in
- "")
- # Empty path, that just means $cwd.
- func_stripname '' '/' "`pwd`"
- func_normal_abspath_result=$func_stripname_result
- return
- ;;
- # The next three entries are used to spot a run of precisely
- # two leading slashes without using negated character classes;
- # we take advantage of case's first-match behaviour.
- ///*)
- # Unusual form of absolute path, do nothing.
- ;;
- //*)
- # Not necessarily an ordinary path; POSIX reserves leading '//'
- # and for example Cygwin uses it to access remote file shares
- # over CIFS/SMB, so we conserve a leading double slash if found.
- func_normal_abspath_altnamespace=/
- ;;
- /*)
- # Absolute path, do nothing.
- ;;
- *)
- # Relative path, prepend $cwd.
- func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
- ;;
- esac
- # Cancel out all the simple stuff to save iterations. We also want
- # the path to end with a slash for ease of parsing, so make sure
- # there is one (and only one) here.
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
- while :; do
- # Processed it all yet?
- if test "$func_normal_abspath_tpath" = / ; then
- # If we ascended to the root using ".." the result may be empty now.
- if test -z "$func_normal_abspath_result" ; then
- func_normal_abspath_result=/
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
fi
- break
- fi
- func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$pathcar"`
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$pathcdr"`
- # Figure out what to do with it
- case $func_normal_abspath_tcomponent in
- "")
- # Trailing empty path component, ignore it.
- ;;
- ..)
- # Parent dir; strip last assembled component from result.
- func_dirname "$func_normal_abspath_result"
- func_normal_abspath_result=$func_dirname_result
- ;;
- *)
- # Actual path component, append it.
- func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
- ;;
- esac
- done
- # Restore leading double-slash if one was found on entry.
- func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
+ GREP=$func_path_progs_result
}
-# func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
-# value returned in "$func_relative_path_result"
-func_relative_path ()
-{
- func_relative_path_result=
- func_normal_abspath "$1"
- func_relative_path_tlibdir=$func_normal_abspath_result
- func_normal_abspath "$2"
- func_relative_path_tbindir=$func_normal_abspath_result
-
- # Ascend the tree starting from libdir
- while :; do
- # check if we have found a prefix of bindir
- case $func_relative_path_tbindir in
- $func_relative_path_tlibdir)
- # found an exact match
- func_relative_path_tcancelled=
- break
- ;;
- $func_relative_path_tlibdir*)
- # found a matching prefix
- func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
- func_relative_path_tcancelled=$func_stripname_result
- if test -z "$func_relative_path_result"; then
- func_relative_path_result=.
- fi
- break
- ;;
- *)
- func_dirname $func_relative_path_tlibdir
- func_relative_path_tlibdir=${func_dirname_result}
- if test "x$func_relative_path_tlibdir" = x ; then
- # Have to descend all the way to the root!
- func_relative_path_result=../$func_relative_path_result
- func_relative_path_tcancelled=$func_relative_path_tbindir
- break
- fi
- func_relative_path_result=../$func_relative_path_result
- ;;
- esac
- done
- # Now calculate path; take care to avoid doubling-up slashes.
- func_stripname '' '/' "$func_relative_path_result"
- func_relative_path_result=$func_stripname_result
- func_stripname '/' '/' "$func_relative_path_tcancelled"
- if test "x$func_stripname_result" != x ; then
- func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
- fi
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
- # Normalisation. If bindir is libdir, return empty string,
- # else relative path ending with a slash; either way, target
- # file name can be directly appended.
- if test ! -z "$func_relative_path_result"; then
- func_stripname './' '' "$func_relative_path_result/"
- func_relative_path_result=$func_stripname_result
- fi
-}
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-# The name of this program:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
-# Make sure we have an absolute path for reexecution:
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
case $progpath in
[\\/]*|[A-Za-z]:\\*) ;;
*[\\/]*)
- progdir=$func_dirname_result
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
+ progpath=$progdir/$progname
;;
*)
- save_IFS="$IFS"
+ _G_IFS=$IFS
IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
- IFS="$save_IFS"
+ IFS=$_G_IFS
test -x "$progdir/$progname" && break
done
- IFS="$save_IFS"
+ IFS=$_G_IFS
test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
+ progpath=$progdir/$progname
;;
esac
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
-
-# Sed substitution that converts a w32 file name or path
-# which contains forward slashes, into one that contains
-# (escaped) backslashes. A very naive implementation.
-lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
-# Standard options:
opt_dry_run=false
-opt_help=false
opt_quiet=false
opt_verbose=false
-opt_warning=:
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
{
- $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
}
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_arg pretty "$2"
+ eval "$1+=\\ \$func_quote_arg_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_arg pretty "$2"
+ eval "$1=\$$1\\ \$func_quote_arg_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
{
- $opt_verbose && func_echo ${1+"$@"}
+ $debug_cmd
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
}
-# func_echo_all arg...
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
$ECHO "$*"
}
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
{
- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
}
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
{
- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+ $debug_cmd
- # bash bug again:
- :
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
}
-# func_fatal_error arg...
+
+# func_fatal_error ARG...
+# -----------------------
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
+ $debug_cmd
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
+ func_error "$*"
+ exit $EXIT_FAILURE
}
-help="Try \`$progname --help' for more information." ## default
-# func_grep expression filename
+# func_grep EXPRESSION FILENAME
+# -----------------------------
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
+ $debug_cmd
+
$GREP "$1" "$2" >/dev/null 2>&1
}
-# func_mkdir_p directory-path
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
{
- my_directory_path="$1"
- my_dir_list=
+ $debug_cmd
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+ _G_directory_path=$1
+ _G_dir_list=
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
esac
# While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
+ while test ! -d "$_G_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
# list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
+ _G_dir_list=$_G_directory_path:$_G_dir_list
# If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
+ case $_G_directory_path in */*) ;; *) break ;; esac
# ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
done
- my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
# try to create one of the directories concurrently. Don't
# stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
+ $MKDIR "$_G_dir" 2>/dev/null || :
done
- IFS="$save_mkdir_p_IFS"
+ IFS=$func_mkdir_p_IFS
# Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
fi
}
-# func_mktempdir [string]
+# func_mktempdir [BASENAME]
+# -------------------------
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
+# given, BASENAME is the basename for that directory.
func_mktempdir ()
{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
+ $debug_cmd
- if test "$opt_dry_run" = ":"; then
+ if test : = "$opt_dry_run"; then
# Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
+ _G_mktemp='mktemp -dtu'
else
+ _G_mktemp='mktemp -dt'
+ fi
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+ _G_tmpdir=`$_G_mktemp "${1-$progname}-XXXXXXXX"` || \
+ func_fatal_error "cannot create temporary directory"
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
fi
- $ECHO "$my_tmpdir"
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
}
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
+# func_quote_portable EVAL ARG
+# ----------------------------
+# Internal function to portably implement func_quote_arg. Note that we still
+# keep attention to performance here so we as much as possible try to avoid
+# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
+func_quote_portable ()
{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
+ $debug_cmd
+
+ func_quote_portable_result=$2
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
+ # one-time-loop (easy break)
+ while true
+ do
+ if $1; then
+ func_quote_portable_result=`$ECHO "$2" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
+ break
+ fi
+
+ # Quote for eval.
+ case $func_quote_portable_result in
+ *[\\\`\"\$]*)
+ case $func_quote_portable_result in
+ *[\[\*\?]*)
+ func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
+ | $SED "$sed_quote_subst"`
+ break
+ ;;
+ esac
+
+ func_quote_portable_old_IFS=$IFS
+ for _G_char in '\' '`' '"' '$'
+ do
+ # STATE($1) PREV($2) SEPARATOR($3)
+ set start "" ""
+ func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
+ IFS=$_G_char
+ for _G_part in $func_quote_portable_result
+ do
+ case $1 in
+ quote)
+ func_append func_quote_portable_result "$3$2"
+ set quote "$_G_part" "\\$_G_char"
+ ;;
+ start)
+ set first "" ""
+ func_quote_portable_result=
+ ;;
+ first)
+ set quote "$_G_part" ""
+ ;;
+ esac
+ done
+ done
+ IFS=$func_quote_portable_old_IFS
+ ;;
+ *) ;;
+ esac
+ break
+ done
+
+ func_quote_portable_unquoted_result=$func_quote_portable_result
+ case $func_quote_portable_result in
+ # double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # many bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ func_quote_portable_result=\"$func_quote_portable_result\"
;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
esac
}
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
+# func_quotefast_eval ARG
+# -----------------------
+# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
+# but optimized for speed. Result is stored in $func_quotefast_eval.
+if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
+ printf -v _GL_test_printf_tilde %q '~'
+ if test '\~' = "$_GL_test_printf_tilde"; then
+ func_quotefast_eval ()
+ {
+ printf -v func_quotefast_eval_result %q "$1"
+ }
+ else
+ # Broken older Bash implementations. Make those faster too if possible.
+ func_quotefast_eval ()
+ {
+ case $1 in
+ '~'*)
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ ;;
+ *)
+ printf -v func_quotefast_eval_result %q "$1"
+ ;;
+ esac
+ }
+ fi
+else
+ func_quotefast_eval ()
+ {
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ }
+fi
+
+
+# func_quote_arg MODEs ARG
+# ------------------------
+# Quote one ARG to be evaled later. MODEs argument may contain zero or more
+# specifiers listed below separated by ',' character. This function returns two
+# values:
+# i) func_quote_arg_result
+# double-quoted (when needed), suitable for a subsequent eval
+# ii) func_quote_arg_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified. Available only if 'unquoted' is specified.
+#
+# Available modes:
+# ----------------
+# 'eval' (default)
+# - escape shell special characters
+# 'expand'
+# - the same as 'eval'; but do not quote variable references
+# 'pretty'
+# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
+# be used later in func_quote to get output like: 'echo "a b"' instead
+# of 'echo a\ b'. This is slower than default on some shells.
+# 'unquoted'
+# - produce also $func_quote_arg_unquoted_result which does not contain
+# wrapping double-quotes.
+#
+# Examples for 'func_quote_arg pretty,unquoted string':
+#
+# string | *_result | *_unquoted_result
+# ------------+-----------------------+-------------------
+# " | \" | \"
+# a b | "a b" | a b
+# "a b" | "\"a b\"" | \"a b\"
+# * | "*" | *
+# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
+#
+# Examples for 'func_quote_arg pretty,unquoted,expand string':
+#
+# string | *_result | *_unquoted_result
+# --------------+---------------------+--------------------
+# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
+func_quote_arg ()
{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "$1" | $SED \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
+ _G_quote_expand=false
+ case ,$1, in
+ *,expand,*)
+ _G_quote_expand=:
+ ;;
esac
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
+ case ,$1, in
+ *,pretty,*|*,expand,*|*,unquoted,*)
+ func_quote_portable $_G_quote_expand "$2"
+ func_quote_arg_result=$func_quote_portable_result
+ func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
+ ;;
+ *)
+ # Faster quote-for-eval for some shells.
+ func_quotefast_eval "$2"
+ func_quote_arg_result=$func_quotefast_eval_result
;;
esac
+}
+
- func_quote_for_expand_result="$my_arg"
+# func_quote MODEs ARGs...
+# ------------------------
+# Quote all ARGs to be evaled later and join them into single command. See
+# func_quote_arg's description for more info.
+func_quote ()
+{
+ $debug_cmd
+ _G_func_quote_mode=$1 ; shift
+ func_quote_result=
+ while test 0 -lt $#; do
+ func_quote_arg "$_G_func_quote_mode" "$1"
+ if test -n "$func_quote_result"; then
+ func_append func_quote_result " $func_quote_arg_result"
+ else
+ func_append func_quote_result "$func_quote_arg_result"
+ fi
+ shift
+ done
}
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
- my_cmd="$1"
- my_fail_exp="${2-:}"
+ $debug_cmd
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_arg pretty,expand "$_G_cmd"
+ eval "func_notquiet $func_quote_arg_result"
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
fi
- fi
+ }
}
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it. Use the saved locale for evaluation.
func_show_eval_locale ()
{
- my_cmd="$1"
- my_fail_exp="${2-:}"
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
+ $opt_quiet || {
+ func_quote_arg expand,pretty "$_G_cmd"
+ eval "func_echo $func_quote_arg_result"
}
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
fi
- fi
+ }
}
+
# func_tr_sh
+# ----------
# Turn $1 into a string suitable for a shell variable name.
# Result is stored in $func_tr_sh_result. All characters
# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
# if $1 begins with a digit, a '_' is prepended as well.
func_tr_sh ()
{
- case $1 in
- [0-9]* | *[!a-zA-Z0-9_]*)
- func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
- ;;
- * )
- func_tr_sh_result=$1
- ;;
- esac
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
}
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
{
- $opt_debug
+ $debug_cmd
- $SED -n '/(C)/!b go
- :more
- /\./!{
- N
- s/\n# / /
- b more
- }
- :go
- /^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
+ $opt_verbose && func_echo "$*"
+
+ :
}
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
{
- $opt_debug
+ $debug_cmd
- $SED -n '/^# Usage:/,/^# *.*--help/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- echo
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
}
-# func_help [NOEXIT]
-# Echo long help message to standard output and exit,
-# unless 'noexit' is passed as argument.
-func_help ()
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
{
- $opt_debug
-
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- :print
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
- p
- d
- }
- /^# .* home page:/b print
- /^# General help using/b print
- ' < "$progpath"
- ret=$?
- if test -z "$1"; then
- exit $ret
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2010-2019 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 3 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
+
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
+
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# Copyright'.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug in processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# in the main code. A hook is just a list of function names that can be
+# run in order later on.
+
+# func_hookable FUNC_NAME