LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
185 stars 63 forks source link

fix ATR parser path detect #82

Closed CoelacanthusHex closed 6 months ago

CoelacanthusHex commented 6 months ago

In https://github.com/LudovicRousseau/pcsc-tools/commit/57f1b8b9fd41f67b6309707096049bc894185235, LudovicRousseau try to add a option to specify ATR parser command. But in logic of this commit, if no --enable-parser=foobar was specified (i.e. $ATRparser == no), configure.ac will ignore default path which was set in $ATR_PARSER and then lead ATR analyze feature of pcsc_scan to be lost. So I add a new branch: if $ATRparser is no and $ATR_PARSER is not no, it will use $ATR_PARSER. At same time, set ATRparser to ATR_PARSER to ensure stats at the end works correctly.