(root)/
glibc-2.38/
support/
support_paths.c
       1  /* Various paths that might be needed.
       2     Copyright (C) 2018-2023 Free Software Foundation, Inc.
       3     This file is part of the GNU C Library.
       4  
       5     The GNU C Library is free software; you can redistribute it and/or
       6     modify it under the terms of the GNU Lesser General Public
       7     License as published by the Free Software Foundation; either
       8     version 2.1 of the License, or (at your option) any later version.
       9  
      10     The GNU C Library is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13     Lesser General Public License for more details.
      14  
      15     You should have received a copy of the GNU Lesser General Public
      16     License along with the GNU C Library; if not, see
      17     <https://www.gnu.org/licenses/>.  */
      18  
      19  #include <support/support.h>
      20  #include <support/check.h>
      21  
      22  /* The idea here is to make various makefile-level paths available to
      23     support programs, as canonicalized absolute paths.  */
      24  
      25  /* These point to the TOP of the source/build tree, not your (or
      26     support's) subdirectory.  */
      27  #ifdef SRCDIR_PATH
      28  const char support_srcdir_root[] = SRCDIR_PATH;
      29  #else
      30  # error please -DSRCDIR_PATH=something in the Makefile
      31  #endif
      32  
      33  #ifdef OBJDIR_PATH
      34  const char support_objdir_root[] = OBJDIR_PATH;
      35  #else
      36  # error please -DOBJDIR_PATH=something in the Makefile
      37  #endif
      38  
      39  #ifdef OBJDIR_ELF_LDSO_PATH
      40  /* Corresponds to the path to the runtime linker used by the testsuite,
      41     e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2  */
      42  const char support_objdir_elf_ldso[] = OBJDIR_ELF_LDSO_PATH;
      43  #else
      44  # error please -DOBJDIR_ELF_LDSO_PATH=something in the Makefile
      45  #endif
      46  
      47  #ifdef INSTDIR_PATH
      48  /* Corresponds to the --prefix= passed to configure.  */
      49  const char support_install_prefix[] = INSTDIR_PATH;
      50  #else
      51  # error please -DINSTDIR_PATH=something in the Makefile
      52  #endif
      53  
      54  #ifdef LIBDIR_PATH
      55  /* Corresponds to the install's lib/ or lib64/ directory.  */
      56  const char support_libdir_prefix[] = LIBDIR_PATH;
      57  #else
      58  # error please -DLIBDIR_PATH=something in the Makefile
      59  #endif
      60  
      61  #ifdef BINDIR_PATH
      62  /* Corresponds to the install's bin/ directory.  */
      63  const char support_bindir_prefix[] = BINDIR_PATH;
      64  #else
      65  # error please -DBINDIR_PATH=something in the Makefile
      66  #endif
      67  
      68  #ifdef SBINDIR_PATH
      69  /* Corresponds to the install's bin/ directory.  */
      70  const char support_sbindir_prefix[] = SBINDIR_PATH;
      71  #else
      72  # error please -DSBINDIR_PATH=something in the Makefile
      73  #endif
      74  
      75  #ifdef SLIBDIR_PATH
      76  /* Corresponds to the system /lib or /lib64 directory.  */
      77  const char support_slibdir_prefix[] = SLIBDIR_PATH;
      78  #else
      79  # error please -DSLIBDIR_PATH=something in the Makefile
      80  #endif
      81  
      82  #ifdef ROOTSBINDIR_PATH
      83  /* Corresponds to the install's sbin/ directory.  */
      84  const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;
      85  #else
      86  # error please -DROOTSBINDIR_PATH=something in the Makefile
      87  #endif
      88  
      89  #ifdef COMPLOCALEDIR_PATH
      90  /* Corresponds to the install's compiled locale directory.  */
      91  const char support_complocaledir_prefix[] = COMPLOCALEDIR_PATH;
      92  #else
      93  # error please -DCOMPLOCALEDIR_PATH=something in the Makefile
      94  #endif
      95  
      96  #ifdef SYSCONFDIR_PATH
      97  /* Corresponds to the install's etc/ directory.  */
      98  const char support_sysconfdir_prefix[] = SYSCONFDIR_PATH;
      99  #else
     100  # error please -DSYSCONFDIR_PATH=something in the Makefile
     101  #endif