Mercurial > pidgin
comparison acinclude.m4 @ 10245:c143a3fac58d
[gaim-migrate @ 11385]
Binary relocation, step one.
I had a fairly long commit message, and cvs ate it and said
Read from remote host cvs.sourceforge.net: Connection reset by peer
I'm displeased.
This is just method one, method two to follow tomorrow after I add a
way to register a fallback and try to push it upstream. That way
I don't have to put method 2 inside prefix.c.
As for as core/ui split goes, they can either each have their own copy
after the divorce is final, or the UI can use the core's. It'll work
either way, since #1 finds location of the caller, and #2 doesn't work
on libraries anyway. That's one advantage I forgot to mention, btw,
that #1 will let a library find its own location.
So, I'm sure something isn't quite right and someone will want to fix
it. So they can fix it while i implement phase two. Which won't take
long at all, but the autopackage guy is in bed, and I should be too.
committer: Tailor Script <tailor@pidgin.im>
| author | Tim Ringenbach <marv@pidgin.im> |
|---|---|
| date | Tue, 23 Nov 2004 05:53:59 +0000 |
| parents | f15fcdbecf0a |
| children | 949b7986f42c |
comparison
equal
deleted
inserted
replaced
| 10244:13cb42ebb537 | 10245:c143a3fac58d |
|---|---|
| 784 $3 | 784 $3 |
| 785 fi | 785 fi |
| 786 else | 786 else |
| 787 AC_MSG_WARN(could not find perl) | 787 AC_MSG_WARN(could not find perl) |
| 788 fi])dnl | 788 fi])dnl |
| 789 | |
| 790 | |
| 791 dnl This file scares me... | |
| 792 # Check for binary relocation support | |
| 793 # Hongli Lai | |
| 794 # http://autopackage.org/ | |
| 795 | |
| 796 AC_DEFUN([AM_BINRELOC], | |
| 797 [ | |
| 798 AC_ARG_ENABLE(binreloc, | |
| 799 [ --enable-binreloc compile with binary relocation support | |
| 800 (default=enable when available)], | |
| 801 enable_binreloc=$enableval,enable_binreloc=auto) | |
| 802 | |
| 803 AC_ARG_ENABLE(binreloc-threads, | |
| 804 [ --enable-binreloc-threads compile binary relocation with threads support | |
| 805 (default=yes)], | |
| 806 enable_binreloc_threads=$enableval,enable_binreloc_threads=yes) | |
| 807 | |
| 808 BINRELOC_CFLAGS= | |
| 809 BINRELOC_LIBS= | |
| 810 if test "x$enable_binreloc" = "xauto"; then | |
| 811 AC_CHECK_FILE([/proc/self/maps]) | |
| 812 AC_CACHE_CHECK([whether everything is installed to the same prefix], | |
| 813 [br_cv_valid_prefixes], [ | |
| 814 if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \ | |
| 815 "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \ | |
| 816 "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc' | |
| 817 then | |
| 818 br_cv_valid_prefixes=yes | |
| 819 else | |
| 820 br_cv_valid_prefixes=no | |
| 821 fi | |
| 822 ]) | |
| 823 fi | |
| 824 AC_CACHE_CHECK([whether binary relocation support should be enabled], | |
| 825 [br_cv_binreloc], | |
| 826 [if test "x$enable_binreloc" = "xyes"; then | |
| 827 br_cv_binreloc=yes | |
| 828 elif test "x$enable_binreloc" = "xauto"; then | |
| 829 if test "x$br_cv_valid_prefixes" = "xyes" -a \ | |
| 830 "x$ac_cv_file__proc_self_maps" = "xyes"; then | |
| 831 br_cv_binreloc=yes | |
| 832 else | |
| 833 br_cv_binreloc=no | |
| 834 fi | |
| 835 else | |
| 836 br_cv_binreloc=no | |
| 837 fi]) | |
| 838 | |
| 839 if test "x$br_cv_binreloc" = "xyes"; then | |
| 840 BINRELOC_CFLAGS="-DENABLE_BINRELOC" | |
| 841 AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?]) | |
| 842 if test "x$enable_binreloc_threads" = "xyes"; then | |
| 843 AC_CHECK_LIB([pthread], [pthread_getspecific]) | |
| 844 fi | |
| 845 | |
| 846 AC_CACHE_CHECK([whether binary relocation should use threads], | |
| 847 [br_cv_binreloc_threads], | |
| 848 [if test "x$enable_binreloc_threads" = "xyes"; then | |
| 849 if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then | |
| 850 br_cv_binreloc_threads=yes | |
| 851 else | |
| 852 br_cv_binreloc_threads=no | |
| 853 fi | |
| 854 else | |
| 855 br_cv_binreloc_threads=no | |
| 856 fi]) | |
| 857 | |
| 858 if test "x$br_cv_binreloc_threads" = "xyes"; then | |
| 859 BINRELOC_LIBS="-lpthread" | |
| 860 AC_DEFINE(BR_PTHREAD,1,[Include pthread support for binary relocation?]) | |
| 861 else | |
| 862 BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREAD=0" | |
| 863 AC_DEFINE(BR_PTHREAD,0,[Include pthread support for binary relocation?]) | |
| 864 fi | |
| 865 fi | |
| 866 AC_SUBST(BINRELOC_CFLAGS) | |
| 867 AC_SUBST(BINRELOC_LIBS) | |
| 868 ]) |
