changeset 6545:9df67606ef53

Patch by Dominik Mierzejewski: The first one makes CONFDIR work correctly at last and the second adds DESTDIR to ./configure, so that it generates a relocateable Makefile and then a packager needs only to do make DESTDIR=$RPM_BUILD_ROOT install
author atmos4
date Mon, 24 Jun 2002 08:23:48 +0000
parents 222f6da66fa3
children e9f97e2fd0dc
files configure input/input.c mplayer.c
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Jun 24 08:13:31 2002 +0000
+++ b/configure	Mon Jun 24 08:23:48 2002 +0000
@@ -4002,10 +4002,11 @@
 
 LANG = C
 TARGET_OS = $system_name
-prefix = $_prefix
-DATADIR = $_datadir
-CONFDIR = $_confdir
-LIBDIR = $_libdir
+DESTDIR =
+prefix = \$(DESTDIR)$_prefix
+DATADIR = \$(DESTDIR)$_datadir
+CONFDIR = \$(DESTDIR)$_confdir
+LIBDIR = \$(DESTDIR)$_libdir
 #AR = ar
 CC = $_cc
 AWK = $_awk
--- a/input/input.c	Mon Jun 24 08:13:31 2002 +0000
+++ b/input/input.c	Mon Jun 24 08:23:48 2002 +0000
@@ -298,7 +298,7 @@
 static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
 
 static int use_joystick = 1, use_lirc = 1;
-static char* config_file = "input.conf";
+static char* config_file = CONFDIR"/input.conf";
 
 static char* js_dev = NULL;
 
--- a/mplayer.c	Mon Jun 24 08:13:31 2002 +0000
+++ b/mplayer.c	Mon Jun 24 08:23:48 2002 +0000
@@ -421,7 +421,7 @@
 {
 char *conffile;
 int conffile_fd;
-if (m_config_parse_config_file(conf, "/etc/mplayer.conf") < 0)
+if (m_config_parse_config_file(conf, CONFDIR"/mplayer.conf") < 0)
   exit(1);
 if ((conffile = get_path("")) == NULL) {
   mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);