-#define INSTALL_OPT_CMD 1
-#define INSTALL_OPT_DIRECTORY 2
-#define INSTALL_OPT_PRESERVE_TIME 4
-#define INSTALL_OPT_STRIP 8
-#define INSTALL_OPT_GROUP 16
-#define INSTALL_OPT_MODE 32
-#define INSTALL_OPT_OWNER 64
-
-static const struct option install_long_options[] = {
- { "directory", 0, NULL, 'd' },
- { "preserve-timestamps", 0, NULL, 'p' },
- { "strip", 0, NULL, 's' },
- { "group", 0, NULL, 'g' },
- { "mode", 0, NULL, 'm' },
- { "owner", 0, NULL, 'o' },
- { 0, 0, 0, 0 }
-};
-
-extern int install_main(int argc, char **argv)
+#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
+static const char install_longopts[] ALIGN1 =
+ "directory\0" No_argument "d"
+ "preserve-timestamps\0" No_argument "p"
+ "strip\0" No_argument "s"
+ "group\0" No_argument "g"
+ "mode\0" No_argument "m"
+ "owner\0" No_argument "o"
+/* autofs build insists of using -b --suffix=.orig */
+/* TODO? (short option for --suffix is -S) */
+#if ENABLE_SELINUX
+ "context\0" Required_argument "Z"
+ "preserve_context\0" No_argument "\xff"
+ "preserve-context\0" No_argument "\xff"
+#endif
+ ;
+#endif
+
+
+#if ENABLE_SELINUX
+static void setdefaultfilecon(const char *path)