summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-24 08:23:48 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-24 08:23:48 +0000
commite3f40cf939ab53b94ab56262869ebaa0c5039be9 (patch)
tree6c4bee663200df9b6bbe6af9b1abad13766c5985
parentc9ab15ec9b1dc34cb6e30d5d299b059dd6b501a5 (diff)
downloadmpv-e3f40cf939ab53b94ab56262869ebaa0c5039be9.tar.bz2
mpv-e3f40cf939ab53b94ab56262869ebaa0c5039be9.tar.xz
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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6546 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure9
-rw-r--r--input/input.c2
-rw-r--r--mplayer.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/configure b/configure
index 8de7144f7b..bae20a6bee 100755
--- a/configure
+++ b/configure
@@ -4002,10 +4002,11 @@ cat > config.mak << EOF
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
diff --git a/input/input.c b/input/input.c
index 55bb6ad979..ed26c0d94d 100644
--- a/input/input.c
+++ b/input/input.c
@@ -298,7 +298,7 @@ static mp_cmd_t* ar_cmd = NULL;
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;
diff --git a/mplayer.c b/mplayer.c
index a517fe2362..7841cb7e3e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -421,7 +421,7 @@ void parse_cfgfiles( m_config_t* conf )
{
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);