Repository: conan-io/conan

Issue:
[bug] 1.8.0 uses --sbin instead --sbindir
After updating to conan 1.8.0, I ran into an issue building a [librdkafka/0.11.4-1](https://github.com/ess-dmsc/conan-librdkafka) package on CentOS due to the ./configure statement using `--sbin` as a parameter instead of `--sbindir`:


```
librdkafka/0.11.4-1@<asdf>/stable: Calling:
 ./configure '--prefix=' '--disable-sasl' '--diable-lz4' '--disable-optimization' '--bindir=${prefix}/bin' '--sbin=${prefix}/bin' '--libexec=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include'
Unknown option sbin=${prefix}/bin
```


The GNU Coding Standard states that the variable for the [`sbin` installation directory is `sbindir`](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html).

It looks like the issue came from #3599 and the [librdkafka/0.11.4-1](https://github.com/ess-dmsc/conan-librdkafka) package builds fine on conan 1.6.1.





Discussion:

Resolving patch:
diff --git a/conans/client/build/autotools_environment.py b/conans/client/build/autotools_environment.py
--- a/conans/client/build/autotools_environment.py
+++ b/conans/client/build/autotools_environment.py
@@ -152,13 +152,13 @@ def configure(self, configure_dir=None, args=None, build=None, host=None, target
             elif not self._is_flag_in_args("prefix", args):
                 args.append("--prefix=%s" % self._conanfile.package_folder.replace("\\", "/"))
 
-            all_flags = ["bindir", "sbin", "libexec", "libdir", "includedir", "oldincludedir",
+            all_flags = ["bindir", "sbindir", "libexecdir", "libdir", "includedir", "oldincludedir",
                          "datarootdir"]
             help_output = self._configure_help_output(configure_dir)
             available_flags = [flag for flag in all_flags if "--%s" % flag in help_output]
 
             if use_default_install_dirs:
-                for varname in ["bindir", "sbin", "libexec"]:
+                for varname in ["bindir", "sbindir", "libexecdir"]:
                     if self._valid_configure_flag(varname, args, available_flags):
                         args.append("--%s=${prefix}/%s" % (varname, DEFAULT_BIN))
                 if self._valid_configure_flag("libdir", args, available_flags):


Test patch:
diff --git a/conans/test/build_helpers/autotools_configure_test.py b/conans/test/build_helpers/autotools_configure_test.py
--- a/conans/test/build_helpers/autotools_configure_test.py
+++ b/conans/test/build_helpers/autotools_configure_test.py
@@ -17,7 +17,7 @@
 
 
 default_dirs_flags = ["--bindir", "--libdir", "--includedir", "--datarootdir", "--libdir",
-                      "--sbin", "--oldincludedir", "--libexec"]
+                      "--sbindir", "--oldincludedir", "--libexecdir"]
 
 
 class MockConanfileWithOutput(MockConanfile):
@@ -580,20 +580,22 @@ def autotools_install_dirs_test(self):
         self.assertNotIn("--bindir", runner.command_called)
         self.assertNotIn("--libdir", runner.command_called)
         self.assertNotIn("--includedir", runner.command_called)
-        self.assertNotIn("--dataroot", runner.command_called)
+        self.assertNotIn("--datarootdir", runner.command_called)
         # package folder defined
         conanfile.package_folder = "/package_folder"
         ab.configure()
         if platform.system() == "Windows":
             self.assertIn("./configure --prefix=/package_folder --bindir=${prefix}/bin "
-                          "--sbin=${prefix}/bin --libexec=${prefix}/bin --libdir=${prefix}/lib "
-                          "--includedir=${prefix}/include --oldincludedir=${prefix}/include "
-                          "--datarootdir=${prefix}/share", runner.command_called)
+                          "--sbindir=${prefix}/bin --libexecdir=${prefix}/bin "
+                          "--libdir=${prefix}/lib --includedir=${prefix}/include "
+                          "--oldincludedir=${prefix}/include --datarootdir=${prefix}/share",
+                          runner.command_called)
         else:
             self.assertIn("./configure '--prefix=/package_folder' '--bindir=${prefix}/bin' "
-                          "'--sbin=${prefix}/bin' '--libexec=${prefix}/bin' '--libdir=${prefix}/lib' "
-                          "'--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' "
-                          "'--datarootdir=${prefix}/share'", runner.command_called)
+                          "'--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' "
+                          "'--libdir=${prefix}/lib' '--includedir=${prefix}/include' "
+                          "'--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share'",
+                          runner.command_called)
         # --prefix already used in args
         ab.configure(args=["--prefix=/my_package_folder"])
         self.assertIn("--prefix=/my_package_folder", runner.command_called)
@@ -607,13 +609,13 @@ def autotools_install_dirs_test(self):
         if platform.system() == "Windows":
             self.assertIn("./configure --bindir=/pf/superbindir --libdir=/pf/superlibdir "
                           "--includedir=/pf/superincludedir --prefix=/package_folder "
-                          "--sbin=${prefix}/bin --libexec=${prefix}/bin "
+                          "--sbindir=${prefix}/bin --libexecdir=${prefix}/bin "
                           "--oldincludedir=${prefix}/include --datarootdir=${prefix}/share",
                           runner.command_called)
         else:
             self.assertIn("./configure '--bindir=/pf/superbindir' '--libdir=/pf/superlibdir' "
                           "'--includedir=/pf/superincludedir' '--prefix=/package_folder' "
-                          "'--sbin=${prefix}/bin' '--libexec=${prefix}/bin' "
+                          "'--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' "
                           "'--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share'",
                           runner.command_called)
         # opt-out from default installation dirs