]> wimlib.net Git - wimlib/blobdiff - configure.ac
Allow "imagex" to be renamed (default: wimlib-imagex)
[wimlib] / configure.ac
index 1326258c792831a8fd54d511e26fc7707824b48e..2b15855b60e84e19ce1d7491e4087e11ba865af8 100644 (file)
@@ -6,26 +6,39 @@ AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects])
 AC_C_BIGENDIAN
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT
+
+AC_ARG_WITH(imagex-progname,
+            [AS_HELP_STRING([--with-imagex-progname=NAME],
+                           [Set the name of installed ImageX program (default: wimlib-imagex)])],
+            [IMAGEX_PROGNAME=$withval],
+            [IMAGEX_PROGNAME="wimlib-imagex"])
+
+AC_SUBST([IMAGEX_PROGNAME], [$IMAGEX_PROGNAME])
+AC_DEFINE_UNQUOTED([IMAGEX_PROGNAME], ["$IMAGEX_PROGNAME"],
+                  [Binary name for the implementation of ImageX distributed with wimlib])
+
 AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile
-               doc/Doxyfile
-               wimlib.pc
-               doc/imagex.1
-               doc/imagex-append.1
-               doc/imagex-apply.1
-               doc/imagex-capture.1
-               doc/imagex-delete.1
-               doc/imagex-dir.1
-               doc/imagex-export.1
-               doc/imagex-info.1
-               doc/imagex-join.1
-               doc/imagex-mount.1
-               doc/imagex-mountrw.1
-               doc/imagex-optimize.1
-               doc/imagex-split.1
-               doc/imagex-unmount.1
-               doc/mkwinpeimg.1
-               ])
+AC_CONFIG_FILES([Makefile]
+               [doc/Doxyfile]
+               [wimlib.pc]
+               [doc/"$IMAGEX_PROGNAME".1:doc/imagex.1.in]
+               [doc/"$IMAGEX_PROGNAME"-append.1:doc/imagex-append.1.in]
+               [doc/"$IMAGEX_PROGNAME"-apply.1:doc/imagex-apply.1.in]
+               [doc/"$IMAGEX_PROGNAME"-capture.1:doc/imagex-capture.1.in]
+               [doc/"$IMAGEX_PROGNAME"-delete.1:doc/imagex-delete.1.in]
+               [doc/"$IMAGEX_PROGNAME"-dir.1:doc/imagex-dir.1.in]
+               [doc/"$IMAGEX_PROGNAME"-export.1:doc/imagex-export.1.in]
+               [doc/"$IMAGEX_PROGNAME"-info.1:doc/imagex-info.1.in]
+               [doc/"$IMAGEX_PROGNAME"-join.1:doc/imagex-join.1.in]
+               [doc/"$IMAGEX_PROGNAME"-mount.1:doc/imagex-mount.1.in]
+               [doc/"$IMAGEX_PROGNAME"-mountrw.1:doc/imagex-mountrw.1.in]
+               [doc/"$IMAGEX_PROGNAME"-optimize.1:doc/imagex-optimize.1.in]
+               [doc/"$IMAGEX_PROGNAME"-split.1:doc/imagex-split.1.in]
+               [doc/"$IMAGEX_PROGNAME"-unmount.1:doc/imagex-unmount.1.in]
+               [doc/mkwinpeimg.1])
+
+AC_CONFIG_FILES([programs/mkwinpeimg], [chmod +x programs/mkwinpeimg])
+
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_CANONICAL_HOST
@@ -157,10 +170,9 @@ if test "x$ENABLE_MULTITHREADED_COMPRESSION" = "xyes"; then
        AC_DEFINE([ENABLE_MULTITHREADED_COMPRESSION], [1],
                        [Define to 1 if including support for multithreaded
                         compression])
-       PTHREAD_LDADD="-lpthread"
-else
-       PTHREAD_LDADD=""
 fi
+
+PTHREAD_LDADD="-lpthread"
 AC_SUBST([PTHREAD_LDADD], [$PTHREAD_LDADD])
 
 WITH_NTFS_3G_DEFAULT="yes"
@@ -237,22 +249,20 @@ else
        LIBNTFS_3G_LDADD=
        LIBNTFS_3G_CFLAGS=
 
-       if test "x$WINDOWS_NATIVE_BUILD" != "xyes"; then
-               AM_ICONV
-               if test "x$am_cv_func_iconv" != "xyes"; then
-                       AC_MSG_ERROR([Cannot find the iconv() function.
-                       iconv() is used to convert between UTF-8 and UTF-16 encodings of WIM
-                       filenames and XML data.  Wimlib cannot be compiled without it.  iconv()
-                       is available in the latest version of glibc and sometimes in other
-                       libraries.])
-               fi
-       fi
 fi
 AM_CONDITIONAL([WITH_NTFS_3G], [test "x$WITH_NTFS_3G" = "xyes"])
 
 AC_SUBST([LIBNTFS_3G_LDADD], [$LIBNTFS_3G_LDADD])
 AC_SUBST([LIBNTFS_3G_CFLAGS], [$LIBNTFS_3G_CFLAGS])
 
+AM_ICONV
+if test "x$am_cv_func_iconv" != "xyes"; then
+       AC_MSG_ERROR([Cannot find the iconv() function.
+       iconv() is used to convert between encodings of WIM filenames and XML data.
+       wimlib cannot be compiled without it.  iconv() is available in the latest
+       version of glibc and sometimes in other libraries.])
+fi
+
 AC_MSG_CHECKING([whether to include support for mounting WIMs])
 AC_ARG_WITH([fuse],
                AS_HELP_STRING([--without-fuse], [build without libfuse.