forked from codebutler/firesheep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
92 lines (74 loc) · 2.34 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# configure.ac
#
# Authors:
# Eric Butler <[email protected]>
#
# This file is part of Firesheep.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([Firesheep], [0.1], [[email protected]],
[firesheep], [http://codebutler.github.com/firesheep])
AC_PREREQ([2.61])
AM_INIT_AUTOMAKE
AC_PROG_CXX
AC_CANONICAL_HOST
case "$host_os" in
cygwin)
TARGET=WIN32
;;
darwin*)
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -mmacosx-version-min=10.5"
TARGET=OSX
;;
*)
TARGET=LINUX
;;
esac
AM_CONDITIONAL(PLATFORM_WIN32, test x$TARGET = xWIN32)
AM_CONDITIONAL(PLATFORM_OSX, test x$TARGET = xOSX)
AM_CONDITIONAL(PLATFORM_LINUX, test x$TARGET = xLINUX)
# BEGIN MOZILLA STUFF
# Mozilla doesn't provide pkg-config files for OSX, hence all this mess.
AC_ARG_WITH([xulrunner-sdk],
[AS_HELP_STRING([--with-xulrunner-sdk=<path>], [path to xulrunner sdk])],
[xulrunner_sdk="$withval"],
[xulrunner_sdk=""])
if test x$TARGET = xWIN32; then
xulrunner_sdk=`readlink -f $xulrunner_sdk`
fi
AS_IF([test -d "$xulrunner_sdk"], [], [AC_MSG_FAILURE([Specify --with-xulrunner-sdk=<path>.])])
MOZ_SDK=$xulrunner_sdk
AC_SUBST(MOZ_SDK)
MOZ_PATH="${xulrunner_sdk}/bin"
AC_SUBST(MOZ_PATH)
AC_PATH_PROG([XPIDL], [xpidl], [no], [$MOZ_PATH:$PATH])
if test "x$XPIDL" = "xno"; then
AC_MSG_ERROR([xpidl compiler not found])
fi
AC_SUBST(XPIDL)
XPIDL_FLAGS="-I ${xulrunner_sdk}/idl"
AC_SUBST(XPIDL_FLAGS)
MOZ_CFLAGS="-fshort-wchar -I${MOZ_SDK}/include"
AC_SUBST(MOZ_CFLAGS)
MOZ_LIBS="-L${MOZ_SDK}/lib -L${MOZ_SDK}/bin -Wl,-executable_path,${MOZ_SDK}/bin/xulrunner-bin -lxpcomglue_s -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
AC_SUBST(MOZ_LIBS)
# END MOZILLA STUFF
AC_SUBST(CFLAGS)
AC_CONFIG_FILES([
Makefile
backend/Makefile
mozpopen/Makefile
])
AC_OUTPUT