summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. Bernstein <rocky@gnu.org>2012-09-27 06:57:34 -0400
committerR. Bernstein <rocky@gnu.org>2012-09-27 06:57:34 -0400
commite4b2af0f00d6f033f7aa2dc1b117a7324e4169ae (patch)
tree5dd832c1e26e583160278322c45f9a481c21000e
parent3f0ad681bde2f4e59f461ee90ddb0bbe5784370a (diff)
Recalculate native_top_srcdir one more time
-rw-r--r--configure.ac13
-rw-r--r--test/testisocd2.c.in2
-rw-r--r--test/testpregap.c.in14
3 files changed, 18 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 27502403..6bb7a843 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,9 +333,16 @@ dnl Libtool flag for strict linkage
LT_NO_UNDEFINED=
dnl regression tests need native-style absolute paths.
-dnl native_srcdir is used here.
-native_top_srcdir=$(cd $srcdir; /bin/bash.exe -c 'builtin pwd -W')
-AC_SUBST(native_top_srcdir)
+dnl native_abs_top_srcdir is used here.
+case $srcdir in
+ .) # We are building in place.
+ native_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ native_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ native_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+AC_SUBST(native_abs_top_srcdir)
case $host_os in
aix*)
diff --git a/test/testisocd2.c.in b/test/testisocd2.c.in
index f699f3d6..6cf0f2b2 100644
--- a/test/testisocd2.c.in
+++ b/test/testisocd2.c.in
@@ -48,7 +48,7 @@
#include "filemode.h"
/* Set up a CD-DA image to test on which is in the libcdio distribution. */
-#define ISO9660_IMAGE_PATH "@native_top_srcdir@/test/data/"
+#define ISO9660_IMAGE_PATH "@native_abs_top_srcdir@/test/data/"
#define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso"
#define SKIP_TEST_RC 77
diff --git a/test/testpregap.c.in b/test/testpregap.c.in
index 1c71b0f4..280d6a83 100644
--- a/test/testpregap.c.in
+++ b/test/testpregap.c.in
@@ -67,14 +67,14 @@ typedef struct _pregap_list_t {
static pregap_list_t pregapList[] =
{
- { "@native_top_srcdir@/test/data/t2.toc", 1, 4425 },
- { "@native_top_srcdir@/test/data/t2.toc", 2, CDIO_INVALID_LSN },
- { "@native_top_srcdir@/test/data/p1.cue", 1, 0 },
- { "@native_top_srcdir@/test/data/p1.cue", 2, 150 },
- { "@native_top_srcdir@/test/data/p1.cue", 3, CDIO_INVALID_LSN },
+ { "@native_abs_top_srcdir@/test/data/t2.toc", 1, 4425 },
+ { "@native_abs_top_srcdir@/test/data/t2.toc", 2, CDIO_INVALID_LSN },
+ { "@native_abs_top_srcdir@/test/data/p1.cue", 1, 0 },
+ { "@native_abs_top_srcdir@/test/data/p1.cue", 2, 150 },
+ { "@native_abs_top_srcdir@/test/data/p1.cue", 3, CDIO_INVALID_LSN },
/* { "p1.nrg", 1, 0 }, Nero did not create the proper pre-gap - bleh */
- { "@native_top_srcdir@/test/data/p1.nrg", 2, 225 },
- { "@native_top_srcdir@/test/data/p1.nrg", 3, CDIO_INVALID_LSN }
+ { "@native_abs_top_srcdir@/test/data/p1.nrg", 2, 225 },
+ { "@native_abs_top_srcdir@/test/data/p1.nrg", 3, CDIO_INVALID_LSN }
};
#define NELEMS(v) (sizeof(v) / sizeof(v[0]))