1dnl 2dnl Fix basic directories (Taken from CUPS) 3dnl 4dnl Copyright 2007-2014 by Apple Inc. 5dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. 6dnl 7dnl These coded instructions, statements, and computer programs are the 8dnl property of Apple Inc. and are protected by Federal copyright 9dnl law. Distribution and use rights are outlined in the file "COPYING" 10dnl which should have been included with this file. 11dnl 12 13AC_PREFIX_DEFAULT(/) 14 15dnl Fix "prefix" variable if it hasn't been specified... 16if test "$prefix" = "NONE"; then 17 prefix="/" 18fi 19 20dnl Fix "exec_prefix" variable if it hasn't been specified... 21if test "$exec_prefix" = "NONE"; then 22 if test "$prefix" = "/"; then 23 exec_prefix="/usr" 24 else 25 exec_prefix="$prefix" 26 fi 27fi 28 29dnl Fix "bindir" variable... 30if test "$bindir" = "\${exec_prefix}/bin"; then 31 bindir="$exec_prefix/bin" 32fi 33 34dnl Fix "sbindir" variable... 35if test "$sbindir" = "\${exec_prefix}/sbin"; then 36 sbindir="$exec_prefix/sbin" 37fi 38 39dnl Fix "sharedstatedir" variable if it hasn't been specified... 40if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then 41 sharedstatedir="/usr/com" 42fi 43 44dnl Fix "datarootdir" variable if it hasn't been specified... 45if test "$datarootdir" = "\${prefix}/share"; then 46 if test "$prefix" = "/"; then 47 datarootdir="/usr/share" 48 else 49 datarootdir="$prefix/share" 50 fi 51fi 52 53dnl Fix "datadir" variable if it hasn't been specified... 54if test "$datadir" = "\${prefix}/share"; then 55 if test "$prefix" = "/"; then 56 datadir="/usr/share" 57 else 58 datadir="$prefix/share" 59 fi 60elif test "$datadir" = "\${datarootdir}"; then 61 datadir="$datarootdir" 62fi 63 64dnl Fix "includedir" variable if it hasn't been specified... 65if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then 66 includedir="/usr/include" 67fi 68 69dnl Fix "localstatedir" variable if it hasn't been specified... 70if test "$localstatedir" = "\${prefix}/var"; then 71 if test "$prefix" = "/"; then 72 if test "$uname" = Darwin; then 73 localstatedir="/private/var" 74 else 75 localstatedir="/var" 76 fi 77 else 78 localstatedir="$prefix/var" 79 fi 80fi 81 82dnl Fix "sysconfdir" variable if it hasn't been specified... 83if test "$sysconfdir" = "\${prefix}/etc"; then 84 if test "$prefix" = "/"; then 85 if test "$uname" = Darwin; then 86 sysconfdir="/private/etc" 87 else 88 sysconfdir="/etc" 89 fi 90 else 91 sysconfdir="$prefix/etc" 92 fi 93fi 94 95dnl Fix "libdir" variable... 96if test "$libdir" = "\${exec_prefix}/lib"; then 97 case "$uname" in 98 Linux*) 99 if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then 100 libdir="$exec_prefix/lib64" 101 fi 102 ;; 103 esac 104fi 105 106