Added --with-progname="progname" option to configure.
This commit is contained in:
parent
d520f28acc
commit
befcaf077c
6
Makefile
6
Makefile
@ -1,13 +1,13 @@
|
|||||||
srcdir=.
|
srcdir=.
|
||||||
|
|
||||||
CFLAGS=-g -O2 -I/usr/include/lua5.2
|
CFLAGS=-g -O2
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
CPPFLAGS=
|
CPPFLAGS=
|
||||||
DEFS=-DHAVE_CONFIG_H
|
DEFS=-DHAVE_CONFIG_H
|
||||||
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
|
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
|
||||||
|
|
||||||
EXTRA_LIBS= -lreadline -lrt -lconfig -llua5.2 -ldl
|
EXTRA_LIBS=-lconfig -lcrypto -lz -lrt -lm -lreadline -llua
|
||||||
LOCAL_LDFLAGS=-lm -lcrypto -lz -lssl -rdynamic -ggdb ${EXTRA_LIBS}
|
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}
|
||||||
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
|
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
|
||||||
|
|
||||||
HEADERS= ${srcdir}/constants.h ${srcdir}/include.h ${srcdir}/interface.h ${srcdir}/LICENSE.h ${srcdir}/loop.h ${srcdir}/mtproto-client.h ${srcdir}/mtproto-common.h ${srcdir}/net.h ${srcdir}/no-preview.h ${srcdir}/queries.h ${srcdir}/structures.h ${srcdir}/telegram.h ${srcdir}/tree.h ${srcdir}/config.h ${srcdir}/binlog.h ${srcdir}/tools.h ${srcdir}/lua-tg.h
|
HEADERS= ${srcdir}/constants.h ${srcdir}/include.h ${srcdir}/interface.h ${srcdir}/LICENSE.h ${srcdir}/loop.h ${srcdir}/mtproto-client.h ${srcdir}/mtproto-common.h ${srcdir}/net.h ${srcdir}/no-preview.h ${srcdir}/queries.h ${srcdir}/structures.h ${srcdir}/telegram.h ${srcdir}/tree.h ${srcdir}/config.h ${srcdir}/binlog.h ${srcdir}/tools.h ${srcdir}/lua-tg.h
|
||||||
|
3
config.h
3
config.h
@ -141,6 +141,9 @@
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "0.1"
|
#define PACKAGE_VERSION "0.1"
|
||||||
|
|
||||||
|
/* Use custom prog name */
|
||||||
|
/* #undef PROG_NAME */
|
||||||
|
|
||||||
/* Use libedit */
|
/* Use libedit */
|
||||||
/* #undef READLINE_EDIT */
|
/* #undef READLINE_EDIT */
|
||||||
|
|
||||||
|
@ -140,6 +140,9 @@
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Use custom prog name */
|
||||||
|
#undef PROG_NAME
|
||||||
|
|
||||||
/* Use libedit */
|
/* Use libedit */
|
||||||
#undef READLINE_EDIT
|
#undef READLINE_EDIT
|
||||||
|
|
||||||
|
35
configure
vendored
35
configure
vendored
@ -687,6 +687,7 @@ ac_user_opts='
|
|||||||
enable_option_checking
|
enable_option_checking
|
||||||
enable_libconfig
|
enable_libconfig
|
||||||
enable_liblua
|
enable_liblua
|
||||||
|
with_progname
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@ -1312,6 +1313,11 @@ Optional Features:
|
|||||||
--enable-libconfig/--disable-libconfig
|
--enable-libconfig/--disable-libconfig
|
||||||
--enable-liblua/--disable-liblua
|
--enable-liblua/--disable-liblua
|
||||||
|
|
||||||
|
Optional Packages:
|
||||||
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
|
--with-progname=<name>
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
CC C compiler command
|
CC C compiler command
|
||||||
CFLAGS C compiler flags
|
CFLAGS C compiler flags
|
||||||
@ -5363,6 +5369,35 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#check for custom prog name
|
||||||
|
|
||||||
|
# Check whether --with-progname was given.
|
||||||
|
if test "${with_progname+set}" = set; then :
|
||||||
|
withval=$with_progname;
|
||||||
|
if test "x$with_progname" = "xno" ; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
|
||||||
|
$as_echo "default" >&6; }
|
||||||
|
elif test "x$with_progname" = "xyes" ; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
|
||||||
|
$as_echo "default" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$with_progname\"" >&5
|
||||||
|
$as_echo "\"$with_progname\"" >&6; }
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define PROG_NAME "$with_progname"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
|
||||||
|
$as_echo "default" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
for ac_header in execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h
|
for ac_header in execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h
|
||||||
do :
|
do :
|
||||||
|
15
configure.ac
15
configure.ac
@ -76,6 +76,21 @@ AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#check for custom prog name
|
||||||
|
AC_ARG_WITH(progname,[--with-progname=<name>],
|
||||||
|
[
|
||||||
|
if test "x$with_progname" = "xno" ; then
|
||||||
|
AC_MSG_RESULT([default])
|
||||||
|
elif test "x$with_progname" = "xyes" ; then
|
||||||
|
AC_MSG_RESULT([default])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(["$with_progname"])
|
||||||
|
AC_DEFINE_UNQUOTED([PROG_NAME], ["$with_progname"], [Use custom prog name])
|
||||||
|
fi
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([default])
|
||||||
|
])
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
|
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user