diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-11-19 21:43:22 +0100 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2016-12-25 09:22:29 +0000 |
commit | 6ddf26c83d0a87b3eb26f75a7da95f13b9c348d9 (patch) | |
tree | 703971a4e03276f66d234972f9f0ead067ab5ed3 /configure.ac | |
parent | 56d163ce79510c7756567df00ae54155757eaa0f (diff) | |
download | riscv-openocd-6ddf26c83d0a87b3eb26f75a7da95f13b9c348d9.zip riscv-openocd-6ddf26c83d0a87b3eb26f75a7da95f13b9c348d9.tar.gz riscv-openocd-6ddf26c83d0a87b3eb26f75a7da95f13b9c348d9.tar.bz2 |
Search for scripts relative to the executable on all(?) platforms
Add a helper to hide the platform-dependent method to get a
canonical, absolute, /-separated path to the executable.
Use this and the relative path from BINDIR to PKGDATADIR to
construct a search path that finds the scripts even if the
installation dir is moved, as long as the structure below $prefix
is maintained.
This method should fully support all the tricks you can to with
autotools to customize the installed layout such as overriding the
default directories at configure-time and overriding the configured
directories at build-time.
The exe path detection methods are combined from
http://openocd.zylin.com/3388 by Rick Foos and
http://openocd.zylin.com/3537 by Steven Stallion, as well as tips
found all over internet.
Change-Id: Ifc9cc9dd0bf52fbd67b1b0f2383318cda0c422c4
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Steven Stallion <sstallion@gmail.com>
Reviewed-on: http://openocd.zylin.com/3889
Tested-by: jenkins
Reviewed-by: Rick Foos <rfoos@solengtech.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5630b11..687e95c 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,7 @@ AC_CHECK_HEADERS([sys/ioctl.h]) AC_CHECK_HEADERS([sys/param.h]) AC_CHECK_HEADERS([sys/select.h]) AC_CHECK_HEADERS([sys/stat.h]) +AC_CHECK_HEADERS([sys/sysctl.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([sys/types.h]) AC_CHECK_HEADERS([unistd.h]) @@ -86,6 +87,7 @@ AC_CHECK_FUNCS([strnlen]) AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([usleep]) AC_CHECK_FUNCS([vasprintf]) +AC_CHECK_FUNCS([realpath]) # guess-rev.sh only exists in the repository, not in the released archives AC_MSG_CHECKING([whether to build a release]) |