File: configure

package info (click to toggle)
melon 1.4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 956 kB
  • ctags: 158
  • sloc: ansic: 2,427; makefile: 91; sh: 58
file content (49 lines) | stat: -rwxr-xr-x 1,551 bytes parent folder | download
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
#!/bin/sh
# melon configure script 
#
# Copyright(C) 2001-2002 Elisa Manara <e@entropika.net>
# This code is released under the GPL License version 2 */
#

PROG=melon-1
DATA_PATH=/usr/local/share
BIN_DIR=/usr/local/bin
CC=${CC:=`which gcc`} || exit1
CP=`which cp`
MKDIR=`which mkdir`
GTK_CONFIG=`which gtk-config`
GTK_FLAGS=`$GTK_CONFIG --cflags`
GTK_LIBS=`$GTK_CONFIG --libs`

echo "Where can I put melon data dir? Press enter to accept default"
echo -n "[$DATA_PATH]: "
read LINE
if [ "$LINE" != "" ]; then
	DATA_PATH=$LINE;
fi

echo "Where should I put melon binary? Press enter to accept default"
echo -n "[$BIN_DIR]: "
read LINE
if [ "$LINE" != "" ]; then
	BIN_DIR=$LINE;
fi

echo "Writing def.h file";
echo -e "#ifndef _MELON_DEF_H\n#define _MELON_DEF_H\n" > def.h;
echo "#define PIXMAPS_DIR	\"$DATA_PATH/$PROG/pix\"" >> def.h;
echo "#define BEEP_DIR_AU	\"$DATA_PATH/$PROG/au\"" >> def.h;
echo "#define BEEP_DIR_VOC	\"$DATA_PATH/$PROG/voc\"" >> def.h;
echo "#define MAX_STYLE_DIRS	256" >> def.h;
echo "#define MAX_PLEN	256" >> def.h;
echo "#define NO_MAIL_PIX	\"$DATA_PATH/$PROG/pix/melon/1.xpm\"" >> def.h;
echo "#define NEW_MAIL_PIX	\"$DATA_PATH/$PROG/pix/melon/2.xpm\"" >> def.h;
echo -e "#define DEF_INTERVAL	5000\n" >> def.h;
echo "#endif /* _MELON_DEF_H */" >> def.h;
echo "Done!";

echo "Writing Makefile";
sed -e "s@%GTK_FLAGS%@$GTK_FLAGS@;s@%GTK_LIBS%@$GTK_LIBS@;s@%CP%@$CP@;s@%MKDIR%@$MKDIR@;s@%DIR_DATA%@$DATA_PATH/$PROG@;s@%BIN_DIR%@$BIN_DIR@;s@%CC%@$CC@" Makefile.in > Makefile
echo -e "Done!\n";
echo "Now you can type \"make\"";