source: trunk/configure @ 1

Last change on this file since 1 was 1, checked in by root, 15 years ago

Import from 2005-10-26

File size: 1.6 KB
Line 
1#! /bin/sh
2
3# For > 2 GB files
4DEFINES="_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE"
5
6# For asprintf
7DEFINES="$DEFINES _GNU_SOURCE"
8
9# System-specific flags
10SYSTEM=`uname -s`
11case $SYSTEM in
12  BeOS)
13    DEFINES="$DEFINES SYS_BEOS"
14
15    RELEASE=`uname -r`
16    case $RELEASE in
17      6.0|5.0.4) # Zeta or R5 / BONE beta 7
18        SYSTEM="$SYSTEM / BONE"
19        LINKLIBS="$LINKLIBS -lbind -lsocket"
20        ;;
21      5.0*)      # R5 / net_server
22        SYSTEM="$SYSTEM / net_server"
23        DEFINES="$DEFINES BEOS_NETSERVER"
24        LINKLIBS="$LINKLIBS -lnet"
25        ;;
26      *)
27        echo "Unsupported BeOS version"
28        exit 1 ;;
29    esac
30    ;;
31
32  Darwin)
33    DEFINES="$DEFINES SYS_DARWIN"
34    LINKLIBS="$LINKLIBS -lpthread"
35    ;;
36
37  FreeBSD)
38    DEFINES="$DEFINES SYS_FREEBSD"
39    LINKLIBS="$LINKLIBS -pthread"
40    ;;
41
42  NetBSD)
43    DEFINES="$DEFINES SYS_NETBSD"
44    LINKLIBS="$LINKLIBS -lpthread"
45    ;;
46
47  Linux)
48    DEFINES="$DEFINES SYS_LINUX"
49    LINKLIBS="$LINKLIBS -lpthread"
50    ;;
51
52  *)
53    echo "Unsupported operating system"
54    exit 1 ;;
55esac
56echo "System:  $SYSTEM"
57
58# Check for OpenSSL
59cat > testconf.c << EOF
60#include <stdio.h>
61#include <openssl/sha.h>
62int main()
63{
64    SHA1( 0, 0, 0 );
65}
66EOF
67if cc -o testconf testconf.c -lcrypto > /dev/null 2>&1
68then
69  echo "OpenSSL: yes"
70  DEFINES="$DEFINES HAVE_OPENSSL"
71  LINKLIBS="$LINKLIBS -lcrypto"
72else
73  echo "OpenSSL: no, using built-in SHA1 implementation"
74fi
75rm -f testconf.c testconf
76
77# Generate config.jam
78rm -f config.jam
79cat << EOF > config.jam
80DEFINES  = $DEFINES ;
81LINKLIBS = $LINKLIBS ;
82EOF
83
84echo
85echo "To build Transmission, run 'jam'."
Note: See TracBrowser for help on using the repository browser.