[x264-devel] x264 configure patch for Solaris
Tim Mooney
Tim.Mooney at ndsu.edu
Mon Aug 26 21:03:01 CEST 2013
[I'm not subscribed to x264-devel, so please Cc: me on any replies,
assuming this makes it past the moderation process]
Hi!
Attached is a small patch to configure and the Makefile for x264, to
improve the installation process on Solaris and OpenSolaris-derived hosts.
I used an older version of this patch on x86_64-sun-solaris2.10, and I
just installed a new system with x86-64-sun-solaris2.11 (OpenIndiana with
the oi151a8 kernel). The patch is against the x264 snapshot from 20130823.
The main part of the patch is to have the Makefile not hardcode "install"
as the command to install the files, and to have configure default to
INSTALL=install but override that for Solaris.
On SVR4-derived systems, the "install" command is ancient and acts nothing
like the BSD or GNU install command. Using a make macro for INSTALL and
looking for either /usr/ucb/install or ginstall on Solaris allows the
install to proceed without issue.
The other part of the patch adds a pkgconfigdir macro to the Makefile,
like many other packages have, to make it easy to override the default
directory that the pkg-config file is installed into.
Please let me know if there are any questions or if something about
the patch isn't acceptable. Thanks for x264!
Tim
--
Tim Mooney Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
-------------- next part --------------
diff -ur x264-snapshot-20130823-2245.orig/Makefile x264-snapshot-20130823-2245/Makefile
--- x264-snapshot-20130823-2245.orig/Makefile 2013-08-23 15:45:04.000000000 -0500
+++ x264-snapshot-20130823-2245/Makefile 2013-08-26 13:38:40.916119990 -0500
@@ -247,29 +247,29 @@
rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
install-cli: cli
- install -d $(DESTDIR)$(bindir)
- install x264$(EXE) $(DESTDIR)$(bindir)
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
install-lib-dev:
- install -d $(DESTDIR)$(includedir)
- install -d $(DESTDIR)$(libdir)
- install -d $(DESTDIR)$(libdir)/pkgconfig
- install -m 644 $(SRCPATH)/x264.h $(DESTDIR)$(includedir)
- install -m 644 x264_config.h $(DESTDIR)$(includedir)
- install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL) -d $(DESTDIR)$(includedir)
+ $(INSTALL) -d $(DESTDIR)$(libdir)
+ $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL) -m 644 $(SRCPATH)/x264.h $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 x264_config.h $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
install-lib-static: lib-static install-lib-dev
- install -m 644 $(LIBX264) $(DESTDIR)$(libdir)
+ $(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
$(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))
install-lib-shared: lib-shared install-lib-dev
ifneq ($(IMPLIBNAME),)
- install -d $(DESTDIR)$(bindir)
- install -m 755 $(SONAME) $(DESTDIR)$(bindir)
- install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
else ifneq ($(SONAME),)
ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
- install -m 755 $(SONAME) $(DESTDIR)$(libdir)
+ $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
endif
uninstall:
diff -ur x264-snapshot-20130823-2245.orig/configure x264-snapshot-20130823-2245/configure
--- x264-snapshot-20130823-2245.orig/configure 2013-08-23 15:45:04.000000000 -0500
+++ x264-snapshot-20130823-2245/configure 2013-08-26 13:40:08.332955955 -0500
@@ -253,6 +253,7 @@
exec_prefix='${prefix}'
bindir='${exec_prefix}/bin'
libdir='${exec_prefix}/lib'
+pkgconfigdir='${libdir}/pkgconfig'
includedir='${prefix}/include'
DEVNULL='/dev/null'
@@ -423,6 +424,7 @@
AR="${AR-${cross_prefix}ar}"
RANLIB="${RANLIB-${cross_prefix}ranlib}"
STRIP="${STRIP-${cross_prefix}strip}"
+INSTALL="${INSTALL-${cross_prefix}install}"
if [ "x$host" = x ]; then
host=`${SRCPATH}/config.guess`
@@ -527,6 +529,17 @@
else
LDFLAGS="$LDFLAGS /usr/lib/values-xpg6.o"
fi
+ if test -x /usr/ucb/install ; then
+ INSTALL=/usr/ucb/install
+ elif test -x /usr/bin/ginstall ; then
+ # OpenSolaris
+ INSTALL=/usr/bin/ginstall
+ elif test -x /usr/gnu/bin/ginstall ; then
+ # OpenSolaris
+ INSTALL=/usr/gnu/bin/install
+ else
+ INSTALL=install
+ fi
HAVE_GETOPT_LONG=0
;;
*qnx*)
@@ -1116,6 +1129,7 @@
exec_prefix=$exec_prefix
bindir=$bindir
libdir=$libdir
+pkgconfigdir=$pkgconfigdir
includedir=$includedir
ARCH=$ARCH
SYS=$SYS
@@ -1129,6 +1143,7 @@
AR=$AR
RANLIB=$RANLIB
STRIP=$STRIP
+INSTALL=$INSTALL
AS=$AS
ASFLAGS=$ASFLAGS
RC=$RC
More information about the x264-devel
mailing list