mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
all: fix __FILE_NAME__ workaround
Do not apply offset for __FILE__ in non-VPATH build, since the path is not prefixed with `${srcdir}/` in that case.
This commit is contained in:
parent
c17d6ebadf
commit
54c81c43bb
2 changed files with 10 additions and 3 deletions
|
@ -198,11 +198,13 @@ AC_COMPILE_IFELSE([
|
|||
AC_LANG_SOURCE([[char const *name = __FILE_NAME__;]])
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AS_VAR_SET([no_file_name], [no])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
AS_IF([test . -ef "${srcdir}"], , [
|
||||
AS_VAR_SET([no_file_name], [yes])
|
||||
])
|
||||
])
|
||||
AM_CONDITIONAL([NO_FILE_NAME], [test x${no_file_name} != xno])
|
||||
AM_CONDITIONAL([NO_FILE_NAME], [test x${no_file_name} = xyes])
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
AS_VAR_IF([ac_have_largefile], [no], [
|
||||
|
|
|
@ -114,7 +114,12 @@
|
|||
#ifdef __FILE_NAME__
|
||||
# define FILE_NAME_ __FILE_NAME__
|
||||
#else
|
||||
# define FILE_NAME_ ( __FILE__ + sizeof(BOOKMARKFS_SRCDIR) )
|
||||
# ifdef BOOKMARKFS_SRCDIR
|
||||
# define FILE_NAME_OFFSET_ sizeof(BOOKMARKFS_SRCDIR)
|
||||
# else
|
||||
# define FILE_NAME_OFFSET_ 0
|
||||
# endif
|
||||
# define FILE_NAME_ ( __FILE__ + FILE_NAME_OFFSET_ )
|
||||
#endif
|
||||
|
||||
#define BOOKMARKFS_HOMEPAGE_URL "https://nongnu.org/bookmarkfs"
|
||||
|
|
Loading…
Add table
Reference in a new issue